Created
October 19, 2018 19:10
-
-
Save JeffOwOSun/96ebb737715eb76d40d0147156a8ff0b to your computer and use it in GitHub Desktop.
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 New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://www.liuli.eu/wp/ | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const regex = /[a-zA-Z0-9]*/gi | |
for (let e of document.querySelectorAll('article > div.entry-content > p')) { | |
// console.log(e.innerHTML) | |
e.innerHTML.replace(regex, 'magnet:?xt=urn:btih:$&'); | |
} | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment