Created
March 27, 2018 05:37
Star
You must be signed in to star a gist
horriblesubs magnet links only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HorribleSubs | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://horriblesubs.info/* | |
// @grant none | |
// ==/UserScript== | |
(self => { | |
function doit() { | |
for (const pxs of document.getElementsByClassName('release-info')) { | |
const res = pxs.getElementsByClassName('linkful'), best = res[res.length-1]; | |
if (!best.dataset.clicked) best.children[0].click(); | |
best.dataset.clicked = 1; | |
for (const px of res) px.hidden = true; | |
for (const link of document.querySelector(`[class~="${best.id}"`).querySelectorAll('.dl-type:not(.hs-magnet-link)')) | |
console.log(link, link.hidden = true); | |
} | |
} | |
self.doit = doit.bind(doit); | |
self.doit.timeout = setTimeout(doit, 4096); | |
Array.from(document.getElementsByClassName('morebox'), e => e.addEventListener('click',()=>setTimeout(doit, 4096))); | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment