Skip to content

Instantly share code, notes, and snippets.

@JohnMarkT
Created March 1, 2021 14:30
Show Gist options
  • Save JohnMarkT/364775e31dc35eb6ed305cd422bc877f to your computer and use it in GitHub Desktop.
Save JohnMarkT/364775e31dc35eb6ed305cd422bc877f to your computer and use it in GitHub Desktop.
Bookmarklet to delete distracting and annoying elements from web page
((j,b)=>{j.t=!j.t;const f=j.t?b.addEventListener:b.removeEventListener;console.log('remove mode %s',j.t?'on':'off');j.rE=j.rE||(({target:el})=>{console.log('removing:',el);el.parentNode.removeChild(el);});f('click',j.rE);})(window.JMT=window.JMT||{},document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment