Last active
June 22, 2018 19:20
-
-
Save Ascor8522/2165b250826c02f3abfd2b3163d15db2 to your computer and use it in GitHub Desktop.
Replaces all occurences of "Manu" by "Manu"
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 Manu | |
// @author Smrman | |
// @description Replaces all the occurences of "Emmanuel Macron" by "Manu" | |
// @version 0.1 | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.onload = manu(["Emmanuel Macron", "Monsieur le président", "le président de la République", "Macron"]); | |
})(); | |
function manu(tabl) { | |
for(var mot of tabl) { | |
while(document.getElementsByTagName("body")[0].innerHTML.search(mot) > 0) { | |
document.getElementsByTagName("body")[0].innerHTML = document.getElementsByTagName("body")[0].innerHTML.replace(mot, "Manu"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment