Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Angry Birds Cursor Position
// ==UserScript==
// @name Angry Birds Cursor Position
// @description Tells you the exact position of the cursor while on Angry Birds
// @include
// @author Royal Flush
// ==/UserScript==
Based on code by C. Peter Chen, available at:
var boxes = document.createElement('tr');
boxes.innerHTML = '<tr><td colspan="2">X: <input type="text" id="cursorX"> Y: <input type="text" id="cursorY"></td><br />&nbps;<br /></tr>';
var table = document.getElementsByTagName('tbody')[0]; table.insertBefore(boxes, table.childNodes[0]);
function init() {
document.onmousemove = getCursorXY;
function getCursorXY(e) {
document.getElementById('cursorX').value = e.pageX
document.getElementById('cursorY').value = e.pageY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment