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

Fixed page action display confusion

Fixes #149
This commit is contained in:
kkapsner 2017-11-14 23:57:44 +01:00
parent d35ffe0b70
commit dd3620cd08
3 changed files with 9 additions and 8 deletions

View file

@ -64,6 +64,10 @@
browser.pageAction.show(port.sender.tab.id);
}
}
if (data.hasOwnProperty("canvasBlocker-clear-page-action")){
notice("Hide page action for tab", port.sender.tab.id);
browser.pageAction.hide(port.sender.tab.id);
}
verbose("got data", data, "from port", port);
});
});
@ -80,13 +84,6 @@
});
}
});
// hide page action when a tab is refreshed
browser.tabs.onUpdated.addListener(function(tabId, data){
if (data.status && data.status === "loading"){
browser.pageAction.hide(tabId);
}
});
});
browser.runtime.onInstalled.addListener(function(){