您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Base library to be used in scripts for stats.quake.com
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/371849/625769/QCStats.js
// ==UserScript== // @name QCStats // @namespace https://github.com/aleab/ // @version 1.0.2 // @author aleab // @description Base library to be used in scripts for stats.quake.com // @icon https://stats.quake.com/fav/favicon-32x32.png // @icon64 https://stats.quake.com/fav/favicon-96x96.png // @match https://stats.quake.com // @match https://stats.quake.com/* // @grant none // @require https://code.jquery.com/jquery-3.3.1.min.js // ==/UserScript== /* jshint esversion: 6 */ // VARIABLES & CONSTANTS var $ = window.jQuery; let listeners = {}; // =================== (function(history){ let pushState = history.pushState; history.pushState = function(state) { if (typeof history.onpushstate == "function") { history.onpushstate({state: state}); } return pushState.apply(history, arguments); }; })(window.history); $(document).ready(function() { let aleab = { qcstats: { addPageChangedListener: function(pageRegex, f) { if (!(pageRegex instanceof RegExp) || typeof f !== "function") { return; } if(!listeners.hasOwnProperty(pageRegex)) { listeners[pageRegex] = []; } listeners[pageRegex].push(f); } } }; window.aleab = aleab; window.onpopstate = history.onpushstate = async function(e) { // let location.href update await sleep(250); $.each(listeners, (regex, functions) => { $.each(functions, (i, f) => f()); }); }; }); // =================== // FUNCTIONS function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址