您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
替换掉 AGREE 论坛上的旧 flash 验证码模块
// ==UserScript== // @name AGREE 论坛替换 flash 验证码 // @namespace Aloxaf // @version 0.1.0 // @description 替换掉 AGREE 论坛上的旧 flash 验证码模块 // @author Aloxaf // @match http://www.galgamezs.com/bbs/* // @grant unsafeWindow // ==/UserScript== // jshint esversion: 6 function load_captcha() { let flash = document.querySelector('embed'); let img = document.querySelector('#captcha'); if (img === null) { let parent = document.querySelector('#seccodeswf_3'); img = document.createElement('img'); img.id = 'captcha'; flash.style = 'display: none'; parent.insertBefore(img, flash); } let update = flash.attributes.flashvars.textContent.match(/\d+$/)[0]; fetch(`http://www.galgamezs.com/bbs/seccode.php?update=${update}`, { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: 'fromFlash=1', credentials: 'same-origin', }).then(res => { return res.blob(); }).then(b => { let img = document.querySelector('#captcha'); img.src = window.URL.createObjectURL(b); }); } unsafeWindow.opensecwin3_bak = unsafeWindow.opensecwin3; unsafeWindow.opensecwin3 = (id, type) => { unsafeWindow.opensecwin3_bak(id, type); let flash_loaded = setInterval(() => { if (document.querySelector('embed') !== null) { load_captcha(); clearInterval(flash_loaded); } }, 50); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址