Skip to content

Instantly share code, notes, and snippets.

@EliseWei
Created February 12, 2018 08:11
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 EliseWei/b725bfb715fc546746f827c517d2f82c to your computer and use it in GitHub Desktop.
Save EliseWei/b725bfb715fc546746f827c517d2f82c to your computer and use it in GitHub Desktop.
Nuke the images, contrast, and mouse events on a page.
const doNothing = (event) => { event.preventDefault(); event.stopPropagation(); return false; };
window.onmousewheel = doNothing;
let ss = document.createElement('style');
ss.innerHTML = "body {-webkit-filter: blur(1px) contrast(.8) grayscale(1); pointer-events: none;}";
ss.innerHTML += "* {background-image: none !important}";
ss.innerHTML += "img, svg {opacity: 0 !important;}";
ss.innerHTML += "::-webkit-scrollbar {display: none}";
ss.innerHTML += ":focus {border: dotted 2px blue !important; outline: dotted 2px blue !important;}";
let head = document.getElementsByTagName('head')[0];
head.appendChild(ss);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment