Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==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
You can’t perform that action at this time.