Skip to content

Instantly share code, notes, and snippets.

@wartron
Created August 6, 2017 04:36
Show Gist options
  • Save wartron/da523bbcb50df51ef0ea693d29846c1e to your computer and use it in GitHub Desktop.
Save wartron/da523bbcb50df51ef0ea693d29846c1e to your computer and use it in GitHub Desktop.
javscript console snippet to quickly hide dom stuff (useful for screenshots)
window.click_hide = true
window.click_hide_last = false
document.addEventListener("click", function( e ) {
if(window.click_hide){
console.log(e.target);
window.click_hide_last = e.target;
window.click_hide_last.style.display = "none";
e.preventDefault();
}
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment