Skip to content

Instantly share code, notes, and snippets.

@edtz
Created September 3, 2018 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edtz/056b04167ddd4f773651e43da6302586 to your computer and use it in GitHub Desktop.
Save edtz/056b04167ddd4f773651e43da6302586 to your computer and use it in GitHub Desktop.
torrentz2 download bookmarklet
javascript:(function(){const block = document.querySelector("div.trackers");const hash = block.querySelector("h2").textContent.split(" ").reverse()[0];const trackers = Array.from(document.querySelectorAll("div.trackers dt")).map(el => el.textContent);location.href = `magnet:?xt=urn:btih:${hash}${trackers.map(tr => "&tr=" + tr).join()}`;})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment