diff --git a/Extension/COVID_RAINBOW/manifest.json b/Extension/COVID_RAINBOW/manifest.json new file mode 100644 index 0000000..9b81f63 --- /dev/null +++ b/Extension/COVID_RAINBOW/manifest.json @@ -0,0 +1,12 @@ +{ + "manifest_version" :2, + "name" : "Coronavirus Immunity", + "version": "0.1.0", + "content_scripts": [ + { + "matches": [""], + "js": ["script.js"], + "css":["styles.css"] + } + ] +} diff --git a/Extension/COVID_RAINBOW/script.js b/Extension/COVID_RAINBOW/script.js new file mode 100644 index 0000000..1260617 --- /dev/null +++ b/Extension/COVID_RAINBOW/script.js @@ -0,0 +1,16 @@ +replaceText(document.body) + + +function replaceText(element){ + if(element.hasChildNodes()){ + element.childNodes.forEach(replaceText) + } + else if(element.nodeType == Text.TEXT_NODE){ + if(element.textContent.match(/coronavirus/gi)) + { + const newElement = document.createElement('span') + newElement.innerHTML = element.textContent.replace(/(coronavirus)/gi,'$1') + element.replaceWith(newElement) + } + } +} \ No newline at end of file diff --git a/Extension/COVID_RAINBOW/styles.css b/Extension/COVID_RAINBOW/styles.css new file mode 100644 index 0000000..d39ef93 --- /dev/null +++ b/Extension/COVID_RAINBOW/styles.css @@ -0,0 +1,30 @@ +.rainbow { + animation : rainbow 600ms; + animation-iteration-count: infinite; + +} + +@keyframes rainbow { + + 0%{ + color: red; + } + 15%{ + color: orange; + } + 30%{ + color: yellow; + } + 45%{ + color: green; + } + 60%{ + color: blue; + } + 75%{ + color:indigo; + } + 90%{ + color: violet; + } +}