From 48ea86c536680ccf105164467b8c01af7a21643d Mon Sep 17 00:00:00 2001 From: hanad Date: Thu, 25 Sep 2025 14:08:25 +0200 Subject: [PATCH] =?UTF-8?q?main/content=5Fscript=5Fgemini.js=20gel=C3=B6sc?= =?UTF-8?q?ht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/content_script_gemini.js | 50 ----------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 main/content_script_gemini.js diff --git a/main/content_script_gemini.js b/main/content_script_gemini.js deleted file mode 100644 index b4a60dc..0000000 --- a/main/content_script_gemini.js +++ /dev/null @@ -1,50 +0,0 @@ -/* window.addEventListener("load", function() { - document.getElementById("clickMe2").addEventListener("click", border); -}); */ - -/*function border() - {alert("elias müllbot")}; */ - -function highlight(){ - - /* const ding = document.getElementById("topTitle"); - ding.style.textDecoration = "underline"; - ding.style.textDecorationColor = "red"; - - const etwas = document.getElementById("personName"); - etwas.style.textDecoration = "underline"; - etwas.style.textDecorationColor = "red"; - // const texts = document.querySelectorAll('*'); */ - - - const listOfElements = document.querySelectorAll("*"); - console.log(listOfElements); - console.log("hallo"); - - - for(let elementNumber = 0; elementNumber <= listOfElements.length; elementNumber ++){ //für alle Elemente der Seite - tag = listOfElements[elementNumber]; //tag ist das Element, das gewählt ist - - console.log(elementNumber, tag); - - if (tag){ - - const hasChildren = tag.children.length > 0; - const elementText = tag.textContent ? tag.textContent.trim(): " "; - const hasText = elementText.length > 0; - - if (hasChildren != true && hasText == true){ - - const targetWord = "die" || "Du" || "funktion"; - let originalHTML = tag.innerHTML; //den ursprünglichen HTML-Inhalt speichern - - const regex = new RegExp(`\\b${targetWord}\\b`, 'gi'); - tag.innerHTML = originalHTML.replace(regex, `$&`); - } - } - } - - -} - -highlight(); \ No newline at end of file