I have a google chrome extension. I'm trying to override the client's geolocation.
Previously, this code worked. However it's no longer working
window.navigator.geolocation.getCurrentPosition = function(success, failure, options) {
const lat = parseFloat(localStorage.getItem("localLat"));
const long = parseFloat(localStorage.getItem("localLong"));
success({ coords: {
latitude: lat,
longitude: long,
}, timestamp: Date.now() });
}
I'm wondering if there is a way to get geolocation to work via a google chrome extension anymore or not?