Assure defaults in non-presence of essential settings
This commit is contained in:
12
info.js
12
info.js
@@ -223,12 +223,18 @@ function goSearch() {
|
||||
creating.then(onTabCreated, onTabError);
|
||||
}
|
||||
|
||||
function routerAddr(){
|
||||
if (!control_host) control_host="127.0.0.1"
|
||||
if (!control_port) control_port="7657"
|
||||
return control_host + ":" + control_port
|
||||
}
|
||||
|
||||
function goTunnel() {
|
||||
function onTabError() {
|
||||
console.log("I2PTunnel tab created");
|
||||
}
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/i2ptunnel"
|
||||
url: "http://" + routerAddr() + "/i2ptunnel"
|
||||
};
|
||||
console.log("visiting i2ptunnel");
|
||||
let creating = browser.tabs.create(createData);
|
||||
@@ -240,7 +246,7 @@ function goMail() {
|
||||
console.log("Mail tab created");
|
||||
}
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/susimail"
|
||||
url: "http://" + routerAddr() + "/susimail"
|
||||
};
|
||||
console.log("visiting mail");
|
||||
let creating = browser.tabs.create(createData);
|
||||
@@ -252,7 +258,7 @@ function goSnark() {
|
||||
console.log("Snark tab created");
|
||||
}
|
||||
let createData = {
|
||||
url: "http://" + control_host + ":" + control_port + "/i2psnark"
|
||||
url: "http://" + routerAddr() + "/i2psnark"
|
||||
};
|
||||
console.log("visiting snark");
|
||||
let creating = browser.tabs.create(createData);
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
"background": {
|
||||
"persistent": true,
|
||||
"scripts": [
|
||||
"torrent/common.js",
|
||||
"torrent/background.js",
|
||||
"config.js",
|
||||
"i2pcontrol/i2pcontrol.js",
|
||||
"host.js",
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
|
||||
<li class="application"><button class="applicationName" id="window-visit-snark" target="_blank">BitTorrent</button> <span class="applicationDesc" id="snark">I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:</span></li>
|
||||
|
||||
<li class="application"> <button class="applicationName" id="window-visit-router" href="http://127.0.0.1:7657/" target="_blank">Router Console</button> <span class="applicationDesc" id="routerConsole">The entrypoint for all other I2P applications is the I2P Router Console. To visit it, click here.</span></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -166,7 +165,7 @@
|
||||
<script src="i2pcontrol/i2pcontrol.js"></script>
|
||||
<script src="info.js"></script>
|
||||
<script crossorigin="anonymous" src="content.js"></script>
|
||||
<script src="torrent/common.js"></script>
|
||||
<script src="torrent/popup.js"></script>
|
||||
<!--<script src="torrent/common.js"></script>
|
||||
<script src="torrent/popup.js"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user