// ==UserScript== // @name Vjudge Duel helper // @namespace http://tampermonkey.net/ // @version 3.2 // @description 刷新提交冷却、跳过入站考试 // @author GCSG01 // @license MIT // @match *://duel.gengen.qzz.io/* // @grant none // @run-at document-start // ==/UserScript== (function(){ 'use strict'; if (window.location.pathname === '/exam' || window.location.pathname.startsWith('/exam/')) { window.location.replace('https://duel.gengen.qzz.io/'); return; } const keyName = 'vjudge-duel.exam-passed.v3'; try { localStorage.setItem(keyName, '1'); console.log(`成功`); }catch(error) { console.error(`失败:请检查设置`, error); } const PREFIX='vjudge-duel.help.'; function clean(){ for(let i=localStorage.length-1;i >= 0;i--){ const key=localStorage.key(i); if(key&&key.startsWith(PREFIX)) localStorage.removeItem(key); } } const UNBAN='vjudge-duel.security.ban-until'; function clean(){ for(let i=localStorage.length-1;i >= 0;i--){ const key=localStorage.key(i); if(key&&key.startsWith(UNBAN)) localStorage.removeItem(key); } } try{ const originalSetItem=Storage.prototype.setItem; Storage.prototype.setItem=function(key,value){ if(typeof key==='string'&&key.startsWith(PREFIX))return; return originalSetItem.apply(this,arguments); }; }catch (e){} try{ const handler={ set:function(target, prop, value){ if(typeof prop==='string' && prop.startsWith(PREFIX)) return true; target[prop]=value; return true; } }; }catch(e){} setInterval(clean,500); clean(); })();