another hack to deal with slightly different tag behavior

This commit is contained in:
idk
2019-11-26 23:06:24 -05:00
parent 256a990ebc
commit 7902aded0a
5 changed files with 20 additions and 10 deletions

View File

@@ -46,7 +46,8 @@ gettingInfo.then(got => {
createBookmark.then(onCreated);
} else {
var createBookmark = browser.bookmarks.create({
url: "http://localhost:7657/i2psnark",
url:
"http://" + control_host + ":" + control_port + "/i2psnark",
title: "Bittorrent",
parentId: bookmarkToolbar[0].id
});
@@ -74,7 +75,7 @@ gettingInfo.then(got => {
createBookmark.then(onCreated);
} else {
var createBookmark = browser.bookmarks.create({
url: "http://localhost:7657/webmail",
url: "http://" + control_host + ":" + control_port + "/webmail",
title: "Web Mail",
parentId: bookmarkToolbar[0].id
});
@@ -103,7 +104,12 @@ gettingInfo.then(got => {
createBookmark.then(onCreated);
} else {
var createBookmark = browser.bookmarks.create({
url: "http://localhost:7657/i2ptunnelmgr",
url:
"http://" +
control_host +
":" +
control_port +
"/i2ptunnelmgr",
title: "Hidden Services Manager",
parentId: bookmarkToolbar[0].id
});

View File

@@ -86,7 +86,10 @@ function routerHost(url) {
hostname = url.split("/")[0];
path = url.replace(hostname + "/", "");
}
if (hostname === "127.0.0.1:7657") {
if (hostname === control_host + ":" + control_port) {
console.log("(hostcheck) router console found on configured ports");
return pathcheck(path);
} else if (hostname === "127.0.0.1:7657") {
return pathcheck(path);
} else if (hostname === "localhost:7657") {
return pathcheck(path);

View File

@@ -121,7 +121,7 @@ function goHome() {
function goTunnel() {
let createData = {
url: "http://127.0.0.1:7657/i2ptunnel"
url: "http://" + control_host + ":" + control_port + "/i2ptunnel"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
@@ -129,7 +129,7 @@ function goTunnel() {
function goMail() {
let createData = {
url: "http://127.0.0.1:7657/susimail"
url: "http://" + control_host + ":" + control_port + "/susimail"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);
@@ -137,7 +137,7 @@ function goMail() {
function goSnark() {
let createData = {
url: "http://127.0.0.1:7657/i2psnark"
url: "http://" + control_host + ":" + control_port + "/i2psnark"
};
console.log("visiting homepage");
let creating = browser.tabs.create(createData);

View File

@@ -180,7 +180,8 @@ function AssurePeerConnection() {
rtc.then(assure);
}
AssurePeerConnection();
browser.windows.onCreated.addListener(ResetPeerConnection);
//AssurePeerConnection();
function ResetDisableSavePasswords() {
browser.privacy.services.passwordSavingEnabled.set({

View File

@@ -240,7 +240,7 @@ function SetupSettings() {
if (storedSettings.control_port != undefined) {
contro_port = storedSettings.control_port;
} else {
control_port = "4445";
control_port = "7657";
storedSettings.control_port = control_port;
}
console.log("Initialising Control Port", storedSettings.control_port);
@@ -317,7 +317,7 @@ function getControlHost() {
function getControlPort() {
if (control_port == undefined) {
return "4444";
return "7657";
}
return control_port;
}