0
scriptMonkey_site_blocker.js
82 lines 2.1 kB view raw
1// ==UserScript== 2// @name Block Distracting Sites 3// @namespace local.site-blocker 4// @version 1.2 5// @description Blocks distracting sites 6// @run-at document-start 7// @noframes 8// @grant none 9 10// @match *://*.reddit.com/* 11// @match *://reddit.com/* 12// @match *://*.redd.it/* 13// @match *://redd.it/* 14 15// @match *://*.facebook.com/* 16// @match *://facebook.com/* 17// @match *://*.fb.com/* 18// @match *://fb.com/* 19// @match *://*.messenger.com/* 20// @match *://messenger.com/* 21 22// @match *://*.instagram.com/* 23// @match *://instagram.com/* 24// @match *://*.threads.net/* 25// @match *://threads.net/* 26 27// @match *://*.twitter.com/* 28// @match *://twitter.com/* 29// @match *://*.x.com/* 30// @match *://x.com/* 31// @match *://*.t.co/* 32// @match *://t.co/* 33 34// @match *://news.ycombinator.com/* 35// @match *://*.hnrss.org/* 36// @match *://hnrss.org/* 37 38// @match *://*.tiktok.com/* 39// @match *://tiktok.com/* 40// @match *://*.youtube.com/* 41// @match *://youtube.com/* 42// @match *://*.youtu.be/* 43// @match *://youtu.be/* 44// @match *://*.linkedin.com/* 45// @match *://linkedin.com/* 46// @match *://*.pinterest.com/* 47// @match *://pinterest.com/* 48// @match *://*.tumblr.com/* 49// @match *://tumblr.com/* 50// ==/UserScript== 51 52(() => { 53"use strict"; 54 55document.documentElement.innerHTML = ` 56 <head> 57 <title>Blocked</title> 58 <style> 59 body { 60 margin: 0; 61 height: 100vh; 62 display: grid; 63 place-items: center; 64 font-family: system-ui, sans-serif; 65 background: #111; 66 color: #eee; 67 } 68 main { text-align: center; } 69 h1 { font-size: 32px; margin: 0 0 8px; } 70 p { color: #aaa; margin: 0; } 71 </style> 72 </head> 73 <body> 74 <main> 75 <h1>Blocked</h1> 76 <p>${location.hostname}</p> 77 </main> 78 </body> 79`; 80 81window.stop(); 82})();