Skip to content

Instantly share code, notes, and snippets.

@arkarkark
Created September 15, 2019 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arkarkark/5b36e92f77c79dd920ee8a6c4c5325a0 to your computer and use it in GitHub Desktop.
Save arkarkark/5b36e92f77c79dd920ee8a6c4c5325a0 to your computer and use it in GitHub Desktop.
A Chrome extension to stop you visiting certain websites
window.onload = () => {
while (document.body.firstElementChild) {
document.body.removeChild(document.body.firstElementChild)
}
document.body.style.textAlign = "center"
document.body.style.lineHeight = "100vh"
document.body.style.fontSize = "50vw"
document.body.appendChild(document.createTextNode("NO!"))
}
{
"description": "Block visiting certain sites",
"manifest_version": 2,
"name": "Block Website",
"version": "0.4",
"content_scripts": [
{
"js": [
"content.js"
],
"matches": [
"https://foxnews.com/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment