From e158f3a584c2a77f5e0d6184929274045118ae6a Mon Sep 17 00:00:00 2001 From: Joe Lollo <53008442+ChessPiece21@users.noreply.github.com> Date: Tue, 31 Aug 2021 13:27:40 -0700 Subject: [PATCH] Delete script.js --- script.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 script.js diff --git a/script.js b/script.js deleted file mode 100644 index 1141520..0000000 --- a/script.js +++ /dev/null @@ -1,30 +0,0 @@ -chrome.extension.sendMessage({}, function(response) { - var readyStateCheckInterval = setInterval(function() { - if (document.readyState === "complete") { - clearInterval(readyStateCheckInterval); - - main(); - } - }, 10); - - function main() { - // Replace page title - document.title = generateReplacment(document.title); - - // Get all text nodes to check - var textNodes = $('body *').contents().filter(function() { - return this.nodeType == Node.TEXT_NODE; - }); - - // Replace all text nodes - textNodes.each(function(index, textNode) { - textNode.nodeValue = generateReplacment(textNode.nodeValue); - }); - } - - function generateReplacment(text) { - var regex1 = /algebra/gi; - return text.replace(regex1, getName()).replace("algebra", "Al-Jazeera"); - } - -}); \ No newline at end of file