Skip to content

Instantly share code, notes, and snippets.

@Shpigford
Created August 25, 2022 00:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shpigford/2b18d6e10b534d0f43591b128b759527 to your computer and use it in GitHub Desktop.
Save Shpigford/2b18d6e10b534d0f43591b128b759527 to your computer and use it in GitHub Desktop.
Arc Boost for blocking distracting sites
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