Skip to content

Instantly share code, notes, and snippets.

View douglashsilva's full-sized avatar
❤️
Viva Intensamente.

Douglas Henrique douglashsilva

❤️
Viva Intensamente.
View GitHub Profile
@douglashsilva
douglashsilva / search_magnet.js
Last active October 24, 2022 12:32
Search for all hidden magnet on torrent blocking pages | Obs: Only run on the console where the page is with torrent blocking
// Search for all hidden Torrent Magnet URL on pages
function searchAllMagnet(){
// Search Torrent Magnet URL on Attributes
function searchMagnet(dom){
let trim = (str) => String(str).toString().trim(), magnet = [], regex = /^magnet\:\?.*$/gim
dom = trim(dom)
if(dom.textContent && regex.test(dom)) magnet.push(dom.textContent)
Array.from(dom.attributes)
.filter((value) => regex.test(trim(value)))