Skip to content

Instantly share code, notes, and snippets.

@darrenscerri
Created February 15, 2014 13:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenscerri/9019209 to your computer and use it in GitHub Desktop.
Save darrenscerri/9019209 to your computer and use it in GitHub Desktop.
Bookmarklet to add an element to the page which displays cursor coordinates
javascript:(function() {
var div = document.createElement('div');
div.style.cssText = 'position:fixed;bottom:10px;right:10px;padding: 4px 8px;border: 1px solid black;z-index:99';
document.body.appendChild(div);
document.onmousemove = function(e) {
div.innerHTML = e.clientX + ' : ' + e.clientY;
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment