您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
提交记录颜色渲染
// ==UserScript== // @name 洛谷提交记录颜色渲染 // @version 0.5 // @description 提交记录颜色渲染 // @match https://www.luogu.com.cn/record$ // @match https://www.luogu.com.cn/record/* // @author MlkMathew // @license MIT // @grant none // @namespace https://greasyfork.org/users/1068192 // ==/UserScript== (function() { 'use strict'; const col=["rgb(191,191,191)","rgb(254,76,97)","rgb(243,156,17)","rgb(255,193,22)","rgb(82,196,26)","rgb(52,152,219)","rgb(157,61,207)","rgb(14,29,105)"]; function work(){ let res=window._feInjection.currentData.records.result; let n=res.length; let pid=document.querySelectorAll(".pid"); for(let i=0;i<n;i++) { pid[i].style="font-weight:bold;color:"+col[res[i].problem.difficulty]; } } function reload(){ location.reload(); } function Reload(){ setTimeout(reload,1000); } function init(){ work(); const bar=document.querySelector("#app > div.main-container > main > div.full-container > div > div > div.bottom > div > div > div").children; for(let i=0;i<bar.length;i++) { bar[i].addEventListener("click",Reload); } } setTimeout(init,300); })();