Skip to content

Instantly share code, notes, and snippets.

@segdeha
Created November 27, 2018 23:55
Show Gist options
  • Save segdeha/cb1744f747ede30c6108a6628da3d820 to your computer and use it in GitHub Desktop.
Save segdeha/cb1744f747ede30c6108a6628da3d820 to your computer and use it in GitHub Desktop.
Make web pages less annoying by removing most videos and ads as well as elements set to `position: fixed`
javascript:(function(){Array.from(document.querySelectorAll('.canvas-yahoovideo,iframe,video')).forEach(video=>video.parentNode.removeChild(video));Array.from(document.querySelectorAll('*')).filter(node=>window.getComputedStyle(node).position==='fixed').forEach(node=>node.style.display='none');}());
@segdeha
Copy link
Author

segdeha commented Nov 27, 2018

Use this by creating a bookmarklet with the above script as the URL.

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