Created
August 6, 2017 04:36
-
-
Save wartron/da523bbcb50df51ef0ea693d29846c1e to your computer and use it in GitHub Desktop.
javscript console snippet to quickly hide dom stuff (useful for screenshots)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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