Skip to content

Instantly share code, notes, and snippets.

@matikucharski
Last active June 13, 2017 08:25
Show Gist options
  • Save matikucharski/541691b88789d6479eddc2f4df6df203 to your computer and use it in GitHub Desktop.
Save matikucharski/541691b88789d6479eddc2f4df6df203 to your computer and use it in GitHub Desktop.
Append dot on every click - useful for debugging bots click locations
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