diff --git a/data/replacer.js b/data/replacer.js index ecddf9d..5577227 100644 --- a/data/replacer.js +++ b/data/replacer.js @@ -1 +1,4 @@ -document.body.innerHTML = document.body.innerHTML.replace(/trump/g, 'drumpf').replace(/Trump/g, 'Drumpf'); \ No newline at end of file +var textNode, walk=document.createTreeWalker(document,NodeFilter.SHOW_TEXT,null,false); +while(textNode=walk.nextNode()) { + textNode.nodeValue = textNode.nodeValue.replace(/trump/g, 'drumpf').replace(/Trump/g, 'Drumpf'); +} \ No newline at end of file diff --git a/package.json b/package.json index f0082c3..bc15b79 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "title": "Drumpfinator", - "name": "Drumpfinator", - "version": "0.0.1", + "title": "Drumpfinator Make Trump Drumpf Again", + "name": "drumpfinator_trump", + "version": "0.0.2", "description": "Add this to your browser and replace all instances of Trump with Drumpf.", "main": "index.js", "author": "Nishanth Vijayan",