fix android maybe

This commit is contained in:
idk
2019-11-24 05:21:56 -05:00
parent 32035348c1
commit 5c7a80997f
2 changed files with 13 additions and 34 deletions

10
info.js
View File

@@ -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();

View File

@@ -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);
}