您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
一生使用一次的脚本qwq
// ==UserScript== // @name 安徽高考分数录取查询验证码自动填写 // @namespace http://tampermonkey.net/ // @version 2025-07-24 // @description 一生使用一次的脚本qwq // @author pttsrd // @match https://cx.ahzsks.cn/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 自动填写验证码 function autofillCaptchaWithRetry(maxRetry = 20, interval = 300) { let tryCount = 0; function tryFill() { tryCount++; console.log('[验证码脚本] 第' + tryCount + '次尝试'); const yzmInput = document.getElementById('yzm'); if (!yzmInput) { console.log('[验证码脚本] 未找到输入框, 第' + tryCount + '次'); if (tryCount < maxRetry) setTimeout(tryFill, interval); return; } const rightDivs = document.getElementsByClassName('right'); let found = false; for (let i = 0; i < rightDivs.length; i++) { const input = rightDivs[i].querySelector('input#yzm'); if (input) { let node = input.nextSibling; while (node && node.nodeType !== 3) { node = node.nextSibling; } if (node) { const captcha = node.textContent.trim(); console.log('[验证码脚本] 检测到验证码文本:', captcha); if (/^\d{4}$/.test(captcha)) { yzmInput.value = captcha; console.log('[验证码脚本] 已自动填写验证码:', captcha); found = true; } } break; } } if (!found && tryCount < maxRetry) { setTimeout(tryFill, interval); } else if (!found) { console.log('[验证码脚本] 未能自动填写验证码'); } } tryFill(); } // 页面加载后自动执行,使用更稳健的方式 window.addEventListener('load', function() { autofillCaptchaWithRetry(); }); })();