Skip to content

Instantly share code, notes, and snippets.

@JDMcKinstry
Created April 25, 2012 15:09
Show Gist options
  • Select an option

  • Save JDMcKinstry/2490456 to your computer and use it in GitHub Desktop.

Select an option

Save JDMcKinstry/2490456 to your computer and use it in GitHub Desktop.
Simple code snippet to add a .position func to the window object
if (!window.position) {
window.position = function() {
return (navigator.appName.toLowerCase().indexOf("explorer") >= 0) ? { x: window.screenLeft, y: window.screenTop } : { x: window.screenX, y: window.screenY };
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment