版本比较
油猴插件使用及推荐
标题
增加 1 行删除 1 行
11油猴插件油猴插件使用及推荐正文
增加 1356 行删除 406 行
1123345567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586887888990919211939495969798149910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133591 行未改动14271428142914301161431118143214331434143514361437143814391440144198 行未改动154015411542154322515442271545154615471548154915501551155215531554185 行未改动全部展开1740174117421743174417454221746174717481749175017511752175361 行未改动18151816181718184921819182018211822182318241825182625 行未改动18521853185418555261856185718581859186018611862186356 行未改动1920192119221923591192459319251926192719281929193019311932124 行未改动全部展开20572058205920607267277287297307317327337347357367372061206273974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011112063206420652066206711131114111511161117206820692070207144 行未改动2116211721182119117021202121### [Tampermonkey](https://microsoftedge.microsoft.com/addons/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/iikmkjmpaadaobahmlepeloendndfphd)tips:本文含有大量字符,加载会有些许缓慢。
### [greasyfork镜像站](https://home.greasyfork.org.cn/)### 介绍(来源于官方 github 仓库)
::::info[[氩洛谷](https://www.luogu.me/article/p7gzfrwl) by [$\color{FFD776}Acerkaio$](https://www.luogu.com.cn/user/514850)][Tampermonkey](https://github.com/Tampermonkey/tampermonkey) 是 Google Chrome 最受欢迎的用户脚本管理器。
特色:
- 管理和编辑你所有的用户脚本- 只需两点点击即可启用和禁用脚本- 可以轻松地在不同的 Chrome 实例之间同步脚本- 通过URL从 userscripts.org 搜索脚本(启用TamperFire)
除了其他标签、功能和功能外,支持以下内容:
- 完整的 unsafe 窗口访问- 所有GM_*功能,包括(GM_registerMenuCommand、GM_getResourceText、GM_getResourceURL、GM_notification)- 很多标签由 Greasemonkey 和 Scriptish 支持
### 使用方式(这里介绍 Edge 使用方式,Google同理)
#### 下载
- 可以通过[微软商店](https://microsoftedge.microsoft.com/addons/detail/%E7%AF%A1%E6%94%B9%E7%8C%B4/iikmkjmpaadaobahmlepeloendndfphd)下载。
- 也可以通过[官网](https://www.tampermonkey.net/)下载(实际上还是去微软商店)。
- 用户自行导入可以参考[这篇文章](https://www.luogu.com.cn/article/lj91a3c8)。
#### 使用前
先在[ Edge 扩展](edge://extensions/)中点开 Tampermonkey 将开发人员模式与允许用户脚本打开。

#### 使用
在浏览器右上角点开扩展,找到 Tampermonkey 点开,有一列按钮功能见下图。

打开管理面板,与上面基本相同,设置啥的基本不用动。
#### 获取新脚本
可以通过 greasyfork 获取,但是 greasyfork 好像被墙了,这里找了个 [greasyfork 镜像站](https://home.greasyfork.org.cn/)目前可以正常使用。
~~也可以去找万能的谷民要。~~
#### 添加新脚本
找到你中意的新脚本后,可以通过 Tampermonkey 自动安装(一般是在 greasyfork 找到的),也可以自己手动导入。
下面是手动导入的流程:
1. 点击添加新脚本。
2. 将自己复制的脚本复制进去。
3. Ctrl+S 保存即可。
这边建议将自动安装的脚本保存一边,避免消失。
### 脚本推荐
::::warning[注意]{open}不同的脚本可能会冲突。
不建议同时使用多个功能相近的脚本。
有的脚本可能因为作者长期未维护,出现 bug 与不适配等问题。
有的脚本因为年代久远,我找不到原作者或不确定,若你是知情者或作者,可向我说明,我进行修改。
部分脚本找到了原作者的博客或帖子,可以点击脚本名查看。::::
#### 美化脚本::::warning[注意]{open}这些脚本一次使用一个即可,不能叠加。:::::::::info[[3327-luogu](https://www.luogu.com.cn/discuss/1000030) by [cff_0102](https://www.luogu.com.cn/user/542457)]{open}新前端导致背景出现异常,但最主要的自定义颜色可用。::::info[code][字符串太长,长度不可超过 500000 个字符。](https://www.luogu.com.cn/article/eq72327a)::::::::info[[smart-luogu](https://www.tampermonkey.net/script_installation.php#url=https://userstyles.org/styles/userjs/235716/smart-luogu.user.js) by [$\color{FFD776}Acerkaio$](https://www.luogu.com.cn/user/514850)]::::::::::info[[氩洛谷](https://www.luogu.me/article/p7gzfrwl) by [Acerkaio](https://www.luogu.com.cn/user/514850)]{open}简洁风格的洛谷美化插件,但是年代久远,没有对新前端进行适配。::::info[code][字符串太长,长度不可超过 500000 个字符。](https://www.luogu.com.cn/article/eq72327a)::::::::info[氦luogu by [$\color{FFD776}abs20187$](https://www.luogu.com.cn/user/760689)]::::::::::info[[smart-luogu](https://www.tampermonkey.net/script_installation.php#url=https://userstyles.org/styles/userjs/235716/smart-luogu.user.js) by [Acerkaio](https://www.luogu.com.cn/user/514850)]{open}花哨的洛谷美化插件,但是年代久远,没有对新前端进行适配,且加载较慢。::::info[code][字符串太长,长度不可超过 500000 个字符。](https://www.luogu.com.cn/article/eq72327a)::::::::info[洛谷验证码自动识别并填写 by 【数据删除】]::::::::::info[氦luogu by [abs20187](https://www.luogu.com.cn/user/760689)]{open}较简洁风格的洛谷美化插件,但是年代较远,没有对新前端进行适配,主要是新前端的边栏问题,但是整体影响不大,可以自行更换背景。(在代码第 60、61 行)::::info[code][字符串太长,长度不可超过 500000 个字符。](https://www.luogu.com.cn/article/eq72327a):::::::::#### 功能性脚本:::::info[[Luogu Search AnyWhere](https://github.com/wujukai123/Luogu-Search-AnyWhere/) by [wujukai123](https://www.luogu.com.cn/user/712378)]{open}在洛谷的任何地方查找。在页面右下角,即可查询你想要的东西。::::info[code]```// ==UserScript==// @name Luogu Search AnyWhere// @namespace https://greasyfork.org.cn/users/829530// @version 0.4.0// @description Search AnyWhere in Luogu!// @author tiger2005// @match https://www.luogu.com.cn/*// @icon https://cdn.luogu.com.cn/upload/usericon/3.png// @grant none// @license MIT// @require https://code.jquery.com/jquery-3.6.0.min.js// @downloadURL https://update.greasyfork.org.cn/scripts/442416/Luogu%20Search%20AnyWhere.user.js// @updateURL https://update.greasyfork.org.cn/scripts/442416/Luogu%20Search%20AnyWhere.meta.js// ==/UserScript==
(function($, undefined) { 'use strict'; $(function() { Date.prototype.pattern = function(format) { let date = { "y+": this.getYear(), "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), "S+": this.getMilliseconds() }; if (/(y+)/i.test(format)) { format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); } for (let k in date) { if (new RegExp("(" + k + ")").test(format)) { format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length)); } } return format; }; let settings = localStorage.getItem("lsaw_settings"); if (settings == undefined || settings == 'undefined') settings = {}; else settings = JSON.parse(settings); let majorSettings = [ ["lsawUserDisplay", true], ["lsawProblemDisplay", true], ["lsawOfficialListDisplay", false], ["lsawSelectListDisplay", false], ["lsawProblemDisplayNumber", 50], ["lsawListDisplayNumber", 50], ]; for (let i = 0; i < majorSettings.length; i++) { let key = majorSettings[i][0], val = majorSettings[i][1]; if (settings[key] == undefined || typeof(settings[key]) != typeof(val)) settings[key] = val; } localStorage.setItem("lsaw_settings", JSON.stringify(settings)); $("body").append(`<style>.searchAnywhere { position: fixed; top: 0px; left: 0px; height: 100%; width: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 999; transition: 0.2s; color: white;}
.searchAnywhereMain { height: min(600px, 100% - 10px); width: min(750px, 100% - 10px); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column;}
.inputArea { display: block; width: 100%; height: 48px; color: #aaa; position: relative; transition: 0.2s; margin-bottom: 10px;}
.inputArea>input { border-radius: 5px; border: 2px solid #aaa; height: 48px; width: 100%; font-size: 18px; color: #aaa; padding: 14px 24px; outline: 0; background: transparent; box-sizing: border-box;}
.inputArea.onHover>input,.inputArea.onFocus>input { border: 2px solid white;}
.inputArea.onHover,.inputArea.onFocus,.inputArea.withContent { color: white !important;}
.inputArea.onHover>input,.inputArea.onFocus>input,.inputArea.withContent>input { color: white !important;}
.inputArea.withIconLeft>input { padding-left: 42px;}
.inputArea.withIconRight>input { padding-right: 42px;}
.inputArea>div.iconLeft { height: 48px; width: 48px; position: absolute; display: grid; place-items: center; top: 0px; left: 0px;}
.inputArea>div.iconRight { height: 48px; width: 48px; position: absolute; display: grid; place-items: center; top: 0px; right: 0px;}
.inputArea>div.iconLeft>svg { width: 20px !important; height: 20px !important;}
.inputArea>div.iconRight>svg { width: 20px !important; height: 20px !important;}
.inputAreaSmall { display: block; width: 100%; height: 30px; color: #aaa; position: relative; transition: 0.2s;}
.inputAreaSmall>input { border-radius: 5px; border: 2px solid #aaa; height: 30px; width: 100%; font-size: 18px; color: #aaa; padding: 5px 10px; outline: 0; background: transparent; box-sizing: border-box;}
.inputAreaSmall.onHover>input,.inputAreaSmall.onFocus>input { border: 2px solid white;}
.inputAreaSmall.onHover,.inputAreaSmall.onFocus,.inputAreaSmall.withContent { color: white !important;}
.inputAreaSmall.onHover>input,.inputAreaSmall.onFocus>input,.inputAreaSmall.withContent>input { color: white !important;}
.userPurple { color: #cf5bff; font-weight: bold;}
.userRed { color: #e74c3c; font-weight: bold;}
.userOrange { color: #e67e22; font-weight: bold;}
.userYellow { color: #d9a71d; font-weight: bold;}
.userGreen { color: #5eb95e; font-weight: bold;}
.userGray { color: #aaa; font-weight: bold;}
.userCheater { color: #d3961c; font-weight: bold;}
.userBlue { color: #07a2f1; font-weight: bold;}
.userGold { color: #f1c40f; font-weight: bold;}
.badgePurple { background-color: #cf5bff;}
.badgeRed { background-color: #e74c3c;}
.badgeOrange { background-color: #e67e22;}
.badgeYellow { background-color: #d9a71d;}
.badgeGreen { background-color: #5eb95e;}
.badgeGray { background-color: #999;}
.badgeCheater { background-color: #d3961c;}
.badgeBlue { background-color: #07a2f1;}
.badgeBlack { background-color: #0e1d69;}
.badgeGold { background-color: #f1c40f;}
.searchAnywhereContent { color: white; flex: 1; scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; overflow-y: auto;}
.searchAnywhereContent::-webkit-scrollbar { width: 0 !important;}
.searchUserCard { background: #444; border-radius: 10px; display: flex; flex-direction: column; cursor: pointer; color: white; padding: 10px; line-height: 1; margin-bottom: 10px; border: 2px solid #888; box-sizing: border-box;}
.searchCard.light { border: 2px solid white;}
.searchUserCard>div { width: 100%;}
.searchUserCardBody { display: flex; flex-direction: row;}
.searchUserCardImg { height: 36px; width: 36px; border-radius: 50%; margin-right: 10px;}
.searchUserCardInfo>span:first-child { font-size: 14px; margin-bottom: 3px; display: inline-block; color: #bbb;}
.searchUserCardInfo>span:last-child { font-size: 20px;}
.searchUserCardMedia { display: flex; flex-direction: row;}
.searchUserCardMedia>div { margin-top: 5px; flex: 1; display: inline-block; height: 23px; verticle-align: center;}
.searchUserCardMedia>div>div { padding: 4px; position: relative; display: inline-block; background: #777; margin-right: 15px;}
.searchUserCardMedia>div>div:after { width: 10px; height: 100%; content: ""; border: 5px; position: absolute; top: 0px; left: 100%; clip-path: polygon(0 0, 100% 50%, 0 100%); background-color: inherit;}
.userBadgeInfo { font-size: 14px; padding: 2px 5px; border-radius: 5px; color: white; font-weight: bold; margin: 0px 3px; display: inline-block;}
.searchProblemCard { background: #444; border-radius: 10px; display: flex; flex-direction: column; cursor: pointer; color: white; padding: 10px; line-height: 1; margin-bottom: 10px; border: 2px solid #888; box-sizing: border-box;}
.searchProblemCard>div { width: 100%; display: flex; flex-direction: row;}
.searchProblemCard>div:last-child { margin-top: 5px;}
.searchProblemCardTag { margin-right: 12px; display: inline-flex; flex-direction: row; line-height: 24px; height: 24px; overflow: hidden;}
.searchProblemCardTag>div { padding: 2px; position: relative; display: inline-block; margin-right: 5px;}
.searchListCardTag { margin-right: 12px; display: inline-flex; flex-direction: row; line-height: 24px; height: 24px; overflow: hidden;}
.searchListCardTag>div { padding: 2px; position: relative; display: inline-block; margin-right: 5px;}
.searchListCardTag svg,.searchProblemCardTag svg { height: 20px !important; width: 20px !important;}
.problemTagInfo { font-size: 16px; padding: 4px 7px; border-radius: 5px; color: white; display: inline-block;}
.searchProblemCardBody>div:first-child { margin-right: 5px;}
.searchListCard { background: #444; border-radius: 10px; display: flex; flex-direction: column; cursor: pointer; color: white; padding: 10px; line-height: 1; margin-bottom: 10px; border: 2px solid #888; box-sizing: border-box; position: relative;}
.searchListCard>div { width: 100%; display: flex; flex-direction: row;}
.searchListCardBody>div:first-child { margin-right: 5px;}
.searchListCardBody { margin-bottom: 5px;}
.searchAnywhereSettings { position: fixed; top: 0px; left: 0px; height: 100%; width: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 1000; transition: 0.2s; color: white;}
.searchAnywhereSettingsMain { height: min(300px, 100% - 10px); width: min(450px, 100% - 10px); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column;}
.searchAnywhereSettingsContent { flex: 1; scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; overflow-y: auto;}
.searchAnywhereSettingsBag { margin-bottom: 8px; user-select: none; font-size: 20px; position: relative; line-height: 30px;}
.searchAnywhereClicky { position: relative; height: 30px; width: 30px;}
.searchAnywhereClicky div { transition: 0.2s; position: absolute; top: 0px; left: 0px; cursor: pointer;}
.searchAnywhereClicky div svg { height: 30px; width: 30px;}
.searchAnywhereClicky[flag=false] .falseBlock { opacity: 1;}
.searchAnywhereClicky[flag=true] .falseBlock { opacity: 0;}
.searchAnywhereClicky[flag=true] .trueBlock { opacity: 1;}
.searchAnywhereClicky[flag=false] .trueBlock { opacity: 0;}
.searchAnywhereSettingsContent::-webkit-scrollbar { width: 0 !important;}
.searchAnywhereCloseSettings { display: inline-grid; place-items: center; width: 32px; height: 32px; cursor: pointer; border-radius: 50%; background: white;}
.searchAnywhereCloseSettings:hover { background: #aaa;}
.searchAnywhereEntrance { z-index: 99; background: white; display: grid; place-items: center; width: 50px; height: 50px; position: fixed; right: 20px; bottom: 30px; transition: 0.2s; border-radius: 5px; cursor: pointer;}
.searchAnywhereEntrance:hover { background: #ccc;}
.searchAnywhereEntrance svg { height: 30px; width: 30px;}
.searchCard.light,.searchCard { color: white !important;}
.searchAnywhereContent>div>div>a:hover { color: #83c4ef;}</style><div class='searchAnywhere' style="opacity: 0; display: none;"> <div class='searchAnywhereMain'> <div class='inputArea withIconLeft withIconRight searchAnywhereMainInput'> <input spellcheck="false" placeholder="Search AnyWhere" /> <div class="iconLeft"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-24"> <path data-v-1ad550c8="" data-v-303bbf52="" fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" class=""></path> </svg></div> <div class="iconRight"><svg style="cursor: pointer" class="searchAnywhereSettingsLink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" aria-hidden="true" role="img"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z" /> </svg></div> </div> <div class='searchAnywhereContent'> </div> </div></div><div class='searchAnywhereSettings' style="opacity: 0; display: none;"> <div class='searchAnywhereSettingsMain'> <div class="searchAnywhereSettingsContent"> <div> <div class="searchAnywhereSettingsBag" for="lsawUserDisplay"> 显示用户 <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawUserDisplay}"> <div class="falseBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z" /> </svg> </div> <div class="trueBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z" /> </svg> </div> </div> </div> <div class="searchAnywhereSettingsBag" for="lsawProblemDisplay"> 显示题目 <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawProblemDisplay}"> <div class="falseBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z" /> </svg> </div> <div class="trueBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z" /> </svg> </div> </div> </div> <div class="searchAnywhereSettingsBag" for="lsawOfficialListDisplay"> 显示官方题单 <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawOfficialListDisplay}"> <div class="falseBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z" /> </svg> </div> <div class="trueBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z" /> </svg> </div> </div> </div> <div class="searchAnywhereSettingsBag" for="lsawSelectListDisplay"> 显示用户题单 <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawSelectListDisplay}"> <div class="falseBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z" /> </svg> </div> <div class="trueBlock"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z" /> </svg> </div> </div> </div> <div class="searchAnywhereSettingsBag" for="lsawProblemDisplayNumber"> 题目展示数量 <div style="float: right; width: 150px"> <div class="inputAreaSmall withContent"> <input type="number" min="1" max="50" value="${settings.lsawProblemDisplayNumber}" class="withContent" /> </div> </div> </div> <div class="searchAnywhereSettingsBag" for="lsawListDisplayNumber"> 题单展示数量 <div style="float: right; width: 150px"> <div class="inputAreaSmall withContent"> <input type="number" min="1" max="50" value="${settings.lsawListDisplayNumber}" class="withContent" /> </div> </div> </div> </div> </div> <div style="margin-top: 10px; text-align: center; width: 100%;"> <div class="searchAnywhereCloseSettings"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512" class="icon svg-inline--fa fa-times fa-w-11" data-v-303bbf52="" style="transform: scale(1.2); width: 16px; height: 16px; color: rgb(231, 76, 60);"> <path data-v-1b44b3e6="" fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" class=""></path> </svg> </div> </div> </div></div><div class="searchAnywhereEntrance"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --> <path fill="black" d="M236 176c0 15.46-12.54 28-28 28S180 191.5 180 176S192.5 148 208 148S236 160.5 236 176zM500.3 500.3c-15.62 15.62-40.95 15.62-56.57 0l-119.7-119.7c-40.41 27.22-90.9 40.65-144.7 33.46c-91.55-12.23-166-87.28-177.6-178.9c-17.24-136.2 97.29-250.7 233.4-233.4c91.64 11.6 166.7 86.07 178.9 177.6c7.19 53.8-6.236 104.3-33.46 144.7l119.7 119.7C515.9 459.3 515.9 484.7 500.3 500.3zM294.1 182.2C294.1 134.5 255.6 96 207.1 96C160.4 96 121.9 134.5 121.9 182.2c0 38.35 56.29 108.5 77.87 134C201.8 318.5 204.7 320 207.1 320c3.207 0 6.26-1.459 8.303-3.791C237.8 290.7 294.1 220.5 294.1 182.2z" /> </svg></div> `); $(".inputArea > input").focus(function() { $(this).parent().addClass("onFocus"); }); $(".inputArea > input").blur(function() { $(this).parent().removeClass("onFocus"); if ($(this).val().length != 0) $(this).parent().addClass("withContent"); else $(this).parent().removeClass("withContent"); }); $(".inputArea").mouseenter(function() { $(this).addClass("onHover"); }); $(".inputArea").mouseleave(function() { $(this).removeClass("onHover"); }); $(".inputAreaSmall > input").focus(function() { $(this).parent().addClass("onFocus"); }); $(".inputAreaSmall > input").blur(function() { $(this).parent().removeClass("onFocus"); if ($(this).val().length != 0) $(this).parent().addClass("withContent"); else $(this).parent().removeClass("withContent"); }); $(".inputAreaSmall").mouseenter(function() { $(this).addClass("onHover"); }); $(".inputAreaSmall").mouseleave(function() { $(this).removeClass("onHover"); }); $(".searchAnywhereClicky").click(function() { let a = $(this).attr("flag"); if (a == "false") { a = true; $(this).attr("flag", a); } else { a = false; $(this).attr("flag", a); } let settingsName = $(this).parent().attr("for"); settings[settingsName] = a; localStorage.setItem("lsaw_settings", JSON.stringify(settings)); }) $(".inputAreaSmall input").change(function() { let a = Number($(this).val()); let settingsName = $(this).parent().parent().parent().attr("for"); settings[settingsName] = a; localStorage.setItem("lsaw_settings", JSON.stringify(settings)); }) $(".searchAnywhereCloseSettings").click(function() { $(".searchAnywhereSettings").css("opacity", "0"); setTimeout(() => { $(".searchAnywhereSettings").css("display", "none"); }, 200); }) $(".searchAnywhereSettingsLink").click(function() { $(".searchAnywhereSettings").css("display", "block"); setTimeout(() => { $(".searchAnywhereSettings").css("opacity", "1"); }, 20); })
const getColorFromPercent = (x, opa) => { let r = 0, g = 0, b = 0; let rr = 231, gg = 76, bb = 60; let rrr = 82, ggg = 196, bbb = 26; // if(x < 0.5){ // r = 255; // g = one * x; // } // else{ // r = 255 - ((x - 0.5) * one); // g = 255; // } r = rr + (rrr - rr) * x; g = gg + (ggg - gg) * x; b = bb + (bbb - bb) * x; r += (60 - r) * (1 - opa); g += (60 - g) * (1 - opa); b += (60 - b) * (1 - opa); r = Math.floor(r); g = Math.floor(g); b = Math.floor(b); return `rgb(${r}, ${g}, ${b})`; };
const problemColors = ["Gray", "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Black"]; const problemNames = ["暂无评定", "入门", "普及-", "普及/提高-", "普及+/提高", "提高+/省选-", "省选/NOI-", "NOI/NOI+/CTSC"]; let searchTimeout = null; let currentHoverCard = undefined; const changeHoverCard = (x, scroll = true, align = false) => { $(".searchCard.light").removeClass("light"); if (x != undefined && scroll) $(".searchAnywhereMainInput > input").blur(); if (x != undefined) { x.addClass("light").focus(align); if (scroll) { let heg = x[0].offsetTop; let prr = x.parent().parent(); let scr = prr.scrollTop(); let r = heg - x.outerHeight() + 5, l = r - prr.outerHeight() + x.outerHeight() + 10; scr = Math.max(l, Math.min(r, scr)); prr.scrollTop(scr); } } if (scroll) { // remove mouse event $(".searchCard").unbind('mouseenter').unbind('mouseleave'); $(document).mousemove(() => { $(document).unbind('mousemove'); $(".searchCard").unbind('mouseenter').unbind('mouseleave').hover(function() { changeHoverCard($(this), false); }, function() { changeHoverCard(undefined, false); }); }) } currentHoverCard = x; } const searchInfo = () => { searchTimeout = null; let info = $(".inputArea > input").val(); info = $.trim(info); if (info == "") { $(".searchAnywhereContent").html(""); return; } $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>加载中……</div></div>`); $(".searchAnywhereContent > div").unbind('click').click((event) => { event.stopPropagation(); }) let userHtml = ""; let problemHtml = ""; let officialHtml = ""; let selectHtml = ""; let finishWorks = 0; let networkError = false; let workCnt = (settings.lsawUserDisplay != false) + (settings.lsawProblemDisplay != false) + (settings.lsawOfficialListDisplay != false) + (settings.lsawSelectListDisplay != false); const finishWork = () => { ++finishWorks; if (finishWorks == workCnt) { if (networkError) $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>网络错误</div></div>`); else if (userHtml == "" && problemHtml == "" && officialHtml == "" && selectHtml == "") $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>未搜索到相关内容</div></div>`); else { changeHoverCard(undefined, false); $(".searchAnywhereContent").html(`<div>` + userHtml + problemHtml + officialHtml + selectHtml + `</div>`); $(".searchAnywhereContent > div").unbind('click').click((event) => { event.stopPropagation(); }) $(".searchCard").unbind('mouseenter').unbind("mouseleave").hover(function() { changeHoverCard($(this), false); }, function() { changeHoverCard(undefined, false); }); } } }; const getProblemStatus = (x, y) => { if (!x && !y) return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="icon svg-inline--fa fa-minus fa-w-14" data-v-303bbf52="" style="width: 16px; height: 16px; color: #aaa"><path data-v-1b44b3e6="" fill="currentColor" d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" class=""></path></svg>`; if (!y) return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512" class="icon svg-inline--fa fa-times fa-w-11" data-v-303bbf52="" style="transform: scale(1.2); width: 16px; height: 16px; color: rgb(231, 76, 60);"><path data-v-1b44b3e6="" fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" class=""></path></svg>`; return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon svg-inline--fa fa-check fa-w-16" data-v-303bbf52="" style="width: 16px; height: 16px; color: rgb(82, 196, 26);"><path data-v-1b44b3e6="" fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>`; } const getCCFLevel = (x) => { if (x == null || x < 3) return ""; let color = ""; if (x <= 5) color = "#5eb95e"; else if (x <= 7) color = "#07a2f1"; else color = "#f1c40f"; return `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" style="margin: 0px 3px;" fill="${color}" style="margin-bottom: -3px;"><path d="M16 8C16 6.84375 15.25 5.84375 14.1875 5.4375C14.6562 4.4375 14.4688 3.1875 13.6562 2.34375C12.8125 1.53125 11.5625 1.34375 10.5625 1.8125C10.1562 0.75 9.15625 0 8 0C6.8125 0 5.8125 0.75 5.40625 1.8125C4.40625 1.34375 3.15625 1.53125 2.34375 2.34375C1.5 3.1875 1.3125 4.4375 1.78125 5.4375C0.71875 5.84375 0 6.84375 0 8C0 9.1875 0.71875 10.1875 1.78125 10.5938C1.3125 11.5938 1.5 12.8438 2.34375 13.6562C3.15625 14.5 4.40625 14.6875 5.40625 14.2188C5.8125 15.2812 6.8125 16 8 16C9.15625 16 10.1562 15.2812 10.5625 14.2188C11.5938 14.6875 12.8125 14.5 13.6562 13.6562C14.4688 12.8438 14.6562 11.5938 14.1875 10.5938C15.25 10.1875 16 9.1875 16 8ZM11.4688 6.625L7.375 10.6875C7.21875 10.8438 7 10.8125 6.875 10.6875L4.5 8.3125C4.375 8.1875 4.375 7.96875 4.5 7.8125L5.3125 7C5.46875 6.875 5.6875 6.875 5.8125 7.03125L7.125 8.34375L10.1562 5.34375C10.3125 5.1875 10.5312 5.1875 10.6562 5.34375L11.4688 6.15625C11.5938 6.28125 11.5938 6.5 11.4688 6.625Z"></path></svg>` } if (settings.lsawUserDisplay != false) $.ajax({ url: `/api/user/search?keyword=${info}`, type: 'GET', success: function(json) { json = json.users; if (json.length != 0 && json[0] != null) { userHtml = ` <div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>用户</div> `; json.forEach((item) => { if (item == null) return; if (item.color == "Cheater") item.badge = "作弊者"; userHtml += ` <a class="searchCard searchUserCard" href='https://www.luogu.com.cn/user/${item.uid}'> <div class="searchUserCardBody"> <div class="searchUserCardImg" style="background: url(https://cdn.luogu.com.cn/upload/usericon/${item.uid}.png); background-size: 36px 36px;"></div> <div class="searchUserCardInfo"><span>UID ${item.uid}</span><br/><div style='display: flex; flex-direction: row'><span class="user${item.color}" style="line-height: 20px">${item.name}</span>${getCCFLevel(item.ccfLevel)}${item.badge != null && item.badge != "" ? `<div class='userBadgeInfo badge${item.color}'>${item.badge}</div>` : ""}</div></div> </div> </a>` }); } finishWork(); }, error: () => { networkError = true; finishWork(); } }); if (settings.lsawProblemDisplay != false) $.ajax({ url: `/problem/list`, type: 'GET', headers: { "x-luogu-type": "content-only", "Accept": "application/json, text/plain, */*", "x-lentille-request": "content-only" }, data: { keyword: info, page: 1, type: "P|B|CF|SP|AT|UVA" }, success: function(json) { if (json.status != 200) { finishWork(); return; } json = json.data.problems; if (json.count != 0) { problemHtml = ` <div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>题目<a href="/problem/list?keyword=${info}&page=1&type=P%7CB%7CCF%7CSP%7CAT%7CUVA" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.count} 道题目</a></div> `; for (let i = 0; i < json.result.length && i < settings.lsawProblemDisplayNumber; i++) { let item = json.result[i]; problemHtml += ` <a class="searchCard searchProblemCard" href='/problem/${item.pid}'> <div class="searchProblemCardBody"> <div>${getProblemStatus(item.submitted, item.accepted)}</div> <div>${item.title}</div> </div> <div> <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${item.pid}</div> <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 544 512" class="svg-inline--fa fa-chart-pie fa-w-17"><path data-v-639bc19b="" fill="currentColor" d="M527.79 288H290.5l158.03 158.03c6.04 6.04 15.98 6.53 22.19.68 38.7-36.46 65.32-85.61 73.13-140.86 1.34-9.46-6.51-17.85-16.06-17.85zm-15.83-64.8C503.72 103.74 408.26 8.28 288.8.04 279.68-.59 272 7.1 272 16.24V240h223.77c9.14 0 16.82-7.68 16.19-16.8zM224 288V50.71c0-9.55-8.39-17.4-17.84-16.06C86.99 51.49-4.1 155.6.14 280.37 4.5 408.51 114.83 513.59 243.03 511.98c50.4-.63 96.97-16.87 135.26-44.03 7.9-5.6 8.42-17.23 1.57-24.08L224 288z" class=""></path></svg></div>${item.totalSubmit}</div> <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon svg-inline--fa fa-check fa-w-16" data-v-303bbf52="" style="width: 16px; height: 16px; color: rgb(82, 196, 26);"><path data-v-1b44b3e6="" fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg></div>${item.totalAccepted}</div> <div style='flex: 1; text-align: right'> <div class="problemTagInfo badge${problemColors[item.difficulty]}">${problemNames[item.difficulty]}</div> </div> </div> </a> `; }; } finishWork(); }, error: () => { networkError = true; finishWork(); } }); if (settings.lsawOfficialListDisplay != false) $.ajax({ url: `/training/list`, type: "GET", data: { keyword: info, page: 1, type: "official" }, headers: { "x-luogu-type": "content-only" }, success: (json) => { if (json.code != 200) { finishWork(); return; } json = json.currentData; if (json.trainings.result.length != 0) { officialHtml = `<div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>官方题单<a href="/training/list?keyword=${info}&page=1&type=official" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.trainings.count} 份题单</a></div>`; for (let i = 0; i < json.trainings.result.length && i < settings.lsawListDisplayNumber; i++) { let item = json.trainings.result[i]; let acs = json.acceptedCounts[item.id]; if (acs == undefined) acs = 0; officialHtml += ` <a class="searchCard searchListCard" href='/training/${item.id}' style="background: ${getColorFromPercent(acs / item.problemCount, 0.4)} !important"> <div class="searchListCardProgress" style="height: 5px; position: absolute; top: -1px; left: 0px; overflow: hidden; border-top-left-radius: 5px; border-top-right-radius: 5px"> <div style="width: ${acs / item.problemCount * 100}%; background: ${getColorFromPercent(acs / item.problemCount, 1)}; height: 5px; content: ""></div> <div style="flex: 1"></div> </div> <div class="searchListCardBody"> <div>#${item.id}</div> <div>${item.title}</div> </div> <div> <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${acs} / ${item.problemCount}</div> <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="#f1c40f" d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg></div>${item.markCount}</div> </div> </a> `; } } finishWork(); }, error: () => { networkError = true; finishWork(); } }) if (settings.lsawSelectListDisplay != false) $.ajax({ url: `/training/list`, type: "GET", data: { keyword: info, page: 1, type: "select" }, headers: { "x-luogu-type": "content-only" }, success: (json) => { if (json.code != 200) { finishWork(); return; } json = json.currentData; if (json.trainings.result.length != 0) { selectHtml = `<div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>用户题单<a href="/training/list?keyword=${info}&page=1&type=select" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.trainings.count} 份题单</a></div>`; for (let i = 0; i < json.trainings.result.length && i < settings.lsawListDisplayNumber; i++) { let item = json.trainings.result[i]; if (item.provider.color == "Cheater") item.provider.badge = "作弊者"; selectHtml += ` <a class="searchCard searchListCard" href='/training/${item.id}'> <div class="searchListCardBody"> <div>#${item.id}</div> <div>${item.title}</div> </div> <div> <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${item.problemCount}</div> <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg></div>${(new Date(item.createTime * 1000)).pattern("yyyy/MM/dd")}</div> <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="#f1c40f" d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg></div>${item.markCount}</div> <div style='flex: 1; text-align: right'> <object style='display: inline-block'><a href="/user/${item.provider.uid}"> <div style='display: flex; flex-direction: row'> <span class="user${item.provider.color}" style="line-height: 20px">${item.provider.name}</span> ${getCCFLevel(item.provider.ccfLevel)} ${item.provider.badge != null && item.provider.badge != "" ? `<div class='userBadgeInfo badge${item.provider.color}'>${item.provider.badge}</div>` : ""} </div> </a></object> </div> </div> </a> `; } } finishWork(); }, error: () => { networkError = true; finishWork(); } }) }; $(".searchAnywhereMainInput > input").unbind('input propertychange').on('input propertychange', function() { if (searchTimeout != null) clearTimeout(searchTimeout); searchTimeout = setTimeout(searchInfo, 1000); }); let searchAnywhereOpen = false; $(".searchAnywhereEntrance").unbind('click').click(function() { if (!searchAnywhereOpen) { $(".searchAnywhere").css("display", "block"); setTimeout(() => { $(".searchAnywhere").css("opacity", "1"); $(".searchAnywhereMainInput > input").focus(); }, 20); } else { $(".searchAnywhere").css("opacity", "0"); setTimeout(() => { $(".searchAnywhere").css("display", "none"); }, 200); } searchAnywhereOpen = !searchAnywhereOpen; }); $(".searchAnywhere").unbind('click').click(() => { $(".searchAnywhere").css("opacity", "0"); setTimeout(() => { $(".searchAnywhere").css("display", "none"); }, 200); searchAnywhereOpen = false; }) $(".searchAnywhereMainInput").unbind('click').click((event) => { event.stopPropagation(); }) $(document).keydown(function(event) { if ((event.keyCode == 186) && (event.ctrlKey || event.metaKey)) { if (!searchAnywhereOpen) { $(".searchAnywhere").css("display", "block"); setTimeout(() => { $(".searchAnywhere").css("opacity", "1"); $(".searchAnywhereMainInput > input").focus(); }, 20); } else { $(".searchAnywhere").css("opacity", "0"); setTimeout(() => { $(".searchAnywhere").css("display", "none"); }, 200); } searchAnywhereOpen = !searchAnywhereOpen; event.preventDefault(); } if (searchAnywhereOpen) { if (event.keyCode == 38) { // Up if (currentHoverCard == undefined) { let lis = $(".searchCard"); if (lis.length == 0) $(".searchAnywhereMainInput > input").focus(); else { currentHoverCard = lis.eq(lis.length - 1); changeHoverCard(currentHoverCard); } } else { currentHoverCard = currentHoverCard.prev(); while (1) { if (currentHoverCard.length == 0 || currentHoverCard.hasClass("searchCard")) break; currentHoverCard = currentHoverCard.prev(); } if (currentHoverCard.length == 0) { $(".searchAnywhereMainInput > input").focus(); currentHoverCard = undefined; } changeHoverCard(currentHoverCard); } event.preventDefault(); } else if (event.keyCode == 40) { // Down if (currentHoverCard == undefined) { let lis = $(".searchCard"); if (lis.length == 0) $(".searchAnywhereMainInput > input").focus(); else { currentHoverCard = lis.eq(0); changeHoverCard(currentHoverCard); } } else { currentHoverCard = currentHoverCard.next(); while (1) { if (currentHoverCard.length == 0 || currentHoverCard.hasClass("searchCard")) break; currentHoverCard = currentHoverCard.next(); } if (currentHoverCard.length == 0) { $(".searchAnywhereMainInput > input").focus(); currentHoverCard = undefined; } changeHoverCard(currentHoverCard); } event.preventDefault(); } else if (event.keyCode == 13) { // Enter if (currentHoverCard != undefined) window.open(currentHoverCard.attr("href"), "_blank"); event.preventDefault(); } else if (event.keyCode == 9) event.preventDefault(); else $(".searchAnywhereMainInput > input").focus(); } }) });})(window.jQuery.noConflict(true));```
::::::::::::::info[洛谷验证码自动识别并填写 by 【数据删除】]{open}使用卷积神经网络训练的验证码识别模型,自动识别填写验证码。::::info[code]```// ==UserScript==// @name 洛谷验证码自动识别并填写// @namespace https://github.com/mayoi-Akira// @version 0.2.0// @description 使用卷积神经网络训练的验证码识别模型,自动识别填写洛谷提交时的验证码91 行未改动 handleImage(existingImg); }})();```
::::::::info[洛谷报名按钮解锁器 by 【数据删除】]:::::
:::::info[洛谷报名按钮解锁器 by 【数据删除】]{open}当洛谷比赛报名按钮出现时,会有 5s 倒计时,很烦人,本脚本可立即解除其禁用状态,方便报名。
::::info[code]```// ==UserScript==// @name 洛谷报名按钮解锁器 (Luogu Contest Button Unlocker)// @namespace https://github.com/your-username/luogu-unlocker98 行未改动
console.log('[洛谷解锁器] 脚本已激活,正在等待报名按钮出现...');})();```
::::::::info[[exlg](https://exlg.oss-cn-shanghai.aliyuncs.com/latest/dist/extend-luogu.min.user.js) by 【数据删除】]:::::
:::::info[[exlg](https://exlg.oss-cn-shanghai.aliyuncs.com/latest/dist/extend-luogu.min.user.js) by 【数据删除】]{open}使洛谷拥有更多功能,十分好用,例如随机跳题,便捷查询等。
::::info[code]```// ==UserScript==// @name extend-luogu// @namespace http://tampermonkey.net/185 行未改动全部展开 </div><br>`,"创建重现赛",async()=>{let e=g("#vpTmDt")[0].value.split("-"),t=g("#vpTmClk")[0].value.split(":"),r=new Date(e[0],e[1]-1,e[2],t[0],t[1],0,0);r=r.getTime()/1e3;let n=[],o={};g.each(E.contestProblems,(d,u)=>{n.push(String(u.problem.pid)),o[u.problem.pid]=u.problem.fullScore});let i=null;i=await we("/fe/api/contest/new",JSON.stringify({settings:{name:`Virtual Participation for ${E.contest.name}`,description:E.contest.description,visibilityType:5,invitationCodeType:1,ruleType:E.contest.ruleType,startTime:r,endTime:r+E.contest.endTime-E.contest.startTime,rated:!1,ratingGroup:null},hostID:C.uid}));let s=i.id.toString();(i.status??200)===200?s=i.id.toString():U(`Failed to modify contest ${s} with status code ${i.status}.`),i=null;try{i=await we(`/fe/api/contest/editProblem/${s}`,JSON.stringify({pids:n,scores:o}))}catch{return setTimeout(N("<p>本场比赛的题目不公开</p>","重现赛创建失败"),500),!1}let l=await X(`/contest/edit/${s}`);return await we(`/fe/api/contest/join/${s}`,`{"code": "${l.currentData.contest.joinCode}"}`),N(`<p>邀请码: ${l.currentData.contest.joinCode}</p> <p>点确定自动跳转</p>`,"重现赛创建成功",()=>(location.href=`https://www.luogu.com.cn/contest/${s}`,!0)),!1})})},Vr,"module");v.reg("meta-discussion-guiding","元讨论引导",["@/discuss/lists\\?forumname=(siteaffairs|problem|academics|relevantaffairs|service).*"],{},()=>{let e="432028",t=[/exlg/i,/ex(tend)?[- ]luogu/i,/badge/i],r=g("#newpost"),n=g(".lg-input-title"),o=g("#submitpost"),i=o.wrap("<div></div>").parent(),s=`<a href="/discuss/${e}"><b>专贴</b></a>`;r.after(`<p>exlg 相关问题请在 ${s} 讨论</p>`),i[0].addEventListener("click",l=>{let d=A.markdownPalettes.content?.toLowerCase(),u=n.val(),c=t.map(a=>[d.match(a)?.[0],u.match(a)?.[0]]).flat().filter((a,p,f)=>a&&a!==f[p+1]);if(c.length){l.stopPropagation();let a;N(`检测到您将要发送的讨论内容包含与 exlg 有关的关键词:<br />${c.map(p=>`“${p}”`).join(", ")}<br />建议前往 ${s} 讨论。<br />这是为了防止占用讨论资源,营造一个更高质量的社区。 <br />我们很担心 exlg 相关讨论霸占版面,造成负面影响。<br /><span style="color: orange"><b>洛谷管理员提醒您:发布无意义讨论可能导致禁言。</b> <br /><small>* 无意义讨论包括但不限于“大家看得到我的 badge 吗” 等等</small></span> <br />如果您确定要发送,请在下方输入框键入 “放心” 后确定。<br/><small comment>(输入框过一会才会出现)</small>`,"exlg 提醒您",{onconfirm:()=>!a||a.val()!=="放心"?!1:(setTimeout(o.trigger("click"),500),!0),onopen:async({dom:{$main:p}})=>{await Jt(3e3),p.find("small[comment]").remove(),a=g('<input type="text" />').appendTo(p)}})}},!0)},"","module");v.reg_lfe("import-problem-to-cph","添加到 cph",["@/problem/[A-Z]+[0-9]+[A-Z]*(#.*)?(\\?contestId=[0-9]*)?","@/record/.*","@/contest/[0-9]+(#.*)?"],{auto_hide_button:{ty:"boolean",dft:!0,strict:!0,info:["Auto Hide Button","自动隐藏按钮"]},problem_template:{ty:"string",dft:"Luogu_${pid}",info:["Custom Problemname Template (Not Contest)","自定义题目名称格式(非比赛)"]},contest_template:{ty:"string",dft:"Luogu_${cid}_${pid}",info:["Custom Problemname Template (Contest)","自定义题目名称格式(比赛)"]}},async e=>{function t(i,s="problem",l=0){g.get(i,d=>{function u(f){return new DOMParser().parseFromString(f,"text/html").documentElement}let c;d=u(d);for(let f of d.querySelectorAll("script")){let x=f.textContent;if(x.startsWith("window._feInjection")){let h=x.indexOf('"'),m=x.substr(h+1).indexOf('"'),b=x.substr(h+1,m);c=JSON.parse(decodeURIComponent(b)).currentData.problem}}if(c==null)throw new Error("Failed to find problem data");let a=[];for(let f of c.samples)a.push({input:f[0],output:f[1]});let p=e.msto.problem_template;s==="contest"&&(p=e.msto.contest_template,p=p.replace("${cid}",`${l}`)),p=p.replace("${pid}",c.pid),GM_xmlhttpRequest({url:"http://localhost:27121/",method:"POST",data:JSON.stringify({batch:{id:"exlg",size:1},name:p,group:"Luogu",url:i,interactive:"false",memoryLimit:Math.floor(Math.max(...c.limits.memory)/1024),timeLimit:Math.max(...c.limits.time),tests:a,input:{type:"stdin"},output:{type:"stdout"},language:{java:{mainClass:"Main",taskClass:c.pid}},testType:"single"}),onload(f){f.status===502&&N("未启动 cph,传输失败!")},onerror(){N("未启动 cph,传输失败!")}})})}if(!g("div.operation").length||window.location.href.search("/record/")!==-1)return;let r=new Promise(i=>{GM_xmlhttpRequest({url:"http://localhost:27121/",method:"POST",onload(){i(!0)},onerror(){i(!1)}})});function n(){window.location.href.search("/contest/")!==-1?g("button.exlg-cph").click(async()=>{let{href:i}=window.location,s=i.search("#");s!==-1&&(i=i.substring(0,s));let l=await X(i);l.currentData.contestProblems===null&&N("比赛未开始!");let d=l.currentData.contestProblems;for(let u=0;u<d.length;u++)t(`https://www.luogu.com.cn/problem/${d[u].problem.pid}`,"contest",l.currentData.contest.id)}):g("button.exlg-cph").click(()=>{t(window.location.href)})}!await r&&e.msto.auto_hide_button||(g("button.lfe-form-sz-middle").addClass("lg-btm"),window.location.href.search("#submit")===-1&&g("button.exlg-cph").length===0&&(g("div.operation").append('<button data-v-7ade990c="" data-v-43063e73="" type="button" class="exlg-cph lfe-form-sz-middle" data-v-2dfcfd35="" style="border-color: rgb(52, 152, 219); background-color: rgb(52, 152, 219);"> 传送至 cph </button>'),n()),g("button.lg-btm").click(()=>{window.location.href.search("#submit")===-1?g("button.exlg-cph").length===0&&(g("button.lfe-form-sz-middle").addClass("lg-btm"),g("div.operation").append('<button data-v-7ade990c="" data-v-43063e73="" type="button" class="exlg-cph lfe-form-sz-middle" data-v-2dfcfd35="" style="border-color: rgb(52, 152, 219); background-color: rgb(52, 152, 219);"> 传送至 cph </button>'),n()):g("button.exlg-cph").remove()}))},null,"module");var Fr=e=>JSON.parse(JSON.stringify(e)),F=(e,t)=>{throw globalThis[e](`[ProxyData] ${t}`)},pt=()=>({get:GM_getValue,set:GM_setValue,del:GM_deleteValue,list:GM_listValues});var ni=e=>e?.__scm__?.ty?e.__scm__.ty:e===null?"null":Array.isArray(e)?"array":e instanceof RegExp?"regexp":typeof e,oi={string_number:e=>+e,string_regexp:e=>e,number_string:e=>""+e,number_boolean:e=>!!e},ii={object:{layer:1,container:()=>({})},tuple:{layer:1,container:()=>[]},array:{layer:2,container:()=>[],api:(e,t,r=t.__scm__,n=t.__tar__)=>({$new(o,i=1){for(let s=o+i;o<s;o++){let l=e.scm.lvs[s];l&&F("ReferenceError",`Leaf @ ${l.path} already exists, but was attempted to re-new.`),Je(e,s,t,n,!0)}},get $length(){return r.lvs.length},$push(...o){return o.forEach(i=>t[r.lvs.length]=i),r.lvs.length},$fill(o,i=0,s=r.lvs.length){for(;i<s;i++)t[i]=o;return t},$pop(){let o=r.lvs.length,i=t[o-1];return delete t[o-1],r.lvs.length--,i},$splice(o,i){let s=r.lvs.length;for(i??=s,i=Math.min(s-o,i);o<s;o++)t[o]=o+i<s?t[o+i]:void 0;r.lvs.length-=i},$swap(o,i){t.__tmp__=t[o],t[o]=t[i],t[i]=t.__tmp__,delete t.__tmp__},$reverse(){let o=r.lvs.length,i=Math.floor(o/2);for(let s=0;s<i;s++)s in r.lvs&&t.$swap(s,o-s-1);return t},$includes(o){let i=r.lvs.length;for(let s=0;s<i;s++)if(s in r.lvs&&o===t[s])return!0;return!1},$indexOf(o){let i=r.lvs.length;for(let s=0;s<i;s++)if(s in r.lvs&&o===t[s])return+s;return-1},$lastIndexOf(o){for(let i=r.lvs.length-1;i>=0;i--)if(i in r.lvs&&o===t[i])return+i;return-1},$find(o){let i=r.lvs.length;for(let s=0;s<i;s++)if(s in r.lvs){let l=t[s];if(o(l))return l}},$findIndex(o){let i=r.lvs.length;for(let s=0;s<i;s++)if(s in r.lvs){let l=t[s];if(o(l))return+s}},$forEach(o){let i=r.lvs.length;for(let s=0;s<i;s++)s in r.lvs&&o(t[s],+s,t)},$at(o){return o<0?t[r.lvs.length+o]:t[o]},*[Symbol.iterator](){for(let o in r.lvs)yield t[o]}})}},Je=(e,t,r,n,o)=>{let{data:i,map:s,scm:l,oldRoot:d,old:u,access:c}=e;o&&(l.lvs[t]=Fr(l.itm));let a=l.lvs[t];a.path=(l.path??"")+"."+t;let p=ii[a.ty];a.layer=p?.layer??0,a.layer&&(i[t]=p.container(),a.layer>1&&(a.lvs=p.container()));let f=h=>JSON.stringify(h,null,2)+": ";a.ty==="enum"&&(a.get??="val",a.set??="val",a.fromOld=h=>{let m=a.set;a.set="id",r[t]=h,a.set=m},a.get!=="both"&&a.set==="both"&&F("SyntaxError",f(a)+"{ ty: 'enum' → ¬(get: 'both' ∧ set: ¬ 'both') }")),a.ty==="tuple"&&(a.lvs=a.lvs.flatMap(h=>{let m=1;return"repeat"in h&&(m=h.repeat,(typeof m!="number"||m<0||m%1)&&F("SyntaxError",f(a)+"{ ty: 'tuple' → itm: [ ∀ i: { repeat?: integer } } ]"),delete h.repeat),Array.from({length:m},()=>Fr(h))})),s(a),a.pathRoot=a.root?"#"+a.path:l.pathRoot??t,a.raw=(a.root?null:l.raw)??(()=>i[t]);let x={data:i[t],map:s,scm:a,oldRoot:d,old:u?.[t],access:c};if(a.layer)n[t]=Hr(x);else{let h=a.root?d[a.pathRoot]:u?.[t];h!==void 0?a.ty==="enum"?a.fromOld(h):r[t]=h:"dft"in a&&(r[t]=a.dft)}p?.api&&(a.api=p.api(x,n[t]))},Hr=e=>{let{data:t,scm:r,oldRoot:n,old:o,access:i}=e,s={},l=`Parent ${r.ty} @ ${r.path}`,d=c=>{if(typeof c!="symbol"&&r.ty==="array"){let a=l+` requires the index to be in [ ${r.minIdx??=0}, ${r.maxIdx??=1/0} ], but got ${c}. `;(c<r.minIdx||c>r.maxIdx)&&F("RangeError",a)}},u=new Proxy(s,{get:(c,a)=>{if(a==="__scm__")return r;if(a==="__tar__")return s;if(r.api&&a in r.api)return r.api[a];if(d(a),!r.lvs[a])switch(r.layer){case 1:F("TypeError",l+` doesn't have leaf ${a}.`);break;case 2:return}let p=r.lvs[a];if(p.ty==="enum")switch(p.get){case"id":return s[a];case"val":return p.vals[s[a]];case"both":return{get id(){return s[a]},set id(f){let x=p.set;p.set="id",u[a]=f,p.set=x},get val(){return p.vals[s[a]]},set val(f){let x=p.set;p.set="val",u[a]=f,p.set=x}}}return s[a]},set:(c,a,p)=>{if(d(a),!r.lvs[a])switch(r.layer){case 1:F("TypeError",l+` doesn't have leaf ${a}.`);break;case 2:Je(e,a,u,s,!0);break}r.api&&a in r.api&&F("TypeError",l+` has API ${a}. Failed.`);let f=r.lvs[a],x=`Leaf @ ${f.path}`,h="Failed strictly.",m=x+` is ${["simple","fixed complex","flexible complex"][f.layer]} type, `;f.locked&&F("TypeError",x+" is locked, but was attempted to modify.");let b=ni(p);if(b==="undefined"){if(r.layer===1&&!r.del&&F("TypeError",m+"but its "+x+" was attempted to delete."),f.layer){f.del=!0;for(let w in f.lvs)delete s[a][w]}delete r.lvs[a]}else if(b==="array"&&f.lvs instanceof Array||b==="object"&&f.lvs&&!(f.lvs instanceof Array)){for(let w in f.lvs)s[a][w]=p[w];return!0}else if(!["any","enum"].includes(f.ty)&&b!==f.ty){let w=x+` requires type ${f.ty}, but got ${b}: ${p}. `;f.strict&&F("TypeError",w+h);let k=oi[`${b}_${f.ty}`];k?p=k(p):F("TypeError",w+"Failed to convert.")}if(f.ty==="number"){let w=x+` requires to be in [ ${f.min??-1/0}, ${f.max??1/0} ], but got ${p}. `;(p<f.min||p>f.max)&&F("RangeError",w),f.int&&p%1&&(f.strict&&F("RangeError",x+" requires to be an integer. "+h),p=Math.floor(p))}else if(f.ty==="enum")switch(f.set){case"id":(typeof p!="number"||!p in f.vals)&&F("RangeError",x+` requires to be an enum index in [ ${0}, ${f.vals.length} ], but got ${p}.`);break;case"val":p=f.vals.findIndex(w=>w===p),p<0&&F("RangeError",x+` requires to be in the enum { ${f.vals.join(", ")} }, but got ${p}.`);break;case"both":F("TypeError",x+" is an enum accepting both id and value ways of modification, but was attempted to modify without using any setter.")}if(s[a]=t[a]=p,f.quick||f.root){let w=f.raw();w===void 0?i.del(f.pathRoot):i.set(f.pathRoot,w)}return!0},deleteProperty:(c,a)=>(u[a]=void 0,!0),has:(c,a)=>a in r.lvs});switch(r.layer){case 1:for(let a in r.lvs)Je(e,a,u,s);break;case 2:(r.itmRoot?Object.keys(n).map(a=>a.match(String.raw`^#${r.path}\.([^.]+)`)?.[1]).filter(a=>a):Object.keys(o??{})).forEach(a=>Je(e,a,u,s,!0));break}return u},Se=class{loadData(t,{access:r,autoSave:n,old:o,map:i}){return this.raw&&F("Error","ProxyData cannot be loaded multiple times."),this.raw={},this.access=r,o??=r.list().reduce((s,l)=>(s[l]=r.get(l),s),{}),n&&window.addEventListener("beforeunload",()=>this.saveData()),Hr({data:this.raw,scm:{lvs:t,layer:1},map:i??(s=>s),old:o,oldRoot:o,access:r})}saveData(t=this.raw){Object.keys(t).forEach(r=>this.access.set(r,t[r]))}clearData(){this.raw=null,this.access.list().forEach(this.access.del)}};M("Exposing");var Jr=new Se,Qr=Jr.loadData({settingVersion:{ty:"number",dft:0}},{access:pt()});Qr.settingVersion===0&&(GM_listValues().every(e=>typeof GM_getValue(e)=="string")&&GM_listValues().forEach(e=>GM_setValue(e,JSON.parse(GM_getValue(e)))),Qr.settingVersion=1,Jr.saveData());var Wr=new Se,Xr=Wr.loadData(J,{access:pt(),map:e=>{e.root=!e.rec,e.itmRoot=e.rec===2}});v.fake_sto=oe.sto=Xr;Object.assign(A,{exlg:{mod:v,compo:oe,scm:J,log:M,error:U,queues:ce,springboard:Pe,version_cmp:pe,lg_alert:Wt,lg_content:X,register_badge:He,lg_post:we,exlg_alert:N,xss:me,pd:Wr,sto:Xr},GM:{GM_info,GM_addStyle,GM_setClipboard,GM_xmlhttpRequest,GM_getValue,GM_setValue,GM_deleteValue,GM_listValues},$$:g});v.preload();v.execute_v2();ce.preload.apply();g(()=>{M("Launching"),ce.onload.apply()});})();```:::::::::
::::info[Luogu Problem Jumper]:::::info[Luogu Problem Jumper by [Anguei](https://www.luogu.com.cn/user/53062)]{open}
双击题号,自动跳转。只要是题号,不管是在讨论区又或者是犇犇,均能跳转。::::info[code]```// ==UserScript==// @name Luogu Problem Jumper// @version 2.061 行未改动 document.ondblclick = jump;}```::::::::info[Luogu Renders Emojis by [$\color{FFD776}Maxmilite$](https://www.luogu.com.cn/user/274993)]::::::::::info[Luogu Renders Emojis by [Maxmilite](https://www.luogu.com.cn/user/274993)]{open}为洛谷渲染表情包,有锅,现在不能自动渲染表情包了,但左下角可以手动查询。::::info[code]```// ==UserScript==// @name Luogu Renders Emojis// @namespace zym201325 行未改动(function(_0x17eed0,_0x24ed41){const lse_0x2bc222={_0x41b2b9:0x293,_0x550655:'\x30\x78\x35\x30\x63',_0x53e43d:'\x30\x78\x32\x39\x36',_0x2785e5:'\x32\x51\x4d\x5a',_0x28f53f:0x4d0,_0x55d4b3:0x447,_0x382239:'\x30\x78\x33\x38\x63',_0x167a17:0x2f6},_0x503e97=lse_0x2ccc,_0x39b545=lse_0x458b,_0x14fd84=_0x17eed0();while(!![]){try{const _0x2602e9=-parseInt(_0x39b545(lse_0x2bc222._0x41b2b9))/(-0x425+0x20e*-0xa+0x18b2)*(parseInt(_0x503e97('\x30\x78\x33\x32\x38','\x61\x69\x34\x6d'))/(-0x22a1+0x2*-0x25+0x22ed))+parseInt(_0x39b545(lse_0x2bc222._0x550655))/(-0x34d*-0x5+-0x8de*-0x1+-0x195c)+parseInt(_0x503e97(lse_0x2bc222._0x53e43d,lse_0x2bc222._0x2785e5))/(0x1e00+-0x76*0x1+-0x1d86*0x1)*(parseInt(_0x503e97(0x544,'\x65\x67\x24\x63'))/(-0x2338+-0xe12+0xd*0x3cb))+-parseInt(_0x39b545(0x607))/(-0x1d*0x68+-0xe5*-0x1d+-0xe23)*(-parseInt(_0x503e97(lse_0x2bc222._0x28f53f,'\x64\x6c\x70\x52'))/(0x1001+0x14e*-0x3+-0xc10))+parseInt(_0x39b545(lse_0x2bc222._0x55d4b3))/(0x62a+-0x1*0x1c58+0x1636)*(-parseInt(_0x39b545(lse_0x2bc222._0x382239))/(-0x1025+0x1a52+-0xa24))+parseInt(_0x39b545('\x30\x78\x34\x33\x33'))/(0x1*-0x161+-0x6*-0x652+-0x2481)*(parseInt(_0x39b545('\x30\x78\x35\x61\x38'))/(-0x1a37+-0x5ed*0x5+0x37e3))+-parseInt(_0x39b545(lse_0x2bc222._0x167a17))/(-0x13*0x157+-0x2*-0xd43+0x9*-0x1d)*(parseInt(_0x503e97('\x30\x78\x33\x66\x34','\x43\x57\x75\x77'))/(-0x19b2*0x1+0x9d*0x2+0x1885));if(_0x2602e9===_0x24ed41)break;else _0x14fd84['push'](_0x14fd84['shift']());}catch(_0x345fdd){_0x14fd84['push'](_0x14fd84['shift']());}}}(lse_0x2e2e,0x8019b+-0x4af8f+0x25550*0x1));function lse_0x2ccc(_0x2722f0,_0x40b5a4){const _0x202e75=lse_0x2e2e();return lse_0x2ccc=function(_0x155400,_0x33cdb4){_0x155400=_0x155400-(0x2b2+0x1*-0x61b+0x4fe);let _0x2474e7=_0x202e75[_0x155400];if(lse_0x2ccc['\x4d\x72\x53\x76\x7a\x52']===undefined){var _0xe369fe=function(_0x504436){const _0xf57deb='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x377863='',_0x297708='',_0x762ea1=_0x377863+_0xe369fe;for(let _0x4f2eed=0x11e9+-0x1*-0x201d+-0x3206,_0x39cf50,_0x1d84fe,_0x5ba26a=0x60a+-0x25e+-0x3ac;_0x1d84fe=_0x504436['\x63\x68\x61\x72\x41\x74'](_0x5ba26a++);~_0x1d84fe&&(_0x39cf50=_0x4f2eed%(-0x1fe8+-0x37*-0x35+0x1489)?_0x39cf50*(0xb5*0x1+-0x13bb+-0x1*-0x1346)+_0x1d84fe:_0x1d84fe,_0x4f2eed++%(-0x2475+0x5e6+0x1*0x1e93))?_0x377863+=_0x762ea1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5ba26a+(0x6*0x320+-0x5*0x24f+-0x72b))-(0x25bf+0xa3d*0x1+0x17f9*-0x2)!==-0x1b09+0x109+-0x80*-0x34?String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x1ca2+-0x638+0x23d9&_0x39cf50>>(-(-0xaba+-0x255*-0x2+0x612)*_0x4f2eed&0x1a1*0x1+0x8*0x2+-0x1ab)):_0x4f2eed:-0x8d5*-0x1+-0x20b6+0x17e1){_0x1d84fe=_0xf57deb['\x69\x6e\x64\x65\x78\x4f\x66'](_0x1d84fe);}for(let _0x204afd=-0xa3b+0x2130+0x3*-0x7a7,_0x57959e=_0x377863['\x6c\x65\x6e\x67\x74\x68'];_0x204afd<_0x57959e;_0x204afd++){_0x297708+='\x25'+('\x30\x30'+_0x377863['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x204afd)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](-0x2*-0x1134+-0x2251*0x1+-0x7))['\x73\x6c\x69\x63\x65'](-(0xf1*-0x11+-0xda8+0x1dab));}return decodeURIComponent(_0x297708);};const _0x19e06d=function(_0x89e6d0,_0x3754f9){let _0x1d786d=[],_0x48cb60=-0x8a1*-0x3+0x22bb+-0x3c9e,_0x58d62a,_0x5882f8='';_0x89e6d0=_0xe369fe(_0x89e6d0);let _0x95debf;for(_0x95debf=0x1a5*0x3+-0x11b3*-0x1+-0x16a2;_0x95debf<0x3*0x665+0x4ed+-0xae*0x22;_0x95debf++){_0x1d786d[_0x95debf]=_0x95debf;}for(_0x95debf=0xf90+-0x3*-0x7fd+-0x2787;_0x95debf<0xc79+-0x24f1+-0xcbc*-0x2;_0x95debf++){_0x48cb60=(_0x48cb60+_0x1d786d[_0x95debf]+_0x3754f9['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x95debf%_0x3754f9['\x6c\x65\x6e\x67\x74\x68']))%(0x167e+0x1*-0x1b7+0x1*-0x13c7),_0x58d62a=_0x1d786d[_0x95debf],_0x1d786d[_0x95debf]=_0x1d786d[_0x48cb60],_0x1d786d[_0x48cb60]=_0x58d62a;}_0x95debf=-0x106e+-0x22b0+0x331e,_0x48cb60=-0x23f6*0x1+0x7b5+0x1c41;for(let _0x5c8d63=0x1bc2+-0x1*-0xb9f+0x11*-0x251;_0x5c8d63<_0x89e6d0['\x6c\x65\x6e\x67\x74\x68'];_0x5c8d63++){_0x95debf=(_0x95debf+(-0x1*0x1ada+0x372+0x1769))%(0xc00+-0xc0b+0x10b),_0x48cb60=(_0x48cb60+_0x1d786d[_0x95debf])%(-0x249*0x2+0x20ce+-0x6*0x48a),_0x58d62a=_0x1d786d[_0x95debf],_0x1d786d[_0x95debf]=_0x1d786d[_0x48cb60],_0x1d786d[_0x48cb60]=_0x58d62a,_0x5882f8+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x89e6d0['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5c8d63)^_0x1d786d[(_0x1d786d[_0x95debf]+_0x1d786d[_0x48cb60])%(-0x24ac+-0x22f+0x27db)]);}return _0x5882f8;};lse_0x2ccc['\x6e\x6e\x48\x46\x7a\x56']=_0x19e06d,_0x2722f0=arguments,lse_0x2ccc['\x4d\x72\x53\x76\x7a\x52']=!![];}const _0x4e5c31=_0x202e75[-0x1*0x1bf6+0x2*0xf93+-0x330],_0x1fb782=_0x155400+_0x4e5c31,_0x3df188=_0x2722f0[_0x1fb782];if(!_0x3df188){if(lse_0x2ccc['\x6b\x52\x62\x72\x42\x42']===undefined){const _0x2d648e=function(_0x22049a){this['\x61\x6d\x79\x70\x77\x77']=_0x22049a,this['\x65\x58\x54\x68\x66\x76']=[0x1*0x1daa+-0x2591+0x7e8,-0x174f+-0x57*-0xc+0x133b*0x1,0x2*0x4e6+-0x4ed+0x2b*-0x1d],this['\x76\x6d\x54\x79\x54\x79']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x45\x43\x67\x76\x6b\x63']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x66\x77\x59\x55\x4a\x7a']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x2d648e['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x50\x50\x47\x48\x72\x49']=function(){const _0x1c19da=new RegExp(this['\x45\x43\x67\x76\x6b\x63']+this['\x66\x77\x59\x55\x4a\x7a']),_0x45b4ba=_0x1c19da['\x74\x65\x73\x74'](this['\x76\x6d\x54\x79\x54\x79']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x65\x58\x54\x68\x66\x76'][0x280+-0x1c27*-0x1+-0x1ea6]:--this['\x65\x58\x54\x68\x66\x76'][0x12c8+-0x2*0xdc9+-0x177*-0x6];return this['\x51\x45\x55\x70\x67\x64'](_0x45b4ba);},_0x2d648e['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x51\x45\x55\x70\x67\x64']=function(_0x1e8ff3){if(!Boolean(~_0x1e8ff3))return _0x1e8ff3;return this['\x50\x79\x4c\x4d\x63\x41'](this['\x61\x6d\x79\x70\x77\x77']);},_0x2d648e['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x50\x79\x4c\x4d\x63\x41']=function(_0x84f0e9){for(let _0xe27b72=-0xbc7+-0xb82+0x1749,_0x28d976=this['\x65\x58\x54\x68\x66\x76']['\x6c\x65\x6e\x67\x74\x68'];_0xe27b72<_0x28d976;_0xe27b72++){this['\x65\x58\x54\x68\x66\x76']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x28d976=this['\x65\x58\x54\x68\x66\x76']['\x6c\x65\x6e\x67\x74\x68'];}return _0x84f0e9(this['\x65\x58\x54\x68\x66\x76'][0x16cd+-0xd00+-0x9cd*0x1]);},new _0x2d648e(lse_0x2ccc)['\x50\x50\x47\x48\x72\x49'](),lse_0x2ccc['\x6b\x52\x62\x72\x42\x42']=!![];}_0x2474e7=lse_0x2ccc['\x6e\x6e\x48\x46\x7a\x56'](_0x2474e7,_0x33cdb4),_0x2722f0[_0x1fb782]=_0x2474e7;}else _0x2474e7=_0x3df188;return _0x2474e7;},lse_0x2ccc(_0x2722f0,_0x40b5a4);}function lse_0x3612f6(_0x290ae8,_0x161f03){const _0x312074=lse_0x2ccc,_0x1ad124=lse_0x458b,_0x9ac7bc={'\x62\x59\x45\x4d\x73':function(_0x24622a){return _0x24622a();},'\x4e\x73\x6b\x5a\x47':function(_0x2fca56,_0x3e2f25,_0x159c8e){return _0x2fca56(_0x3e2f25,_0x159c8e);}},_0x3d1dbc=_0x9ac7bc[_0x1ad124('\x30\x78\x32\x39\x35')](lse_0x11a427);return lse_0x3612f6=function(_0x5e9ed4,_0x1c697e){_0x5e9ed4=_0x5e9ed4-(-0x110e+-0xe6+0x125e*0x1);let _0x4b4183=_0x3d1dbc[_0x5e9ed4];return _0x4b4183;},_0x9ac7bc[_0x312074('\x30\x78\x34\x36\x61','\x73\x58\x47\x26')](lse_0x3612f6,_0x290ae8,_0x161f03);}function lse_0x2e2e(){const _0x435759=['\x57\x51\x4b\x51\x57\x36\x56\x63\x49\x61','\x74\x31\x42\x63\x48\x32\x4e\x64\x56\x47','\x44\x67\x76\x69\x72\x33\x47','\x75\x30\x72\x75\x72\x77\x71','\x57\x37\x58\x30\x57\x52\x69\x79','\x73\x65\x58\x6a\x74\x77\x71','\x41\x67\x66\x5a\x74\x33\x44\x55\x75\x68\x6a\x56\x43\x61','\x57\x52\x37\x64\x51\x74\x68\x63\x4c\x6d\x6b\x67\x76\x33\x4f\x42\x42\x78\x4b','\x57\x34\x53\x7a\x69\x38\x6b\x70\x57\x35\x6d','\x57\x4f\x64\x64\x52\x31\x44\x5a\x72\x67\x46\x63\x53\x43\x6b\x39\x57\x36\x6d\x6f','\x6d\x64\x47\x58\x6c\x32\x48\x30\x44\x68\x62\x5a\x6f\x47','\x6d\x74\x71\x58','\x43\x30\x39\x58\x77\x75\x38','\x57\x52\x74\x64\x49\x74\x64\x63\x49\x43\x6b\x6c','\x41\x77\x54\x65\x43\x4b\x34','\x74\x75\x58\x6a\x7a\x65\x6d','\x79\x71\x4e\x64\x4c\x71','\x6d\x74\x75\x31','\x57\x34\x4a\x63\x55\x43\x6b\x55','\x75\x31\x62\x4e\x74\x66\x43','\x63\x65\x2f\x64\x51\x61\x53\x49\x57\x36\x6d\x33\x6b\x73\x53\x65','\x78\x5a\x5a\x64\x56\x62\x52\x64\x4f\x38\x6b\x50','\x35\x35\x2b\x43\x35\x35\x32\x51\x35\x35\x2b\x58','\x71\x32\x58\x75\x79\x75\x57','\x57\x52\x2f\x64\x4b\x32\x52\x63\x4c\x53\x6f\x63','\x43\x59\x39\x54\x79\x77\x4c\x55\x6c\x30\x58\x74\x72\x71','\x73\x78\x72\x7a\x79\x4b\x57','\x6b\x75\x48\x66\x6a\x49\x70\x64\x4d\x32\x4a\x64\x4b\x6d\x6b\x35\x66\x57','\x73\x31\x42\x63\x4b\x76\x4a\x64\x49\x57','\x76\x66\x62\x58\x77\x66\x71','\x79\x43\x6b\x32\x57\x51\x50\x4d\x57\x51\x4a\x63\x47\x30\x6c\x63\x54\x6d\x6f\x45\x57\x51\x75','\x44\x67\x76\x34\x44\x63\x31\x48\x42\x67\x4c\x4e\x42\x47','\x57\x4f\x4f\x7a\x42\x53\x6f\x39\x57\x52\x2f\x64\x4b\x38\x6b\x34\x57\x36\x65\x46\x78\x71','\x7a\x66\x50\x76\x7a\x33\x68\x63\x4b\x65\x33\x64\x4c\x6d\x6b\x32\x63\x47','\x74\x76\x66\x5a\x75\x32\x30','\x64\x61\x4c\x74\x62\x6d\x6f\x58\x57\x4f\x53\x67\x57\x51\x6c\x63\x4b\x6d\x6b\x63','\x57\x52\x58\x6b\x57\x52\x43\x68\x66\x76\x6c\x63\x53\x4d\x33\x64\x4b\x47','\x44\x67\x76\x5a\x44\x61','\x57\x35\x35\x73\x57\x34\x46\x63\x50\x43\x6f\x2f\x57\x35\x70\x64\x4a\x38\x6b\x2f\x69\x43\x6f\x38','\x7a\x68\x6d\x56\x42\x77\x66\x50\x42\x49\x39\x32\x7a\x71','\x57\x35\x79\x30\x61\x73\x70\x64\x4f\x30\x56\x64\x55\x43\x6b\x69\x41\x47\x61','\x43\x32\x35\x48\x43\x68\x6e\x4f\x42\x33\x72\x6d\x7a\x71','\x6c\x32\x44\x4f\x6c\x32\x48\x35\x79\x5a\x65\x59\x6d\x57','\x79\x67\x48\x39\x46\x53\x6f\x4a','\x6d\x74\x75\x35\x6e\x74\x4b\x5a\x42\x66\x44\x4c\x71\x4b\x72\x74','\x35\x4f\x49\x72\x36\x79\x77\x34\x35\x6c\x51\x67','\x75\x65\x31\x41\x7a\x78\x43','\x41\x68\x72\x30\x43\x68\x6d\x36\x6c\x59\x39\x49\x7a\x57','\x57\x50\x4e\x63\x48\x6d\x6f\x33\x57\x4f\x79\x44','\x57\x50\x64\x63\x4a\x6d\x6b\x6f\x57\x4f\x4f\x77\x57\x52\x30\x73\x72\x71\x6e\x43','\x57\x51\x38\x31\x57\x50\x75','\x57\x37\x31\x39\x6a\x62\x53\x54\x6d\x38\x6f\x46\x57\x51\x4e\x63\x51\x43\x6f\x51','\x6f\x4a\x79\x32\x6f\x74\x4b\x56\x41\x68\x72\x30\x43\x61','\x57\x37\x38\x48\x6f\x65\x38','\x6f\x74\x4b\x35\x6f\x71','\x44\x4d\x76\x59\x43\x32\x4c\x56\x42\x47','\x6d\x74\x47\x35','\x43\x66\x44\x78\x75\x4b\x4b','\x75\x65\x4c\x73\x74\x68\x79','\x36\x7a\x41\x50\x72\x4c\x50\x31\x7a\x43\x6b\x61\x78\x43\x6f\x73\x57\x52\x7a\x74','\x57\x50\x76\x5a\x57\x36\x72\x4a\x57\x51\x30\x56','\x6c\x4d\x50\x5a\x42\x32\x34','\x6d\x53\x6f\x5a\x69\x43\x6b\x42\x57\x37\x6d','\x57\x35\x47\x66\x66\x53\x6b\x43\x57\x34\x57','\x57\x4f\x30\x37\x57\x50\x47\x30\x57\x50\x47\x78\x57\x50\x76\x62\x57\x51\x4a\x63\x49\x71','\x75\x4d\x58\x4b\x72\x66\x4f','\x71\x4e\x4c\x6a\x7a\x61','\x57\x37\x4f\x6b\x69\x62\x64\x63\x4a\x74\x4f\x4a','\x57\x37\x78\x64\x48\x6d\x6b\x6b\x57\x51\x43\x59\x77\x4d\x68\x64\x4f\x4c\x56\x63\x4e\x47','\x57\x35\x71\x54\x61\x53\x6b\x63\x57\x37\x57','\x65\x43\x6f\x73\x57\x51\x65\x52\x6a\x71','\x57\x51\x30\x36\x57\x34\x69\x6b\x57\x34\x4a\x63\x48\x38\x6f\x6f\x67\x61\x46\x63\x53\x47','\x42\x4e\x71\x55\x79\x32\x39\x54\x6c\x33\x50\x35\x42\x71','\x44\x67\x6e\x71\x76\x4d\x43','\x35\x79\x2b\x5a\x35\x7a\x6f\x38\x35\x7a\x6f\x38','\x42\x77\x76\x55\x44\x65\x7a\x59\x79\x77\x44\x54\x7a\x71','\x73\x66\x7a\x56\x43\x67\x30','\x42\x67\x75\x39\x69\x4d\x31\x48\x43\x4d\x44\x50\x42\x47','\x42\x65\x31\x4f\x7a\x77\x30','\x35\x79\x77\x4c\x69\x65\x4c\x65\x69\x6f\x41\x69\x4c\x55\x41\x70\x4a\x2b\x49\x2f\x53\x6f\x2b\x38\x49\x6f\x77\x4d\x47\x47','\x57\x50\x48\x70\x72\x38\x6f\x67\x69\x61','\x44\x67\x4c\x54\x7a\x77\x39\x31\x44\x61','\x69\x65\x31\x50\x43\x4e\x6a\x56\x43\x49\x61\x33','\x45\x77\x58\x4c\x70\x73\x6a\x4d\x42\x32\x35\x30\x6c\x71','\x74\x65\x66\x32\x73\x30\x53','\x57\x35\x34\x2b\x62\x64\x5a\x63\x54\x61','\x41\x64\x4f\x47\x79\x32\x66\x53\x79\x59\x47\x58\x6d\x61','\x41\x68\x72\x30\x43\x64\x4f\x56\x6c\x32\x50\x57\x6c\x71','\x43\x78\x76\x56\x44\x64\x56\x56\x56\x69\x57\x4d\x43\x78\x76\x56','\x35\x41\x41\x72\x36\x7a\x55\x64\x35\x6c\x49\x50','\x57\x51\x74\x63\x4c\x43\x6f\x6d\x57\x37\x2f\x64\x55\x61','\x57\x35\x4a\x63\x47\x43\x6b\x75\x57\x52\x33\x64\x4b\x61','\x65\x38\x6b\x30\x57\x36\x61','\x57\x51\x53\x70\x75\x38\x6b\x35\x57\x36\x69','\x57\x4f\x42\x63\x48\x43\x6b\x46\x57\x52\x37\x64\x4a\x76\x54\x74\x57\x50\x56\x64\x4f\x38\x6b\x69','\x43\x49\x33\x63\x53\x68\x6d\x54','\x76\x68\x7a\x35\x44\x65\x30','\x79\x32\x39\x55\x43\x33\x72\x59\x44\x77\x6e\x30\x42\x57','\x6f\x43\x6f\x79\x69\x6d\x6b\x6c\x57\x34\x2f\x64\x54\x43\x6f\x4b\x57\x52\x43','\x7a\x4d\x39\x59\x72\x77\x66\x4a\x41\x61','\x76\x68\x7a\x67\x76\x4c\x69','\x42\x31\x62\x4c\x44\x30\x69','\x46\x47\x78\x63\x53\x76\x4f\x4c\x57\x36\x79\x7a\x41\x4d\x71\x53','\x74\x78\x66\x4c\x41\x68\x43','\x57\x51\x42\x64\x55\x4d\x50\x47\x6c\x53\x6b\x5a\x57\x52\x53','\x57\x34\x4c\x51\x79\x62\x78\x64\x49\x57\x52\x64\x50\x53\x6b\x73\x69\x47\x65','\x6c\x6d\x6f\x4c\x57\x37\x4e\x63\x4f\x43\x6b\x75','\x57\x51\x71\x50\x57\x37\x4a\x64\x47\x63\x7a\x34\x57\x36\x43\x56\x57\x36\x58\x48','\x41\x68\x72\x30\x43\x64\x4f\x56\x6c\x32\x50\x57\x6d\x71','\x43\x76\x44\x5a\x75\x33\x47','\x57\x37\x6c\x64\x54\x6d\x6b\x4f','\x76\x64\x52\x63\x53\x6d\x6b\x39\x57\x51\x61','\x57\x50\x64\x64\x56\x30\x76\x30\x62\x67\x65','\x57\x37\x4e\x63\x4a\x71\x42\x63\x4f\x6d\x6b\x34','\x6d\x74\x79\x30','\x57\x34\x4b\x67\x6f\x53\x6f\x30\x57\x4f\x78\x64\x47\x53\x6b\x52\x57\x36\x35\x2b\x65\x61','\x74\x65\x54\x71\x71\x32\x69','\x6d\x59\x39\x62\x42\x77\x66\x36\x41\x77\x35\x4e\x6c\x71','\x7a\x4e\x7a\x77\x42\x78\x4b','\x37\x37\x59\x6d\x35\x50\x59\x61\x35\x50\x41\x57\x35\x34\x4d\x69\x35\x50\x59\x53\x35\x50\x49\x56\x69\x68\x79','\x6d\x4a\x65\x59\x6d\x74\x4c\x65\x76\x30\x6e\x36\x42\x77\x53','\x43\x59\x30\x59\x6d\x61','\x57\x51\x31\x4c\x57\x51\x47\x7a\x65\x71','\x57\x51\x4c\x63\x57\x51\x69\x37\x6c\x61','\x6e\x53\x6f\x71\x77\x6d\x6f\x50\x66\x38\x6b\x43\x57\x4f\x74\x64\x55\x68\x37\x63\x4a\x57','\x7a\x77\x35\x30\x43\x4d\x4c\x4c\x43\x57','\x44\x75\x66\x6e\x79\x30\x30','\x71\x4d\x66\x57\x43\x75\x57','\x43\x59\x30\x58\x6d\x31\x38\x30','\x75\x78\x4c\x70\x73\x77\x4b','\x57\x52\x66\x74\x57\x51\x57\x44\x72\x49\x4e\x64\x50\x68\x42\x64\x48\x43\x6b\x4a','\x74\x68\x4c\x31\x45\x65\x53','\x74\x6d\x6b\x69\x6c\x38\x6b\x2b\x77\x71','\x6c\x32\x31\x48\x41\x77\x34\x56\x44\x4d\x76\x59\x43\x57','\x74\x31\x44\x59\x76\x33\x47','\x57\x4f\x46\x64\x4b\x33\x4a\x63\x4e\x6d\x6f\x4f','\x7a\x4b\x6e\x70\x73\x4c\x4b','\x7a\x78\x6a\x4a\x42\x32\x35\x30\x7a\x77\x35\x30\x6c\x47','\x43\x32\x76\x53\x7a\x77\x6e\x30\x41\x77\x39\x55\x75\x57','\x63\x53\x6f\x73\x79\x75\x53\x63','\x72\x78\x6e\x57\x7a\x32\x38','\x43\x33\x6e\x57\x41\x68\x75','\x75\x74\x52\x63\x4e\x53\x6b\x55\x57\x4f\x79','\x6f\x4c\x68\x63\x4b\x47\x39\x45','\x43\x76\x44\x6d\x76\x30\x4b','\x57\x36\x71\x2f\x57\x37\x78\x63\x4f\x5a\x38','\x74\x33\x76\x30\x43\x68\x76\x30\x69\x65\x58\x50\x42\x71','\x41\x73\x31\x5a\x7a\x77\x66\x59\x79\x32\x47\x54\x41\x71','\x57\x51\x4f\x46\x57\x4f\x54\x5a\x57\x50\x4b','\x63\x30\x37\x64\x52\x62\x71\x47\x57\x37\x53\x6f\x6f\x4a\x39\x79','\x75\x30\x66\x50\x76\x4e\x6d','\x44\x32\x72\x76\x74\x75\x6d','\x74\x48\x42\x64\x56\x38\x6b\x38\x57\x4f\x65','\x6c\x53\x6f\x56\x67\x57\x71\x77\x57\x34\x61\x32\x61\x76\x6c\x64\x4d\x57','\x79\x4d\x39\x4b\x45\x71','\x7a\x63\x62\x55\x42\x33\x71\x4f\x79\x77\x35\x4a\x7a\x71','\x7a\x4e\x71\x36\x69\x64\x75\x57\x6a\x74\x53\x6b\x69\x61','\x65\x43\x6f\x73\x6e\x61\x65\x4e','\x42\x72\x5a\x63\x52\x53\x6b\x4e\x57\x52\x61','\x57\x51\x61\x46\x57\x52\x39\x69\x57\x4f\x43','\x6d\x63\x39\x58\x43\x77\x76\x54\x42\x32\x50\x50\x71\x61','\x57\x36\x65\x30\x57\x50\x48\x50\x57\x4f\x42\x63\x49\x6d\x6b\x49\x41\x32\x6c\x63\x56\x61','\x6d\x58\x53\x68\x7a\x5a\x37\x63\x4c\x30\x42\x64\x4b\x6d\x6f\x49\x76\x61','\x75\x75\x69\x7a\x7a\x38\x6f\x78\x57\x4f\x56\x64\x4f\x63\x56\x64\x55\x6d\x6f\x4c','\x6d\x6d\x6f\x6e\x57\x34\x6d\x35\x69\x43\x6b\x58\x46\x53\x6f\x7a\x57\x52\x68\x64\x49\x47','\x69\x67\x31\x50\x7a\x67\x72\x53\x7a\x74\x53\x49\x70\x47','\x41\x53\x6b\x43\x57\x51\x44\x4e\x57\x37\x38','\x64\x4b\x37\x64\x52\x61\x4c\x39\x57\x52\x4c\x6b\x67\x5a\x47\x75','\x78\x33\x6c\x63\x50\x4b\x70\x64\x4b\x61','\x74\x4e\x62\x4a\x7a\x31\x79','\x74\x78\x62\x6e\x45\x4e\x47','\x6a\x6d\x6f\x33\x62\x47\x79\x4a','\x43\x59\x30\x58','\x57\x37\x46\x63\x52\x53\x6b\x73\x57\x52\x6d\x39','\x57\x4f\x61\x52\x76\x53\x6b\x2f\x57\x36\x69','\x57\x52\x54\x48\x57\x37\x7a\x71\x45\x4e\x71','\x57\x52\x52\x63\x4a\x43\x6f\x32\x57\x37\x64\x64\x4a\x71','\x44\x32\x66\x59\x42\x47','\x57\x51\x52\x63\x4e\x53\x6f\x78\x57\x50\x61\x30','\x57\x51\x48\x73\x57\x35\x61\x48\x57\x50\x65','\x57\x34\x7a\x35\x57\x36\x61\x4f\x57\x52\x75\x36\x57\x36\x56\x63\x4e\x4c\x52\x63\x54\x61','\x76\x75\x7a\x5a\x7a\x33\x47','\x57\x4f\x33\x64\x48\x43\x6b\x44\x57\x35\x75','\x77\x58\x42\x64\x4d\x53\x6b\x4d','\x57\x34\x39\x6f\x57\x36\x56\x63\x54\x43\x6b\x43','\x43\x32\x6e\x59\x41\x78\x62\x30','\x76\x66\x62\x70\x43\x32\x53','\x42\x75\x69\x64\x76\x53\x6b\x6c','\x35\x50\x6b\x46\x35\x36\x67\x50\x35\x6c\x4d\x36','\x57\x50\x4a\x63\x4e\x53\x6f\x34\x57\x4f\x4b\x61','\x6b\x6d\x6f\x69\x57\x4f\x38\x2b\x69\x6d\x6b\x37\x6b\x43\x6b\x78\x57\x36\x4a\x64\x49\x57','\x57\x37\x68\x64\x53\x53\x6f\x52\x57\x35\x38','\x57\x36\x53\x53\x6d\x62\x4a\x63\x54\x71','\x57\x50\x6a\x5a\x57\x35\x34\x6b\x57\x52\x38','\x41\x67\x35\x51\x41\x4c\x43','\x57\x51\x72\x33\x57\x36\x79\x38\x57\x4f\x53','\x57\x34\x47\x36\x70\x57\x56\x63\x55\x5a\x7a\x70\x57\x35\x74\x64\x50\x43\x6b\x61','\x57\x36\x46\x63\x4b\x6d\x6b\x75\x57\x52\x70\x64\x55\x61','\x44\x30\x6a\x52\x43\x75\x43','\x6f\x31\x4e\x63\x4e\x57\x47','\x73\x32\x4f\x66\x79\x53\x6b\x2f','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x76\x67\x76\x34\x44\x61','\x78\x66\x39\x79\x42\x38\x6f\x65\x57\x51\x52\x64\x4d\x4b\x4e\x64\x55\x61','\x6b\x63\x47\x4f\x6c\x49\x53\x50\x6b\x59\x4b\x52\x6b\x71','\x57\x35\x4b\x52\x6b\x58\x42\x63\x4e\x49\x61\x70\x57\x34\x68\x64\x53\x6d\x6b\x45','\x43\x33\x72\x56\x43\x4a\x4f\x36\x43\x32\x6e\x59\x41\x71','\x57\x37\x4e\x64\x55\x30\x37\x64\x56\x66\x71','\x57\x35\x5a\x63\x4c\x6d\x6b\x46\x57\x51\x68\x63\x4d\x30\x65\x73\x57\x50\x68\x63\x53\x6d\x6f\x65','\x57\x50\x37\x64\x52\x6d\x6f\x49\x57\x36\x4c\x2b','\x45\x67\x7a\x30\x73\x77\x79','\x57\x50\x2f\x64\x56\x30\x33\x63\x51\x38\x6f\x69','\x79\x4d\x39\x59\x7a\x67\x76\x59','\x71\x5a\x70\x64\x4d\x53\x6b\x41\x57\x4f\x43','\x57\x51\x37\x63\x4a\x6d\x6f\x79\x57\x34\x33\x64\x51\x47','\x75\x4a\x42\x63\x4a\x4b\x57\x63','\x6e\x4a\x7a\x49\x75\x4d\x35\x35\x74\x32\x30','\x66\x6d\x6f\x49\x61\x64\x71\x7a\x57\x4f\x65\x4b\x65\x77\x2f\x63\x48\x47','\x68\x53\x6b\x55\x57\x36\x64\x63\x47\x38\x6f\x39\x57\x50\x48\x53\x57\x36\x48\x34\x57\x51\x43','\x57\x52\x46\x63\x53\x6d\x6f\x36\x57\x34\x74\x64\x4d\x57','\x71\x31\x72\x41\x7a\x4b\x43','\x72\x76\x44\x59\x75\x68\x43','\x7a\x78\x6a\x5a\x69\x65\x76\x54\x42\x32\x50\x50\x43\x57','\x57\x37\x4a\x63\x4e\x6d\x6b\x46\x57\x52\x68\x64\x4b\x65\x64\x64\x55\x43\x6b\x63\x57\x52\x43\x42','\x45\x48\x2f\x63\x55\x38\x6b\x2b\x57\x51\x62\x48','\x64\x6d\x6b\x6a\x72\x61\x61\x4a','\x71\x30\x58\x65\x41\x32\x75','\x41\x67\x35\x57\x73\x4d\x47','\x6c\x32\x31\x48\x41\x77\x34\x56\x74\x66\x6e\x66\x6c\x47','\x57\x4f\x6d\x59\x57\x37\x39\x6a\x57\x36\x4f','\x57\x52\x46\x64\x55\x75\x66\x4e\x62\x61','\x57\x52\x46\x64\x4c\x49\x42\x63\x51\x6d\x6b\x6a','\x74\x75\x72\x51\x43\x4d\x71','\x57\x37\x5a\x64\x4b\x6d\x6f\x46\x57\x37\x43','\x57\x50\x78\x63\x48\x38\x6f\x63\x57\x34\x37\x64\x49\x61','\x41\x77\x35\x55\x7a\x78\x6a\x69\x76\x65\x31\x6d','\x6d\x4a\x65\x5a','\x57\x51\x6c\x63\x55\x6d\x6f\x59\x57\x34\x4e\x64\x4d\x76\x70\x64\x48\x6d\x6b\x64\x6d\x32\x34','\x35\x42\x45\x4d\x35\x7a\x6f\x38\x35\x7a\x6f\x38','\x65\x43\x6f\x4d\x57\x36\x33\x63\x4e\x43\x6b\x7a','\x71\x4b\x6a\x78\x42\x4b\x53','\x44\x68\x6a\x50\x42\x71','\x76\x66\x66\x36\x41\x67\x4b','\x57\x52\x75\x35\x76\x6d\x6b\x52\x57\x36\x47','\x57\x52\x4e\x63\x55\x38\x6f\x32\x57\x50\x78\x63\x4a\x4b\x2f\x63\x55\x38\x6f\x7a\x68\x77\x71','\x7a\x31\x6a\x76\x72\x65\x4b','\x57\x37\x79\x69\x66\x62\x70\x63\x4d\x47','\x57\x34\x47\x57\x
```::::::::info[[将洛谷一些粗略数字改为精确数字](https://www.luogu.me/article/yr87mvr1) by [$\color{FFD776}123asdf123$](https://www.luogu.com.cn/user/576074)]::::::::::info[[将洛谷一些粗略数字改为精确数字](https://www.luogu.me/article/yr87mvr1) by [123asdf123](https://www.luogu.com.cn/user/576074)]{open}将洛谷一些粗略数字改为精确数字,例如通过人数,提交人数等。::::info[code]```// ==UserScript==// @name 将洛谷一些粗略数字改为精确数字// @namespace https://www.luogu.com.cn/user/57607456 行未改动 'use strict'; setInterval(upd,50);})();```
::::::::info[[.com.cn 快速跳转 .me](https://www.luogu.me/article/t1tu2o13) by [$\color{FFD776}Crunch_Time$](https://www.luogu.com.cn/user/1697542)]::::::::::info[[.com.cn 快速跳转 .me](https://www.luogu.me/article/t1tu2o13) by [Crunch_Time](https://www.luogu.com.cn/user/1697542)]{open}文章自动跳转保存站,但是不分自己的文章与公开文章。::::info[code]```// ==UserScript==// @name 洛谷域名智能切换(稳定无循环版)// @namespace http://tampermonkey.net/124 行未改动全部展开// 棒棒糖真好吃 /bangbangt// 关注 /user/754021 谢谢喵!```::::::::info[[简易洛谷插件code](https://www.luogu.com.cn/article/dxg99wmz) by [$\color{FFD776}realskc$](https://www.luogu.com.cn/user/35672)]```// ==UserScript==// @name luogu_bot1// @namespace http://tampermonkey.net/// @version 1.8.2// @description 自制洛谷插件// @author realskc// @match https://www.luogu.com.cn/*// @grant none// @run-at document-end// ==/UserScript==:::::
'use strict';(function(){ const featureDict = new Map([ ['lgbot1RemoveAd', '屏蔽广告'], ['lgbot1Removeback', '移除网页出错跳转'], ['lgbot1AddMessageLink', '私信界面 Ctrl+Click 打开用户主页'], ['lgbot1RemoveCover', '移除主页遮盖'], ['lgbot1AddProblemsColor', '显示题目颜色'] ]); const problemDifficultyToColor = [[191,191,191],[254,76,97],[243,156,17],[255,193,22],[82,196,26],[52,152,219],[157,61,207],[14,29,105]]; function addSettingButton(){//增加插件设置 const navElement = document.querySelector('nav.lfe-body'); if(!navElement){ console.log("未找到侧边导航栏"); console.log(document); return; } const settingElement = document.createElement('a');//外壳,链接功能 settingElement.setAttribute('data-v-0640126c', ''); settingElement.setAttribute('data-v-639bc19b', ''); settingElement.setAttribute('data-v-33633d7e', ''); settingElement.className = 'color-none'; settingElement.style.color = 'inherit'; const settingText = document.createElement('span'); settingText.setAttribute('data-v-639bc19b', ''); settingText.className = 'text'; settingText.textContent = '插件设置'; settingElement.appendChild(settingText); navElement.appendChild(settingElement); settingElement.addEventListener('click', () => {//点击后进入临时页面 function initializeSettings(){ for(let i of featureDict.keys()){ if(localStorage.getItem(i) === null){ localStorage.setItem(i, 'true'); } } } initializeSettings(); const pageContent = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>luogu_bot1 功能设置</title> <style> body { font-family: Arial, sans-serif; } #featureBox { position: fixed; top: 20%; left: 50%; transform: translate(-50%, -50%); background-color: white; border: 1px solid #ccc; padding: 20px; z-index: 10001; } </style> </head> <body> <div id="featureBox"> <h3>选择插件功能</h3> ${Array.from(featureDict).map(([key, description]) => ` <div> <label><input type="checkbox" id="${key}">${description}</label> </div> `).join('')} <button id="selectAll">全选</button> <button id="saveFeatures">保存</button> </div> <script> document.addEventListener('DOMContentLoaded', () => {//加载设置 ${Array.from(featureDict.keys()).map(key => ` const ${key} = localStorage.getItem('${key}') === 'true'; document.getElementById('${key}').checked = ${key}; `).join('')} }); document.getElementById('saveFeatures').addEventListener('click', () => {//保存设置 ${Array.from(featureDict.keys()).map(key => ` const ${key} = document.getElementById('${key}').checked; localStorage.setItem('${key}', String(${key})); `).join('')} alert('功能已保存'); }); document.getElementById('selectAll').addEventListener('click', () => {//全选 ${Array.from(featureDict.keys()).map(key => ` document.getElementById('${key}').checked = true; `).join('')} }); </script> </body> </html> `; const newWindow = window.open(); newWindow.document.write(pageContent); newWindow.document.close(); }); } function removeAd(){//屏蔽广告 const adElement = document.querySelector('div[data-v-0a593618][data-v-1143714b]'); if(adElement) { adElement.remove(); console.log('广告已被删除'); } else console.log('没有找到广告'); } function removeBack(){//移除网页跳转 function disableRedirect(){ window.history.go = function() {// 根据实际测试,洛谷使用的是 history.go console.log("luogu_bot1:已为您屏蔽 history.go()"); }; } function checkError(){ if(document.title === '错误 - 洛谷 | 计算机科学教育新生态'){ disableRedirect(); return true; } return false; } const observer = new MutationObserver((mutations, obs) => { checkError(); }); const config = { childList: true, subtree: true, }; observer.observe(document, config);// 监视 title 变化 if(document.readyState === 'complete' || document.readyState === 'interactive'){ checkError(); } } async function getUidByUsername(username){// 获取 uid const apiUrl = `https://www.luogu.com.cn/api/user/search?keyword=${username}`; return await fetch(apiUrl) .then(response => response.json()) .then(data => { if(data.users && data.users.length > 0){ return data.users[0].uid; } }) .catch(error => { console.error('Error fetching user data:', error); }); } async function processItem(item) { // 添加 eventListener item.parentElement.parentElement.addEventListener('click', (event) => { if(event.ctrlKey){ getUidByUsername(item.textContent.trim()) .then(uid => { const userLink = `/user/${uid}`; if(userLink){ window.open(userLink, '_blank'); } }) } }); } function addMessageLink(){ // Ctrl+Click 触发,动态修改网页 let items = document.querySelectorAll('span[data-v-5b9e5f50] > span[slot="trigger"]'); for(let i of items){ processItem(i); } const callback = async function(mutationsList, observer) { for (const mutation of mutationsList) { if (mutation.type === 'childList') { for (const addedNode of mutation.addedNodes) { if (addedNode.nodeType === Node.ELEMENT_NODE) { const newItems = addedNode.querySelectorAll('span[data-v-5b9e5f50] > span[slot="trigger"]'); for (const newItem of newItems) { processItem(newItem); } } } } } }; const observer = new MutationObserver(callback); observer.observe(document, { childList: true, subtree: true }); } function removeCover(){ let profile = document.querySelector(".introduction.marked"); if(profile && profile.style.display === "none"){ profile.style.display = "block"; for(let i=0;i<profile.parentElement.children.length;++i){ if(profile.parentElement.children[i].innerText === "系统维护,该内容暂不可见。"){ profile.parentElement.children[i].remove(); } } } } function alwaysRemoveCover(){ const observer = new MutationObserver(() => removeCover()); observer.observe(document,{ childList: true, subtree: true }); removeCover(); } const problemToColorMap = new Map(); class FetchRateLimiter{ constructor(limit) { // limit 以毫秒为单位,表示相邻两次 fetch 操作间的最小间隔 this.limit = limit; this.queue = []; this.queuePrior = []; this.active = false; this.requestCache = new Map(); } process() { this.active = 1; let resolve, reject, url; if(this.queuePrior.length > 0){ ({resolve, reject, url} = this.queuePrior.shift()); } else if(this.queue.length > 0){ ({resolve, reject, url} = this.queue.shift()); } else{ this.active = 0; return; } fetch(url) .then(resolve) .catch(reject); setTimeout(this.process.bind(this), this.limit); } push(url, prior) { if(this.requestCache.has(url)) return this.requestCache.get(url); const request = new Promise((resolve, reject) => { if(prior) this.queuePrior.push({url, resolve, reject}); else this.queue.push({url, resolve, reject}); if(!this.active) this.process(); }) .then((response) => { return response.text(); }); this.requestCache.set(url,request); return request; } } const limiter = new FetchRateLimiter(300); async function getProblemColor(problemid, prior=false){ if(window.location.href.startsWith('https://www.luogu.com.cn/record/list')){ const resultList = _feInstance.currentData.records.result; if(!resultList.lgbot1Visited){ for(const item of resultList){ problemToColorMap.set(item.problem.pid,`rgb(${problemDifficultyToColor[item.problem.difficulty].join(',')})`); } resultList.lgbot1Visited = true; } } if(/^https:\/\/www\.luogu\.com\.cn\/user\/\d+#practice$/.test(window.location.href)) { let problemList = _feInstance.currentData.submittedProblems; if(!problemList.lgbot1Visited){ for(const item of problemList){ problemToColorMap.set(item.pid,`rgb(${problemDifficultyToColor[item.difficulty].join(',')})`); } problemList.lgbot1Visited = true; } problemList = _feInstance.currentData.passedProblems; if(!problemList.lgbot1Visited){ for(const item of problemList){ problemToColorMap.set(item.pid,`rgb(${problemDifficultyToColor[item.difficulty].join(',')})`); } problemList.lgbot1Visited = true; } } if(problemToColorMap.has(problemid)) return problemToColorMap.get(problemid); const url = '/problem/'+problemid; let data; try{ data = await limiter.push(url, prior); } catch (error) { console.error('Error fetching user data:', error); console.log(problemid); return; } const parser = new DOMParser(); const doc = parser.parseFromString(data, 'text/html'); let scriptText = ''; for(const i of doc.querySelectorAll("script")){ scriptText += i.textContent; } scriptText = scriptText.match(/"difficulty":\d/)[0]; debugger; if(!scriptText) return; const problemDifficulty = Number(scriptText[scriptText.length-1]); problemToColorMap.set(problemid,`rgb(${problemDifficultyToColor[problemDifficulty].join(',')})`); return problemToColorMap.get(problemid); } function isProblemId(problemid){ if(problemid.startsWith('AT_')) return true; if(!/[a-zA-Z]/.test(problemid)) return false; if(!/[0-9]/.test(problemid)) return false; return true; } async function addProblemColor(item){ let problemid = item.href.split('/').pop(); let prior = false; if(problemid.includes('?forum=')){ problemid = problemid.split('=').pop(); prior = true; } problemid = problemid.split('?')[0]; problemid = problemid.split('=').pop(); if(item.matches('a[data-v-bade3303][data-v-4842157a]')) if(problemid === "javascript:void 0") problemid = item.innerText.split(' ')[0]; if(!isProblemId(problemid)) return; if(item.innerText.startsWith(problemid)){ const spanItem = item.children[0]; if(spanItem && spanItem.matches('span.pid') && spanItem.innerText === problemid){ const color = await getProblemColor(problemid, prior); spanItem.style.color = color; spanItem.style.fontWeight = 'bold'; } else{ const color = await getProblemColor(problemid, prior); const content = item.innerHTML; item.innerHTML = content.replace(problemid,`<b style="color: ${color};">${problemid}</b>`); } } } async function addProblemsColor(){ const observer = new MutationObserver(async (mutationsList) => { for (const mutation of mutationsList) { if (mutation.type === 'childList') { for (const addedNode of mutation.addedNodes) { if (addedNode.nodeType === Node.ELEMENT_NODE) { const newItems = addedNode.querySelectorAll('a[href]'); if(addedNode.matches('a[href]')) addProblemColor(addedNode); for (const newItem of newItems) { addProblemColor(newItem); } } } } else if(mutation.type === 'characterData') { if(mutation.target.parentElement.matches('span.pid')){ mutation.target.parentElement.style.color = await getProblemColor(mutation.target.textContent); mutation.target.parentElement.style.fontWeight = 'bold'; } } } }); observer.observe(document, { childList: true, subtree: true, characterData: true, }); const nodelist = document.querySelectorAll('a[href]'); for(const i of nodelist){ addProblemColor(i); } } setTimeout(addSettingButton, 500); if(localStorage.getItem('lgbot1RemoveAd') === 'true'){ setTimeout(removeAd, 500); } if(localStorage.getItem('lgbot1Removeback') === 'true'){ removeBack(); } if(localStorage.getItem('lgbot1AddMessageLink') === 'true'){ if(window.location.href.startsWith('https://www.luogu.com.cn/chat')){ setTimeout(addMessageLink,500); } } if(localStorage.getItem('lgbot1RemoveCover') === 'true'){ setTimeout(alwaysRemoveCover, 500); } if(localStorage.getItem('lgbot1AddProblemsColor') === 'true'){ setTimeout(addProblemsColor, 500); }})();#### 娱乐插件:::::info[["喵喵喵"code](https://www.luogu.com.cn/article/61lcfkz1) by [fkxr](https://www.luogu.com.cn/user/995934)]{open}喵喵喵。::::info[code]```
::::
::::info[["喵喵喵"code](https://www.luogu.com.cn/article/61lcfkz1) by [$\color{FFD776}fkxr$](https://www.luogu.com.cn/user/995934)]```// ==UserScript==// @name 喵喵喵// @namespace http://tampermonkey.net/// @version 1.044 行未改动 subtree: true });})();```
:::::::::