From 52da62dcd3ed3774760ee28c7b3e124b4536fbfa Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 22 Jan 2020 20:15:56 -0500 Subject: [PATCH] update the links inside the homepage. The plugin hosts it's own official homepage. How's that for distributed. --- home.html | 2 +- index.html | 2 -- torrent/torrent.js | 32 ++++++++++++++++---------------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/home.html b/home.html index 0d1cc43..14f0b59 100644 --- a/home.html +++ b/home.html @@ -10,7 +10,7 @@ - +
diff --git a/index.html b/index.html index b3cac60..c02d12e 100644 --- a/index.html +++ b/index.html @@ -195,7 +195,5 @@

Android addons.mozilla.org(Temporarily Disabled)

If you would prefer to recieve automatic updates from AMO, the correct product page for this plugin is I2P In Private Browsing. 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.

- -

moz-extension://d63582fc-09fc-445a-b8aa-1c888ee2ffc0/toopie.html

diff --git a/torrent/torrent.js b/torrent/torrent.js index eaf36e9..3b5bf50 100644 --- a/torrent/torrent.js +++ b/torrent/torrent.js @@ -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) \ No newline at end of file +var result = GetTorrentToken(); +result.then(TorrentDone, TorrentError);