Skip to content

Instantly share code, notes, and snippets.

@JAffleck
Created April 18, 2024 14:24
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 JAffleck/8e63ccbb04ef296d41cee7d2345e122d to your computer and use it in GitHub Desktop.
Save JAffleck/8e63ccbb04ef296d41cee7d2345e122d to your computer and use it in GitHub Desktop.
PrintMe - Image remover, and table row/cell background clearer to save ink
// To use this bookmarklet just urlencode this, and remove the comment lines, create a new bookmark and copy this into the url
javascript:(function(){
//remove image elems
for (let i= document.images.length; i-->0;)
document.images[i].parentNode.removeChild(document.images[i]);
// make TR and TD elems background white
let tableElems = document.querySelectorAll('tr, td');
for(let i=0; i<tableElems.length;i++)
tableElems[i].style.backgroundColor='white';})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment