Skip to content

Instantly share code, notes, and snippets.

@that4chanwolf
Created February 10, 2014 18:40
Show Gist options
  • Save that4chanwolf/8921631 to your computer and use it in GitHub Desktop.
Save that4chanwolf/8921631 to your computer and use it in GitHub Desktop.
Cloud2butt
// ==UserScript==
// @name Cloud2Butt
// @include *
// ==/UserScript==
(function() {
var textnodes = document.evaluate("//body//text()[not(ancestor::script) and not(ancestor::style)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),
node, text;
for(var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);
text = node.data;
text = text.replace(/the cloud/i, "my butt");
text = text.replace(/cloud computing/i, "butt computing");
text = text.replace(/cloud-savvy/i, "butt-savy");
text = text.replace(/cloud-related/i, "butt related");
text = text.replace(/cloud tech/i, "butt tech");
node.data = text;
}
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment