您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automate the process of hosting a home game for a P&W Obl Team
// ==UserScript== // @name P&W Obl Team Automation // @version 1.0 // @namespace https://example.com/ // @description Automate the process of hosting a home game for a P&W Obl Team // @match https://politicsandwar.com/obl/team/id=95894 // @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js // @grant GM_setValue // ==/UserScript== (function() { 'use strict'; function hostHomeGame() { // Find and click the Host Home Game button var hostBtn = $("a:contains('Host Home Game')"); if (hostBtn.length) { hostBtn.click(); } // Wait for the page to load and find the Host Home Game button again setTimeout(function() { var hostBtn2 = $("a:contains('Host Home Game')"); if (hostBtn2.length) { hostBtn2.click(); } // Wait for the page to load and click the Back to Team button setTimeout(function() { var backBtn = $("a:contains('Back to Team')"); if (backBtn.length) { backBtn.click(); } // Wait for 10 seconds and repeat the process setTimeout(hostHomeGame, 10000); }, 1000); }, 1000); } // Start the process hostHomeGame(); })();