1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Replace window.open with browser.tabs.create

Fixes #661
This commit is contained in:
kkapsner 2023-05-30 00:20:54 +02:00
parent 5df98e0cf5
commit e9f5f710e6
5 changed files with 29 additions and 23 deletions

View file

@ -30,7 +30,7 @@
browser.runtime.openOptionsPage();
}
else {
window.open(extension.getURL("options/options.html"), "_blank");
browser.tabs.create({url: extension.getURL("options/options.html")});
}
}
},
@ -152,15 +152,12 @@
name: "inspectWhitelist",
isIcon: true,
callback: function({domain, urls}){
window.open(
extension.getURL(
"options/whitelist.html?domain=" +
encodeURIComponent(domain) +
"&urls=" +
encodeURIComponent(JSON.stringify(Array.from(urls.values())))
),
"_blank"
);
browser.tabs.create({url: extension.getURL(
"options/whitelist.html?domain=" +
encodeURIComponent(domain) +
"&urls=" +
encodeURIComponent(JSON.stringify(Array.from(urls.values())))
)});
}
}
];