figure out why it isn't launching into containers like on desktop
This commit is contained in:
@@ -11,7 +11,7 @@ var torrentprefpriv = chrome.i18n.getMessage("torrentPrefacePrivate");
|
||||
var tunnelpref = chrome.i18n.getMessage("i2ptunnelPreface");
|
||||
var tunnelprefpriv = chrome.i18n.getMessage("i2ptunnelPrefacePrivate");
|
||||
|
||||
var android = false;
|
||||
var android; // = false;
|
||||
|
||||
var gettingInfo = browser.runtime.getPlatformInfo();
|
||||
gettingInfo.then(got => {
|
||||
@@ -21,10 +21,15 @@ gettingInfo.then(got => {
|
||||
return true;
|
||||
} else {
|
||||
console.log("Running in Desktop detected");
|
||||
android = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function isDroid() {
|
||||
console.log("android?", android);
|
||||
if (android == undefined) {
|
||||
return false;
|
||||
}
|
||||
return android;
|
||||
}
|
||||
|
||||
117
scrub.js
117
scrub.js
@@ -104,15 +104,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -137,10 +142,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -165,10 +180,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -193,10 +218,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -221,10 +256,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -249,10 +294,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
@@ -282,10 +337,20 @@ var contextSetup = async function(requestDetails) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
function Create(currentTab) {
|
||||
function onCreated(tab) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
browser.tabs.remove(tabId.id);
|
||||
function closeOldTab(tab) {
|
||||
if (!isDroid()) {
|
||||
if (tabId.id != tab.id) {
|
||||
console.log(
|
||||
"(isolate) Closing old, un-isolated tab",
|
||||
tabId.id,
|
||||
"in favor of",
|
||||
tab.id
|
||||
);
|
||||
browser.tabs.remove(tabId.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
closeOldTab(tab);
|
||||
}
|
||||
var created = browser.tabs.create({
|
||||
active: true,
|
||||
|
||||
Reference in New Issue
Block a user