Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Spoof Intl Locale and Time Zone
- // @namespace https://greasyfork.org/en/users/85671-jcunews
- // @version 1.0.1
- // @license AGPLv3
- // @author jcunews
- // @description .
- // @match *://*/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- (ro => {
- //=== CONFIGURATION BEGIN ===
- //All should be valid values. Otherwise websites may choke.
- let fakeLocale = "en-GB";
- let fakeTimezone = "Europe/London";
- //=== CONFIGURATION BEGIN ===
- ro = Intl.DateTimeFormat.prototype.resolvedOptions;
- Intl.DateTimeFormat.prototype.resolvedOptions = function() {
- let res = ro.apply(this, arguments);
- res.locale = fakeLocale;
- res.timeZone = fakeTimezone;
- return res;
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement