This is a challenge for frontend developers. Test your DOM manipulation and CSS skills.
Create two functions,
addBlocker()
- Should block all clicks on the page. Nothing should be clickable anymore.
- Should print the current mouse position on viewport, and the current element under the mouse on click.
removeBlocker()
- Should remove the blocker created by addBlocker(), everything should be clickable as before adding the blocker.
The two functions should work on any website including, dev.to and producthunt.com
Here is a video preview of what should be done.
Share your code in the comment section or in a github gist.
Good luck!