mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-07 12:14:50 +01:00
Change browser action icon depending on fake status.
As mentioned in #217
This commit is contained in:
parent
4a6c5192f8
commit
05a3429dbe
@ -17,6 +17,7 @@ div {
|
||||
height: auto;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action + .action {
|
||||
|
128
icons/browserAction-notPrinted.svg
Normal file
128
icons/browserAction-notPrinted.svg
Normal file
File diff suppressed because one or more lines are too long
After (image error) Size: 15 KiB |
128
icons/browserAction-printed.svg
Normal file
128
icons/browserAction-printed.svg
Normal file
File diff suppressed because one or more lines are too long
After (image error) Size: 15 KiB |
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);
|
||||
});
|
||||
|
@ -56,8 +56,8 @@
|
||||
"browser_action": {
|
||||
"browser_style": true,
|
||||
"default_icon": {
|
||||
"19": "icons/icon.svg",
|
||||
"38": "icons/icon.svg"
|
||||
"19": "icons/browserAction-notPrinted.svg",
|
||||
"38": "icons/browserAction-notPrinted.svg"
|
||||
},
|
||||
"default_title": "CanvasBlocker",
|
||||
"default_popup": "browserAction/browserAction.html"
|
||||
|
Loading…
x
Reference in New Issue
Block a user