Skip to content

Instantly share code, notes, and snippets.

@elado
Last active November 8, 2018 09:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elado/9e56bf8b60cef648d4b2131fe76c0de1 to your computer and use it in GitHub Desktop.
Save elado/9e56bf8b60cef648d4b2131fe76c0de1 to your computer and use it in GitHub Desktop.
STOP ALL GIFS!!!!!! (bookmarklet)
javascript:(function(){function createElement(a,b){var c=document.createElement(a);return b(c),c}function f(a){var e,b=a.width,c=a.height,d=createElement("canvas",function(a){a.width=b,a.height=c}),f=0,g=function(){for(d.getContext("2d").drawImage(a,0,0,b,c),f=0;f<a.attributes.length;f++)e=a.attributes[f],'"'!==e.name&&d.setAttribute(e.name,e.value);d.style.position="absolute",a.parentNode.insertBefore(d,a),a.style.opacity=0};a.complete?g():a.addEventListener("load",g,!0)}function all(){return(new Array).slice.apply(document.images).map(f)}all();})()
@elado
Copy link
Author

elado commented Apr 7, 2016

Based on http://stackoverflow.com/questions/3688460/stopping-gif-animation-programmatically

Made specifically for readers of good content on Medium that is accompanied by annoying distracting headache-giving gifs (please stop using those).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment