Advertisement
ereinion

gmThoughtsAndPrayers

Jun 12th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        thoughts_and_prayers
  3. // @namespace   http://localhost
  4. // @description Changes Thoughts and Prayers to Hypocritical Platitudes
  5. // @include     *
  6. // @version     1
  7. // @grant       none
  8. // ==/UserScript==
  9.  
  10. textNodes = document.evaluate("//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  11. var searchRE1 = new RegExp('Thoughts and Prayers','gi');
  12. var replace1 = 'Hypocritical Platitudes';
  13. for (var i=0;i<textNodes.snapshotLength;i++) {
  14.     var node = textNodes.snapshotItem(i);
  15.     node.data = node.data.replace(searchRE1, replace1);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement