您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
OMCの問題ページの解説ボタンをリンクに変更します
// ==UserScript== // @name editorial_button2link // @namespace http://tampermonkey.net/ // @version 2024-01-10 // @description OMCの問題ページの解説ボタンをリンクに変更します // @author tamuraup // @match https://onlinemathcontest.com/contests/*/tasks/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; let buttons=Array.from(document.querySelectorAll("#content button").values()).filter(x=>x.textContent=="解説"); if(buttons.length>0){ const btn=buttons[0]; const url = window.location.toString().replace("tasks","editorial"); const editorial_link = `<a class="btn btn-primary" type="button" href="${url}">解説</a>`; btn.insertAdjacentHTML("afterend", editorial_link); btn.remove(); } })();