Falsify GPS location to protect privacy, or to provide a virtual location sensor device. This script should either be be configured for specific sites only, or for all sites but excludes some specific sites.
< Feedback em Fake GPS Location
Please do not rely on TamperMonkey's syntax checker. Its syntax checker is either from an old library version, or it is not properly configured. TamperMonkey has that problem for quite a long time which the author doesn't bother to fix (sic). It is one of the several reasons why I switched to ViolentMonkey.
You can test the script at below MDN page. Make sure you've changed at least the defaultLatitude
and/or defaultLongitude
variables to something else (rather than leaving them to zeroes), before loading the page. Retest again with other values to see it actually work. It'd be a best result if your computer actually has a GPS device, so that you can really tell the difference.
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API/Using_the_Geolocation_API#result
Or you can try testing it using Google Maps. Simply click the "scope" icon at the bottom-right of the page, to make it show your (fake) location.
Does the reason for not letting me get the benefit of your script come from my ISP?
GPS is mainly used for maps. It's not used for region locked content.
While running a syntax check, I got an error as per the enclosed snapshot. Could you please check?
Thank you