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

Added button to open options page from pageAction popup

This commit is contained in:
kkapsner 2017-12-23 23:49:05 +01:00
parent e9fe20d966
commit a85ea32a74
6 changed files with 137 additions and 10 deletions

View file

@ -23,15 +23,30 @@
createActionButtons(
document.getElementById("globalActions"),
[{
name: "disableNotifications",
isIcon: true,
callback: function(){
settings.showNotifications = false;
window.close();
[
{
name: "showOptions",
isIcon: true,
callback: function(){
if (browser.runtime && browser.runtime.openOptionsPage){
browser.runtime.openOptionsPage();
}
else {
window.open(browser.extension.getURL("options/options.html"), "_blank");
}
}
},
{
name: "disableNotifications",
isIcon: true,
callback: function(){
settings.showNotifications = false;
window.close();
}
}
}],
undefined
],
undefined,
true
);
if (!tabs.length){