Skip to content

Instantly share code, notes, and snippets.

@deejayy
Last active October 11, 2024 11:28
Show Gist options
  • Save deejayy/d6b01e5c294c28757f011178a13ba534 to your computer and use it in GitHub Desktop.
Save deejayy/d6b01e5c294c28757f011178a13ba534 to your computer and use it in GitHub Desktop.
javascript:(() => { const ignoredWords = /Formula.?1|%C3%81zsia Expressz|Boyard|X-Faktor|Sztarbox|MotoGP|Sztarban.sztar|Megasztar|Kisertes|ValoVilag|Azsia.express|Az.arulok|orokosok|House.of.the.Dragon/i; const weigths = { xvid_hun: 500, xvid: 500, dvd_hun: 500, dvd: 500, dvd9_hun: 500, dvd9: 500, hd_hun: 500, hd: 500, xvidser_hun: 300, xvidser: 300, dvdser_hun: 300, dvdser: 300, hdser_hun: 300, hdser: 300, }; document.querySelectorAll('.box_torrent').forEach((box) => { box.removeAttribute('hidden'); const category = box.querySelector('.box_alap_img a').getAttribute('href').match(/tipus=(.*)?/)[1]; const title = box.querySelector('.torrent_txt a')?.getAttribute('title'); const popularity = box.querySelector('.box_d2').innerText.length; const uploadDate = box.querySelector('.box_feltoltve2').innerText; const seeders = parseInt(box.querySelector('.box_s2').innerText, 10) + Math.log2((new Date() - new Date(uploadDate).getTime()) / 1000 / 60 / 60); if ((seeders < (weigths[category] ?? 300) && popularity < 3) || title.match(ignoredWords)) { box.setAttribute('hidden', 1); } }); })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment