Created
August 25, 2022 00:18
-
-
Save Shpigford/2b18d6e10b534d0f43591b128b759527 to your computer and use it in GitHub Desktop.
Arc Boost for blocking distracting sites
This file contains 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
const domains = ['cnn.com']; | |
const content = 'Nope!'; | |
if (domains.includes(window.location.hostname.replace('www.',''))) { | |
document.body.style.backgroundColor = 'red'; | |
document.body.style.color = 'white'; | |
document.body.style.textAlign = 'center'; | |
document.body.style.fontWeight = 'bold'; | |
document.body.style.fontFamily = 'sans-serif'; | |
document.body.style.textTransform = 'uppercase'; | |
document.body.style.paddingTop = '30%'; | |
document.body.style.fontSize = '60px'; | |
document.getElementsByTagName('body')[0].innerHTML = content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment