diff --git a/README.md b/README.md new file mode 100644 index 0000000..2319b61 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +

Remove theme-color

+ +

Hey 👋

+ +Are you sick of websites that have garish colors? Get rid of the clutter and enjoy a cleaner, distraction-free browsing experience with Remove Theme Color! This Chrome extension (complies with manifest v3) automatically identifies and removes meta name=theme-color from websites, giving you a simple, elegant look with no extra effort. + +With this extension, you won't have to worry about being distracted by bright and loud colors on any website you visit. So why not try it out today? Install the Chrome extension now for a faster, cleaner online journey! You can use it in Kiwi Browser on Android. + +1. Download the .zip file From where? +2. load it in your browser. But how? + +Made with ❤️ by thegravity98. \ No newline at end of file diff --git a/contentscripts.js b/contentscripts.js new file mode 100644 index 0000000..4145146 --- /dev/null +++ b/contentscripts.js @@ -0,0 +1,28 @@ +setTimeout(() => { + var interval; + var mtc = document.querySelector("meta[name=theme-color]"); + let themecolor; + + if (mtc === null) { + console.log("theme-color absent"); + } + else { + console.log("theme-color present"); + interval = setInterval(() => { + var mtc_fix = document.querySelector("meta[name=theme-color]"); + if (mtc_fix === null) { + return; + } + else { + themecolor = mtc_fix.getAttribute("content"); + console.log("Website theme-color: " + themecolor); + mtc_fix.remove(); + console.log("Element was removed"); + } + }, 100); + } + + setTimeout(() => { + clearInterval(interval); + }, 4500); +}, 0); \ No newline at end of file diff --git a/icon 128.png b/icon 128.png new file mode 100644 index 0000000..70f275b Binary files /dev/null and b/icon 128.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..70bf671 --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "manifest_version": 3, + "name": "Remove theme-color", + "description": "Remove from all websites", + "version": "13.1.2023", + "icons": { + "128": "icon 128.png" + }, + "content_scripts": [ + { + "matches": [ + "" + ], + "js": [ + "contentscripts.js" + ], + "run_at": "document_start" + } + ] +} \ No newline at end of file