您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
添加一份 solution 到 GMOJ
// ==UserScript== // @name Add Solution To GMOJ // @namespace https://gf.qytechs.cn/zh-CN/users/1342573-lnw143 // @version 1.2 // @description 添加一份 solution 到 GMOJ // @author lnw143 // @match https://gmoj.net/senior/* // @icon https://www.google.com/s2/favicons?sz=64&domain=gmoj.net // @grant none // @connect lnw143.github.io // @license MIT // ==/UserScript== function waitElement(selector, callback) { if ($(selector).length) { callback(); } else { setTimeout(() => { waitElement(selector, callback); }, 100); } } waitElement( '#sidebar', function() { 'use strict'; console.log("running"); let urls = location.href.split('/'); const pid = urls[urls.length-1]; if(pid.length != 4){ console.error('pid is not 4 digits'); return; } console.log('pid is ' + pid); $('#sidebar .well:contains("题解")').append(`<div id="solution"> <div class="link_solution" data-toggle="tooltip" title="" data-original-title="By lnw143"> <a href="https://lnw143.github.io/blog/gmoj/p` + pid + `/">solution</a> </div> </div>`); $('#solution').css({ 'margin-bottom': '4px', 'display': 'flex', }) $('.link_solution').tooltip(); console.log('finished'); } );
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址