about summary refs log tree commit diff stats
path: root/src/pages/background
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-06-08 04:18:09 +0300
committerManeraKai <manerakai@protonmail.com>2022-06-08 04:18:09 +0300
commit55d76447d473302996950b2605b45d395c074bcf (patch)
tree79d8438d741af2380e0a42d1d4b4fa66ac7fde52 /src/pages/background
parentFixed a bug in export settings after reset warning popup (diff)
downloadlibredirect-55d76447d473302996950b2605b45d395c074bcf.zip
Fixed cookies not applying in iframes #319. Added translation support for some strings
Diffstat (limited to 'src/pages/background')
-rw-r--r--src/pages/background/background.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index a77dd327..04bd98dd 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -195,14 +195,7 @@ async function redirectOfflineInstance(url, tabId) {
 let counter = 0;
 
 function isAutoRedirect() {
-  return new Promise(resolve => {
-    browser.storage.local.get('autoRedirect',
-      r => {
-        if (r.autoRedirect == true) resolve(true)
-        else resolve(false)
-      }
-    )
-  })
+  return new Promise(resolve => browser.storage.local.get('autoRedirect', r => resolve(r.autoRedirect == true)))
 }
 
 browser.webRequest.onResponseStarted.addListener(
@@ -243,13 +236,13 @@ browser.contextMenus.create({
 
 browser.contextMenus.create({
   id: "copyRaw",
-  title: "Copy Raw",
+  title: browser.i18n.getMessage("copyRaw"),
   contexts: ["browser_action"]
 });
 
 browser.contextMenus.create({
   id: "unify",
-  title: "Unify",
+  title: browser.i18n.getMessage("unifySettings"),
   contexts: ["browser_action"]
 });