Last active
August 29, 2015 14:26
-
-
Save at1as/11f72dad884b3f94e616 to your computer and use it in GitHub Desktop.
Federal Election Deobfuscater
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
/* Paste into your browser console to replace all instances in FaceBook of big 3 Canadian political parties | |
with "Big Government Party" and their leaders with "Big Government Politician" */ | |
function traverseDOM(node, func) { | |
func(node); | |
node = node.firstChild; | |
while (node) { | |
traverseDOM(node, func); | |
node = node.nextSibling; | |
} | |
} | |
traverseDOM(document.body, function(node) { | |
if (node.tagName == "P" || node.tagName == "SPAN") { | |
node.innerHTML = node.innerHTML.replace(/NDP/gi, "Big Government Party").replace(/Liberals?/gi, "Big Government Party").replace(/Conservatives?/gi, "Big Government Party").replace(/Trudeau/gi, "Big Government Politician").replace(/Mulcair/gi, "Big Government Politician").replace(/Harper/gi, "Big Government Politician"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment