You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:如何修改第三方网站的maxTime变量?Chrome工具操作无效

How to Extend Multiplication Table Timer to 20 Seconds

Hey there! I’ve dealt with exactly this kind of issue when trying to tweak third-party site variables locked away in closed scopes—super frustrating when you can see the variable but can’t modify it directly. Let’s fix this so your son gets the extra time he needs.

Why Your Chrome DevTools Changes Didn’t Stick

That maxTime variable is probably wrapped in a closure (a private function scope), which means the global console can’t access or modify it permanently. Any changes you make in the console only last until the next question loads, or get overwritten by the site’s original code.

Solution 1: Use a User Script (Permanent Fix)

The easiest way to make this change stick every time you visit the site is with a user script manager like Tampermonkey. Here’s how:

  1. Install the Tampermonkey extension for Chrome (it’s free and safe from the Chrome Web Store).
  2. Click the Tampermonkey icon in your browser toolbar and select Create a new script.
  3. Replace the default code with this custom script:
// ==UserScript==
// @name         Multiplication Timer Extender
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Boost multiplication question timer to 20 seconds
// @author       Your Name
// @match        https://www.timestables.com/speed-test/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Override setTimeout to replace 10-second delays with 20-second ones
    const originalSetTimeout = window.setTimeout;
    window.setTimeout = function(callback, delay) {
        // Check if the delay matches the 10-second timer (10000ms)
        if (delay === 10000) {
            return originalSetTimeout(callback, 20000); // Swap to 20000ms = 20s
        }
        // Leave all other timeouts unchanged
        return originalSetTimeout(callback, delay);
    };
})();
  1. Save the script (Ctrl+S) and refresh the multiplication test page. Now every question will have a 20-second timer!

Solution 2: Quick DevTools Hack (One-Time Use)

If you don’t want to install an extension, you can use this method for a single session:

  1. Open Chrome DevTools with F12, go to the Sources tab.
  2. Press Ctrl+F and search for maxTime to find where it’s defined.
  3. Click the line number next to the maxTime = 10000 (or similar) line to set a breakpoint.
  4. Refresh the page or start a new test—when the breakpoint triggers, the code will pause.
  5. Go to the Console tab, type maxTime = 20000, and press Enter.
  6. Press F8 to resume execution. The current test will use the 20-second timer.
    Note: You’ll need to repeat this every time you reload the page.

Both methods work because they either intercept the timer’s delay (user script) or modify the variable directly in its own scope (breakpoint hack).

内容的提问来源于stack exchange,提问作者Duke Dougal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:12:22