// ==UserScript==
// @name thoughts_and_prayers
// @namespace http://localhost
// @description Changes Thoughts and Prayers to Hypocritical Platitudes
// @include *
// @version 1
// @grant none
// ==/UserScript==
textNodes = document.evaluate("//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var searchRE1 = new RegExp('Thoughts and Prayers','gi');
var replace1 = 'Hypocritical Platitudes';
for (var i=0;i<textNodes.snapshotLength;i++) {
var node = textNodes.snapshotItem(i);
node.data = node.data.replace(searchRE1, replace1);
}
Comments