Skip to content

Instantly share code, notes, and snippets.

@savetheclocktower
Created January 19, 2010 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save savetheclocktower/281423 to your computer and use it in GitHub Desktop.
Save savetheclocktower/281423 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Mock Geolocation
// @description MONKEYS!
// @version 2009-01-19
// @namespace http://andrewdupont.net/greasemonkey
// @include *
// ==/UserScript==
// Mock geolocation. Ugh.
if (!('geolocation' in navigator)) {
navigator.geolocation = {
watchPosition: function(success, failure, options) {
var position = {
coords: {
latitude: 30.2696384,
longitude: -97.74947,
},
accuracy: 10000
};
success(position);
window.setInterval(function() {
success(position);
}, 10000);
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment