mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Change browser action icon depending on fake status.
As mentioned in #217
This commit is contained in:
parent
4a6c5192f8
commit
05a3429dbe
5 changed files with 273 additions and 2 deletions
14
lib/main.js
14
lib/main.js
|
@ -67,11 +67,25 @@
|
|||
!lists.get("ignore").match(url)
|
||||
){
|
||||
browser.pageAction.show(port.sender.tab.id);
|
||||
browser.browserAction.setIcon({
|
||||
tabId: port.sender.tab.id,
|
||||
path: {
|
||||
"19": "icons/browserAction-printed.svg",
|
||||
"38": "icons/browserAction-printed.svg"
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (data.hasOwnProperty("canvasBlocker-clear-page-action")){
|
||||
notice("Hide page action for tab", port.sender.tab.id);
|
||||
browser.pageAction.hide(port.sender.tab.id);
|
||||
browser.browserAction.setIcon({
|
||||
tabId: port.sender.tab.id,
|
||||
path: {
|
||||
"19": "icons/browserAction-notPrinted.svg",
|
||||
"38": "icons/browserAction-notPrinted.svg"
|
||||
}
|
||||
});
|
||||
}
|
||||
verbose("got data", data, "from port", port);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue