Commit 5e34e616 authored by Simon Welsh's avatar Simon Welsh

Add trumble greasemonkey script

parents
// ==UserScript==
// @name Trumble
// @namespace https://git.simon.geek.nz/simon_w/scripts
// @description Turns Turnbull into Trumble
// @include *
// @version 1
// @grant none
// ==/UserScript==
setInterval(function() {
var snapTextElements = document.evaluate("//text()[" +
"not(ancestor::script) and not(ancestor::style) and " +
"contains(translate(., 'TURNBL', 'turnbl'), 'turnbull')]",
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = snapTextElements.snapshotLength - 1; i >= 0; i--) {
var elmText = snapTextElements.snapshotItem(i);
var text = elmText.nodeValue.replace(/(t)urnbull/ig, '$1rumble');
elmText.parentNode.replaceChild(document.createTextNode(text), elmText);
}
}, 1000);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment