update the links inside the homepage. The plugin hosts it's own official homepage. How's that for distributed.

This commit is contained in:
idk
2020-01-22 20:15:56 -05:00
parent 62cf0bdb1d
commit 52da62dcd3
3 changed files with 17 additions and 19 deletions

View File

@@ -10,7 +10,7 @@
</head>
<body>
<!--<div>-->
<script src="home.js" type="text/javascript"></script>
<script src="home.js" type="text/javascript"></script>
<script src="content.js" type="text/javascript"></script>
<div class='background'>
<div class='content'>

View File

@@ -195,7 +195,5 @@
<h3>Android addons.mozilla.org(Temporarily Disabled)</h3>
<p>If you would prefer to recieve automatic updates from AMO, the correct product page for this plugin is <a href="https://addons.mozilla.org/en-US/firefox/addon/i2p-in-private-browsing/">I2P In Private Browsing</a>. This absolutely requires a working outproxy. If you want to avoid the use of AMO for updates, you can download the identical plugin from this repository's releases page. The latest AMO Plugin will always be identical to the latest github release, except for the version number, which must be incremented for submission to AMO.</p>
<p>moz-extension://d63582fc-09fc-445a-b8aa-1c888ee2ffc0/toopie.html</p>
</body>
</html>

View File

@@ -1,5 +1,5 @@
var hellot = "hello bittorrent";
var xTransmissionSessionId = ""
var xTransmissionSessionId = "";
function makeid(length) {
var result = "";
@@ -36,7 +36,7 @@ function torrentsend(
body: requestBody // body data type must match "Content-Type" header
};
const response = await fetch(url, opts);
console.log("(torrent-rpc) response", response)
console.log("(torrent-rpc) response", response);
return await response.json(); // parses JSON response into native JavaScript objects
}
@@ -44,7 +44,7 @@ function torrentsend(
"http://" + control_host + ":" + control_port + "/" + control_path + "/",
message
);
/* return postData(
/* return postData(
"http://" + control_host + ":" + control_port + "/" + control_path,
message
);*/
@@ -56,12 +56,12 @@ function sessionStats(
control_port = "7657",
control_path = "transmission/rpc"
) {
var json = new Object();
json["id"] = makeid(6);
json["jsonrpc"] = "2.0";
json["method"] = "session-stats";
//json["params"] = new Object();
return torrentsend(json, control_host, control_port, control_path);
var json = new Object();
json["id"] = makeid(6);
json["jsonrpc"] = "2.0";
json["method"] = "session-stats";
//json["params"] = new Object();
return torrentsend(json, control_host, control_port, control_path);
}
async function GetTorrentToken(
@@ -75,17 +75,17 @@ async function GetTorrentToken(
}
function gettorrenttoken(authtoken) {
console.log(authtoken)
console.log(authtoken);
return authtoken.result.Token;
}
function TorrentDone(result){
console.log("(torrent-rpc) recv", result)
function TorrentDone(result) {
console.log("(torrent-rpc) recv", result);
}
function TorrentError(result){
console.log("(torrent-rpc) recv err", result)
function TorrentError(result) {
console.log("(torrent-rpc) recv err", result);
}
var result = GetTorrentToken()
result.then(TorrentDone, TorrentError)
var result = GetTorrentToken();
result.then(TorrentDone, TorrentError);