Skip to content

Instantly share code, notes, and snippets.

@bradland
Forked from jiaaro/sub.js
Last active December 27, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradland/7372422 to your computer and use it in GitHub Desktop.
Save bradland/7372422 to your computer and use it in GitHub Desktop.
javascript:function replace(e){e=e.replace(/witnesses/gi,"dudes I know");e=e.replace(/allegedly/gi,"kinda probably");e=e.replace(/new study/gi,"tumblr post");e=e.replace(/rebuild/gi,"avenge");e=e.replace(/space/gi,"spaaace");e=e.replace(/google glass/gi,"virtual boy");e=e.replace(/smartphone/gi,"pokédex");e=e.replace(/electric/gi,"atomic");e=e.replace(/senator/gi,"elf-lord");e=e.replace(/car/gi,"cat");e=e.replace(/election/gi,"eating contest");e=e.replace(/congressional leaders/gi,"river spirits");e=e.replace(/homeland security/gi,"homestar runner");e=e.replace(/could not be reached for comment/gi,"is guilty and everyone knows it");return e}function replace_all_on_page(){function e(t){if(t.childNodes.length>0)for(var n=0;n<t.childNodes.length;n++)e(t.childNodes[n]);if(t.nodeType==Node.TEXT_NODE){window.el=t;t.textContent=replace(t.textContent)}}var t=document.getElementsByTagName("html")[0];e(t)}replace_all_on_page()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment