about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-06-19 18:49:42 +0300
committerManeraKai <manerakai@protonmail.com>2022-06-19 18:49:42 +0300
commitf6861164a34f2722b70feb0161bcfec2dd0d78ad (patch)
tree31b179255c1f5f058c8ada1f4f05520e0dffa362 /src
parentAdded imgur.io #346. Fixed a typo in Unify. Fixed typo in IMDb #348 (diff)
downloadlibredirect-f6861164a34f2722b70feb0161bcfec2dd0d78ad.zip
Disabled cookies for incognito for this release #291 #340
Diffstat (limited to 'src')
-rw-r--r--src/assets/javascripts/utils.js1
-rw-r--r--src/pages/background/background.js12
-rw-r--r--src/pages/options/index.html2
-rw-r--r--src/pages/options/widgets/general.pug4
4 files changed, 4 insertions, 15 deletions
diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js
index 3432dbef..c03ca31c 100644
--- a/src/assets/javascripts/utils.js
+++ b/src/assets/javascripts/utils.js
@@ -371,6 +371,7 @@ function unify(test) {
           let url;
           try { url = new URL(currTab.url); }
           catch { resolve(); return; }
+          if (currTab.incognito) { resolve(); return; }
 
           let result = await youtubeHelper.copyPasteInvidiousCookies(test, url);
           if (!result) result = await youtubeHelper.copyPastePipedLocalStorage(test, url, currTab.id);
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index d19828ca..5b2924ae 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -147,20 +147,8 @@ browser.webRequest.onBeforeRequest.addListener(
   ["blocking"]
 );
 
-let incognitoList = [];
-browser.tabs.onCreated.addListener(
-  tab => {
-    if (tab.incognito) {
-      incognitoList.push(tab.id);
-      if (incognitoList.length == 1) browser.tabs.create({ url: browser.runtime.getURL("/pages/background/incognito.html"), active: false });
-    }
-  }
-);
-
 browser.tabs.onRemoved.addListener(
   tabId => {
-    incognitoList.pop(tabId)
-
     const i = BYPASSTABs.indexOf(tabId);
     if (i > -1) {
       BYPASSTABs.splice(i, 1);
diff --git a/src/pages/options/index.html b/src/pages/options/index.html
index 0bb4ecde..9e318512 100644
--- a/src/pages/options/index.html
+++ b/src/pages/options/index.html
@@ -71,7 +71,7 @@
           </select>
         </div>
         <div class="some-block option-block">
-          <h4>First-party isolation (Enable for Tor)</h4>
+          <h4>Tor Browser</h4>
           <input id="firstPartyIsolate" type="checkbox">
         </div>
         <div class="some-block option-block">
diff --git a/src/pages/options/widgets/general.pug b/src/pages/options/widgets/general.pug
index c8e043b9..fe144a57 100644
--- a/src/pages/options/widgets/general.pug
+++ b/src/pages/options/widgets/general.pug
@@ -10,8 +10,8 @@ section#general_page.option-block
             option(value="light" data-localise="__MSG_light__") Light
             option(value="dark" data-localise="__MSG_dark__") Dark
 
-    .some-block.option-block
-        h4() First-party isolation (Enable for Tor)
+    //- .some-block.option-block
+        h4 Tor Browser
         input#firstPartyIsolate(type="checkbox")
 
     .some-block.option-block