Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function showClientCoords(win, x, y, timeout=1000) {
- let d = win.document.createElement("div");
- d.style.width = "10px";
- d.style.height = "10px";
- d.style.borderRadius = "5px";
- d.style.backgroundColor = "red";
- d.style.position = "fixed";
- d.style.top = (y + 5) + "px";
- d.style.left = (x + 5) + "px";
- win.document.documentElement.appendChild(d);
- win.setTimeout(function() {
- d.remove();
- }, timeout);
- }
Add Comment
Please, Sign In to add comment