Skip to content

Commit

Permalink
added tracker servers lists via &tr param
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifailon authored Jun 3, 2024
1 parent 8f64b85 commit f7fd72c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
else {
var magnet = "magnet:?xt=urn:btih:" + hashValue
if (magnet.includes("&tr")) {
window.location.href = addTracker(magnet.split('&tr')[0])
magnet = magnet.split('&tr')[0]
var magnetTrackerServerList = addTrackerServerList(magnet)
window.location.href = magnetTrackerServerList
}
else {
window.location.href = magnet
Expand All @@ -24,7 +26,7 @@
messageElement.innerHTML = "For redirect to the default torrent client, pass the info hash or magnet link in the address bar after the # symbol"
}
}
function addTracker(infoHash) {
function addTrackerServerList(infoHash) {
var trackers = [
"wss://tracker.btorrent.xyz",
"wss://tracker.openwebtorrent.com",
Expand Down Expand Up @@ -66,4 +68,4 @@
If you were not automatically redirected, <a id="redirectLink" href="#">click here</a>.
</div>
</body>
</html>
</html>

0 comments on commit f7fd72c

Please sign in to comment.