您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Set a fake date in your browser globally using Tampermonkey
// ==UserScript== // @name Fake Date // @namespace fake-date-script // @version 1.2 // @description Set a fake date in your browser globally using Tampermonkey // @match http://*/* // @match https://*/* // @grant none // @run-at document-start // @license MIT // ==/UserScript== (function() { 'use strict'; const fakeDateValue = '2025-04-10T00:00:00.000Z'; const fakeDate = new Date(fakeDateValue); const fakeTimestamp = fakeDate.getTime(); const baseTime = Date.now(); // Capture the real time when script loads const timeDifference = fakeTimestamp - baseTime; const OriginalDate = Date; function FakeDate(...args) { if (args.length === 0) { // Return current fake date when no args provided return new OriginalDate(OriginalDate.now() + timeDifference); } return new OriginalDate(...args); } // Ensure all static methods are properly copied FakeDate.now = function() { return OriginalDate.now() + timeDifference; }; FakeDate.parse = OriginalDate.parse; FakeDate.UTC = OriginalDate.UTC; // Properly copy prototype chain FakeDate.prototype = OriginalDate.prototype; FakeDate.toString = function() { return OriginalDate.toString(); }; FakeDate[Symbol.species] = OriginalDate; // Override Date window.Date = FakeDate; // Override performance.now() to align with fake date if (window.performance && window.performance.now) { const originalNow = window.performance.now.bind(window.performance); const perfTimeOrigin = performance.timeOrigin || 0; window.performance.now = function() { return originalNow() + (timeDifference); }; // Update timeOrigin if it exists if ('timeOrigin' in window.performance) { Object.defineProperty(window.performance, 'timeOrigin', { get: function() { return perfTimeOrigin + timeDifference; } }); } } console.log('Fake Date script loaded. Current fake date:', new Date().toISOString()); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址