Created
August 14, 2019 13:13
-
-
Save hu0p/d3c3bdd457d4b765c361c98cb6d4dd27 to your computer and use it in GitHub Desktop.
Disable navigation for all clicks on a page. This is useful for testing analytics tracking. Copy/paste in JS console
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
Array.from(document.querySelectorAll('a')).map( el => el.addEventListener("click", e => e.preventDefault())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment