Last active
June 13, 2017 08:25
-
-
Save matikucharski/541691b88789d6479eddc2f4df6df203 to your computer and use it in GitHub Desktop.
Append dot on every click - useful for debugging bots click locations
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
document.body.addEventListener('click', function(e) { | |
const el = document.createElement('div'); | |
el.style.position = 'absolute'; | |
el.style.top = `${e.pageY - 3}px`; | |
el.style.left = `${e.pageX -3}px`; | |
el.style.height = '6px'; | |
el.style.width = '6px'; | |
el.style.background = 'red'; | |
el.style.zIndex = '10000'; | |
el.style.borderRadius = '50%'; | |
el.style.boxShadow = '0 0 5px 3px yellow'; | |
document.body.appendChild(el); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment