From 5c7a80997f0b2bc612bfe00bcdb2e429a014436b Mon Sep 17 00:00:00 2001 From: idk Date: Sun, 24 Nov 2019 05:21:56 -0500 Subject: [PATCH] fix android maybe --- info.js | 10 ---------- scrub.js | 37 +++++++++++++------------------------ 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/info.js b/info.js index d7ae4cd..9380641 100644 --- a/info.js +++ b/info.js @@ -1,8 +1,4 @@ document.addEventListener("click", e => { - function getCurrentWindow() { - return browser.windows.getCurrent(); - } - if (e.target.id === "window-create-help-panel") { let createData = { type: "panel", @@ -34,12 +30,6 @@ document.addEventListener("click", e => { } RefreshIdentity(); } else if (e.target.id === "window-preface-title") { - getCurrentWindow().then(currentWindow => { - let updateInfo = { - titlePreface: "I2P Help | " - }; - browser.windows.update(currentWindow.id, updateInfo); - }); } else if (e.target.id === "window-visit-homepage") { console.log("attempting to create homepage tab"); goHome(); diff --git a/scrub.js b/scrub.js index 689f855..a2c12d8 100644 --- a/scrub.js +++ b/scrub.js @@ -123,7 +123,6 @@ var contextSetup = async function(requestDetails) { function onCreated(tab) { console.log("(isolate) Closing old, un-isolated tab", window); browser.tabs.remove(tabId.id); - browser.tabs.remove(window.tabs[0].id); } function onError(error) { console.log(`Error: ${error}`); @@ -131,12 +130,11 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url }); created.then(onCreated, onError); } - var getting = browser.windows.getCurrent(); + var getting = browser.tabs.getCurrent(); getting.then(Create); return tabId; } @@ -169,12 +167,12 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url + //windowId: window.id }); created.then(onCreated, onError); } - var getting = browser.windows.getCurrent(); + var getting = browser.tabs.getCurrent(); getting.then(Create); return tabId; } @@ -199,9 +197,6 @@ var contextSetup = async function(requestDetails) { function onCreated(tab) { console.log("(isolate) Closing old, un-isolated tab"); browser.tabs.remove(tabId.id); - if (window != undefined) { - browser.tabs.remove(window.tabs[0].id); - } } function onError(error) { console.log(`Error: ${error}`); @@ -209,12 +204,12 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url + //windowId: window.id }); created.then(onCreated, onError); } - var getting = browser.windows.getCurrent(); + var getting = browser.tabs.getCurrent(); getting.then(Create); return tabId; } @@ -239,7 +234,6 @@ var contextSetup = async function(requestDetails) { function onCreated(tab) { console.log("(isolate) Closing old, un-isolated tab"); browser.tabs.remove(tabId.id); - browser.tabs.remove(window.tabs[0].id); } function onError(error) { console.log(`Error: ${error}`); @@ -247,12 +241,11 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url }); created.then(onCreated, onError); } - var getting = browser.windows.getCurrent(); + var getting = browser.tabs.getCurrent(); getting.then(Create); return tabId; } @@ -277,7 +270,6 @@ var contextSetup = async function(requestDetails) { function onCreated(tab) { console.log("(isolate) Closing old, un-isolated tab"); browser.tabs.remove(tabId.id); - browser.tabs.remove(window.tabs[0].id); } function onError(error) { console.log(`Error: ${error}`); @@ -285,12 +277,11 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url }); created.then(onCreated, onError); } - var getting = browser.windows.getCurrent(); + var getting = browser.tabs.getCurrent(); getting.then(Create); return tabId; } @@ -320,7 +311,6 @@ var contextSetup = async function(requestDetails) { function onCreated(tab) { console.log("(isolate) Closing old, un-isolated tab"); browser.tabs.remove(tabId.id); - browser.tabs.remove(window.tabs[0].id); } function onError(error) { console.log(`Error: ${error}`); @@ -328,8 +318,7 @@ var contextSetup = async function(requestDetails) { var created = browser.tabs.create({ active: true, cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - windowId: window.id + url: requestDetails.url }); created.then(onCreated, onError); }