Skip to content

Instantly share code, notes, and snippets.

@tuff
Last active August 8, 2023 09:21
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tuff/97f822477d7e49b6a9631490d8a6c07f to your computer and use it in GitHub Desktop.
Save tuff/97f822477d7e49b6a9631490d8a6c07f to your computer and use it in GitHub Desktop.
(function() {
var CLASS = 'hide-images';
var STYLE = 'html body,html body *,html body *::before,html body *::after { background-image: none !important; } html body img,html body iframe { opacity: 0.02 !important; }';
var block = document.querySelector('.' + CLASS);
// add/remove style block to override images
if (block) block.remove();
else {
block = document.createElement('style');
block.className = CLASS;
block.innerHTML = STYLE;
document.head.appendChild(block);
}
})();
/////////////////////////
javascript:(function(){var a="hide-images",b="html body,html body *,html body *::before,html body *::after { background-image: none !important; } html body img,html body iframe { opacity: 0.02 !important; }",c=document.querySelector("."+a);c?c.remove():(c=document.createElement("style"),c.className=a,c.innerHTML=b,document.head.appendChild(c))})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment