diff options
Diffstat (limited to 'src/bg')
-rw-r--r-- | src/bg/RequestGuard.js | 4 | ||||
-rw-r--r-- | src/bg/main.js | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 10ccfdb..31d79f5 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -114,7 +114,7 @@ var RequestGuard = (() => { : (numAllowed ? "sub" : "no"); let showBadge = ns.local.showCountBadge && numBlocked > 0; let browserAction = browser.browserAction; - if (!browserAction.setIcon) { // mobile + if (!browserAction.setIcon) { // Fennec browserAction.setTitle({tabId, title: `NoScript (${numBlocked})`}); return; } @@ -123,7 +123,7 @@ var RequestGuard = (() => { browserAction.setBadgeText({tabId, text: showBadge ? numBlocked.toString() : ""}); browserAction.setBadgeBackgroundColor({tabId, color: [128, 0, 0, 160]}); browserAction.setTitle({tabId, - title: `${VERSION_LABEL} \n${enforced ? + title: UA.mobile ? "NoScript" : `${VERSION_LABEL} \n${enforced ? _("BlockedItems", [numBlocked, numAllowed + numBlocked]) + ` \n${report}` : _("NotEnforced")}` }); diff --git a/src/bg/main.js b/src/bg/main.js index b1874f4..b09dcb1 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -109,12 +109,12 @@ // wiring main UI let ba = browser.browserAction; if ("setIcon" in ba) { - //desktop + //desktop or Fenix ba.setPopup({ popup: popupURL }); } else { - // mobile + // Fennec ba.onClicked.addListener(async tab => { try { await browser.tabs.remove(await browser.tabs.query({ @@ -250,9 +250,10 @@ deferWebTraffic(this.initializing = init(), async () => { Commands.install(); - - this.devMode = (await browser.management.getSelf()).installType === "development"; - if (!this.local.debug) { + try { + this.devMode = (await browser.management.getSelf()).installType === "development"; + } catch(e) {} + if (!(this.local.debug || this.devMode)) { debug = () => {}; // suppress verbosity } }); |