1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-15 17:39:51 +02:00

Improved browser action title

As mentioned in #233.
This commit is contained in:
kkapsner 2018-08-22 22:37:06 +02:00
parent 0d1738d328
commit 391deae6f1
4 changed files with 30 additions and 4 deletions

View File

@ -8,6 +8,19 @@
"description": "" "description": ""
}, },
"browserAction_title_default": {
"message": "CanvasBlocker",
"description": ""
},
"browserAction_title_notified": {
"message": "CanvasBlocker\n\nSchutz erfolgreich für:",
"description": ""
},
"browserAction_title_protectedAPIs": {
"message": "\n \u00B7 {api}",
"description": ""
},
"more": { "more": {
"message": "mehr", "message": "mehr",
"description": "" "description": ""

View File

@ -8,6 +8,19 @@
"description": "" "description": ""
}, },
"browserAction_title_default": {
"message": "CanvasBlocker",
"description": ""
},
"browserAction_title_notified": {
"message": "CanvasBlocker\n\nprotection successful for:",
"description": ""
},
"browserAction_title_protectedAPIs": {
"message": "\n \u00B7 {api}",
"description": ""
},
"more": { "more": {
"message": "more", "message": "more",
"description": "" "description": ""

View File

@ -67,11 +67,11 @@
let apiList = ""; let apiList = "";
apis.forEach(function(api){ apis.forEach(function(api){
apiList += "\n \u00B7 " + api; apiList += browser.i18n.getMessage("browserAction_title_protectedAPIs").replace(/{api}/g, api);
}); });
browser.browserAction.setTitle({ browser.browserAction.setTitle({
tabId: tabId, tabId: tabId,
title: "CanvasBlocker" + apiList title: browser.i18n.getMessage("browserAction_title_notified") + apiList
}); });
}; };
@ -93,7 +93,7 @@
}); });
browser.browserAction.setTitle({ browser.browserAction.setTitle({
tabId: tabId, tabId: tabId,
title: "CanvasBlocker" title: browser.i18n.getMessage("browserAction_title_default")
}); });
}; };

View File

@ -57,7 +57,7 @@
"browser_action": { "browser_action": {
"browser_style": false, "browser_style": false,
"default_icon": "icons/browserAction-notPrinted.svg", "default_icon": "icons/browserAction-notPrinted.svg",
"default_title": "CanvasBlocker", "default_title": "__MSG_browserAction_title_default__",
"default_popup": "browserAction/browserAction.html" "default_popup": "browserAction/browserAction.html"
}, },
"page_action": { "page_action": {