Skip to content

Instantly share code, notes, and snippets.

@arkarkark
Created Sep 15, 2019
Embed
What would you like to do?
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