Timer Accelerator (Testing & Debugging Tool)

Speeds up client-side timers for development, testing, and educational purposes.

2026/03/31のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Timer Accelerator (Testing & Debugging Tool)
// @namespace    https://github.com/hgcfkuyfliyfl/
// @version      2.1
// @description  Speeds up client-side timers for development, testing, and educational purposes.
// @author       Wisdom Ng'oma
// @license      MIT
// @match        *://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const SPEED_FACTOR = 100;
    let startTime = Date.now();
    let performanceStart = performance.now();

    // Override Date.now
    const originalDateNow = Date.now;
    Date.now = function() {
        return startTime + (originalDateNow() - startTime) * SPEED_FACTOR;
    };

    // Override performance.now
    const originalPerformanceNow = performance.now;
    performance.now = function() {
        return performanceStart + (originalPerformanceNow() - performanceStart) * SPEED_FACTOR;
    };

    // Override timers
    const originalSetTimeout = window.setTimeout;
    const originalSetInterval = window.setInterval;

    window.setTimeout = function(callback, delay, ...args) {
        return originalSetTimeout(callback, Math.max(1, delay / SPEED_FACTOR), ...args);
    };

    window.setInterval = function(callback, delay, ...args) {
        return originalSetInterval(callback, Math.max(1, delay / SPEED_FACTOR), ...args);
    };

    console.log(`Time Accelerator Active: ${SPEED_FACTOR}x`);
})();