Created
December 16, 2019 18:44
-
-
Save roger-mo-gusto/f7e091d33fe9eb1e376b4c162139bd2e to your computer and use it in GitHub Desktop.
2SHANEZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
const ELEMENT_NODE = 1; | |
const TEXT_NODE = 3; | |
// https://stackoverflow.com/a/34559316 | |
function walkText(node) { | |
if (node.nodeType == TEXT_NODE) { | |
node.data = node.data.replace(/(?<=[ \t]|(?:^|\"|\-|\=|(?:[.!?]\s)))(Sean|sean)(?=([ \t]|\.|\'||\-|\=|\"|\?|\/|\,))/g, "Shane"); | |
} else if (node.nodeType == ELEMENT_NODE && node.nodeName != "SCRIPT") { | |
for (var i = 0; i < node.childNodes.length; i++) { | |
walkText(node.childNodes[i]); | |
} | |
} | |
} | |
walkText(document.body); | |
document.title = document.title.replace(/(?<=[ \t]|(?:^|\"|\-|\=|(?:[.!?]\s)))(Sean|sean)(?=([ \t]|\.|\'||\-|\=|\"|\?|\/|\,))/g, "Shane"); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "2Shanez", | |
"version": "1.0", | |
"description": "Sean 2 Shane", | |
"manifest_version": 2, | |
"persistent": false, | |
"content_scripts": [ | |
{ | |
"matches": [ | |
"<all_urls>" | |
], | |
"js": [ | |
"background.js" | |
], | |
"run_at": "document_end" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment