您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto-complete flag game with TM menu control panel
当前为
// ==UserScript== // @name World Geography Quiz AutoPlay with TM Menu // @namespace http://tampermonkey.net/ // @version 1.8 // @description Auto-complete flag game with TM menu control panel // @author OmniSec // @match https://world-geography-games.com/en/* // @icon https://static.vecteezy.com/system/resources/previews/013/894/451/non_2x/united-states-flag-symbol-free-png.png // @grant GM_registerMenuCommand // @license MIT // ==/UserScript== (function() { 'use strict'; // --- Core Auto-Play --- window.autoPlayFlagQuiz = function() { if (typeof buttons !== "undefined" && typeof correct_answer !== "undefined") { buttons.forEach(function(btn){ if (btn.name === correct_answer && can_tap === true) { tap_country(btn); } }); if (button_next && button_next.inputEnabled) { next_flag(); } } } // --- Interval control --- window.autoPlayIntervalTime = 500; window.autoPlayIntervalID = setInterval(window.autoPlayFlagQuiz, window.autoPlayIntervalTime); window.stopAutoPlay = function() { clearInterval(window.autoPlayIntervalID); console.log("Auto-play stopped"); } window.startAutoPlay = function() { clearInterval(window.autoPlayIntervalID); window.autoPlayIntervalID = setInterval(window.autoPlayFlagQuiz, window.autoPlayIntervalTime); console.log("Auto-play started with interval " + window.autoPlayIntervalTime + "ms"); } window.setAutoPlayInterval = function(newInterval) { window.autoPlayIntervalTime = newInterval; startAutoPlay(); } // --- Tampermonkey Menu Commands --- const intervals = [100, 250, 500, 1000, 2000]; intervals.forEach(i => { GM_registerMenuCommand(`Set Interval ${i}ms`, function() { setAutoPlayInterval(i); }); }); GM_registerMenuCommand("Stop Auto-Play", function() { stopAutoPlay(); }); GM_registerMenuCommand("Restart Auto-Play", function() { startAutoPlay(); }); })();