Created
January 19, 2010 23:25
-
-
Save savetheclocktower/281423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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