标题
增加 1 行删除 1 行
1删犇器1一些有用の小工具合集
正文
增加 385 行删除 2 行
1234567821 行未改动30313233343536转载。### 操作步骤输入下方的这段代码。```JavascriptswitchMode('my');21 行未改动if(i<l.length-1)setTimeout(`f(${i+1})`,200);})}f(0);```6. 如果出现 $\rm 503$ 界面重新再次**重复上述过程**。直到删完为止,重新加载整个界面,建议重启浏览器。12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212321 行未改动145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419虽然转载但是持续更新,欢迎投稿qwq目录:1. 排版2. 删犇器3. 犇犇屏蔽器4. 洛谷颜色对照表---:::::::info[排版]## 排版:::align{center}## 我是居中::::::align{right}### 我是右居中:::## CF 风格 epigraph:::epigraph[——otto]大家好啊,我是说的道理,今天来点大家想看的东西。:::::::info[我是标题]大家好啊,我是说的道理,今天来点大家想看的东西。::::::::::warning[我是警告]:::::warning[不要]::::warning[滥用]:::warning[嵌套]不然会被 chen_zhe 封号!!!!!::::::::::::::::::::::success[$$\displaystyle\sum_{i = 1}^n \sum_{j = 1}^n \gcd(i, j)$$]数学公式也是可以出现在标题上的。::::Markdown:```markdown## 排版:::align{center}## 我是居中::::::align{right}### 我是右居中:::## CF 风格 epigraph:::epigraph[——otto]大家好啊,我是说的道理,今天来点大家想看的东西。:::::::info[我是标题]大家好啊,我是说的道理,今天来点大家想看的东西。::::::::::warning[我是警告]:::::warning[不要]::::warning[滥用]:::warning[嵌套]不然会被 chen_zhe 封号!!!!!::::::::::::::::::::::success[$$\displaystyle\sum_{i = 1}^n \sum_{j = 1}^n \gcd(i, j)$$]数学公式也是可以出现在标题上的。::::```::::::::::info[删犇器]输入下方的这段代码。```JavascriptswitchMode('my');21 行未改动if(i<l.length-1)setTimeout(`f(${i+1})`,200);})}f(0);```@[Kevin1211](https://www.luogu.com.cn/user/1706930)的补充:如果你控制台中输完了之后删掉了全部犇犇然后一直报错,输入如下代码:```javascriptconst highestId = setTimeout(() => {}, 0);for (let i = highestId; i >= 0; i--) {clearTimeout(i);clearInterval(i);}```6. 如果出现 $\rm 503$ 界面重新再次**重复上述过程**。直到删完为止,重新加载整个界面,建议重启浏览器。::::::info[犇犇屏蔽器]```javascript// ==UserScript==// @name 洛谷犇犇屏蔽工具// @namespace https://www.luogu.com.cn/user/1510406// @version 1.1// @description 屏蔽指定用户的犇犇// @author FlowerRed// @match *://www.luogu.com.cn/// @grant GM_addStyle// @grant GM_setValue// @grant GM_getValue// @run-at document-end// ==/UserScript==(function() {'use strict';const buk = 'luogu_benben_block_list';const bek = 'luogu_benben_blocker_enabled';const minb = 10;let ial = false;let vbc = 0;let bbl = 0;GM_addStyle(`.lg-benben-blocker-btn { margin-left: 10px; }.lbb-movl { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 9999; display: none; justify-content: center; align-items: center; }.lbb-mcon { background-color: #fff; padding: 20px 30px; border-radius: 8px; width: 400px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; }.lbb-mcon h2 { margin-top: 0; margin-bottom: 20px; text-align: center; color: #333; }.lbb-mcon textarea { width: 100%; height: 150px; resize: vertical; margin-bottom: 15px; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }.lbb-mcon .srow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }.lbb-mcon .disc { font-size: 12px; color: #888; margin-top: 15px; text-align: center; }.lbb-mcon .mbtns { display: flex; justify-content: flex-end; gap: 10px; }.switch { position: relative; display: inline-block; width: 50px; height: 28px; }.switch input { opacity: 0; width: 0; height: 0; }.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 28px; }.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }input:checked + .slider { background-color: #3498db; }input:checked + .slider:before { transform: translateX(22px); }`);function bb() {const on = GM_getValue(bek, true);if (!on) {document.querySelectorAll('#feed .feed-li[data-blocked="true"]').forEach(el => {el.style.display = '';el.removeAttribute('data-blocked');});return;}const ul = GM_getValue(buk, []);if (ul.length === 0) return;const us = new Set(ul);const its = document.querySelectorAll('#feed .feed-li:not([data-p])');its.forEach(it => {it.setAttribute('data-p', '1');const ue = it.querySelector('.feed-username a:first-child');if (ue) {const u = ue.textContent.trim();if (us.has(u)) {it.style.display = 'none';it.setAttribute('data-blocked', 'true');}}});}function csm() {const mo = document.createElement('div');mo.className = 'lbb-movl';mo.innerHTML = `<div class="lbb-mcon"><h2>犇犇屏蔽设置</h2><div class="srow"><span>启用屏蔽功能</span><label class="switch"><input type="checkbox" id="lbb-tg"><span class="slider"></span></label></div><label for="lbb-usrs">屏蔽用户名列表 (一行一个):</label><textarea id="lbb-usrs"></textarea><div class="mbtns"><button class="am-btn am-btn-default am-btn-sm" id="lbb-cancel">取消</button><button class="am-btn am-btn-primary am-btn-sm" id="lbb-save">保存</button></div><p class="disc">改动设置后,可能需要手动刷新页面以生效。</p><p class="disc">同时,本插件还具有以下功能:当用户点击"点击查看更多..."后,若新刷出来的犇犇在屏蔽后的剩余数量过少,则自动点击"点击查看更多..."直到数量 ≥10。此功能的目的是防止因为屏蔽的犇犇数量过多而导致的点击刷新后没有或只有极少量犇犇被刷出来。</p><p class="disc">Developed by <a href="https://www.luogu.com.cn/user/1510406">@FlowerRed</a>.</p></div>`;document.body.appendChild(mo);const ta = document.getElementById('lbb-usrs');const tg = document.getElementById('lbb-tg');const cd = mo.querySelector('.lbb-mcon');cd.addEventListener('click', e => e.stopPropagation());mo.addEventListener('click', () => { mo.style.display = 'none'; });document.getElementById('lbb-cancel').addEventListener('click', () => { mo.style.display = 'none'; });document.getElementById('lbb-save').addEventListener('click', () => {const usrs = ta.value.split('\n').map(u => u.trim()).filter(Boolean);const on = tg.checked;GM_setValue(buk, usrs);GM_setValue(bek, on);mo.style.display = 'none';document.querySelectorAll('#feed .feed-li[data-p]').forEach(el => {el.removeAttribute('data-p');});bb();});return mo;}function osm(m) {const ul = GM_getValue(buk, []);const on = GM_getValue(bek, true);document.getElementById('lbb-usrs').value = ul.join('\n');document.getElementById('lbb-tg').checked = on;m.style.display = 'flex';}function clm() {if (!ial) return;const allb = document.querySelectorAll('#feed .feed-li');const newb = Array.from(allb).slice(bbl);let nvc = 0;newb.forEach(b => {if (b.style.display !== 'none') {nvc++;}});vbc += nvc;const lml = document.querySelector('#feed-more a');const lmb = document.getElementById('feed-more');if (vbc < minb && lml && lmb && window.getComputedStyle(lmb).display !== 'none' && lml.textContent.includes('点击查看更多')) {bbl = allb.length;lml.click();} else {ial = false;}}function obf() {const fe = document.getElementById('feed');if (!fe) {setTimeout(obf, 500);return;}bb();ial = true;vbc = document.querySelectorAll('#feed .feed-li:not([style*="display: none"])').length;bbl = document.querySelectorAll('#feed .feed-li').length;const obs = new MutationObserver((mls) => {for(const mut of mls) {if (mut.type === 'childList' && mut.addedNodes.length > 0) {bb();clm();break;}}});obs.observe(fe, { childList: true });}function init() {const sb = document.getElementById('feed-submit');if (!sb) {setTimeout(init, 500);return;}const setb = document.createElement('button');setb.textContent = '屏蔽设置';setb.className = 'am-btn am-btn-secondary am-btn-sm lg-benben-blocker-btn';const m = csm();setb.addEventListener('click', () => osm(m));sb.parentNode.insertBefore(setb, sb.nextSibling);const lmb = document.querySelector('#feed-more');if (lmb) {lmb.addEventListener('click', () => {if (!ial) {ial = true;vbc = 0;bbl = document.querySelectorAll('#feed .feed-li').length;}});}obf();}if (document.readyState === 'loading') {document.addEventListener('DOMContentLoaded', init);} else {init();}})();```::::::info[颜色对照表]$$\def\arraystretch{1.2}\begin{array}{|c|l|l||c|l|l|} \hline颜色 & 十六进制 & RGB值 & 颜色 & 十六进制 & RGB值 \\ \hline\color{#52C41A}\text{AC绿} & \text{52C41A} & \text{(82,196,26)} & \color{#FE4C61}\text{入门红} & \text{FE4C61} & \text{(254,76,97)} \\ \hline\color{#E74C3C}\text{WA红} & \text{E74C3C} & \text{(231,76,60)} & \color{#F39C11}\text{普及-橙} & \text{F39C11} & \text{(243,156,17)} \\ \hline\color{#9D3DCF}\text{RE紫} & \text{9D3DCF} & \text{(157,61,207)} & \color{#FFC116}\text{普及黄} & \text{FFC116} & \text{(255,193,22)}\\ \hline\color{#FADB14}\text{CE黄} & \text{FADB14} & \text{(250,219,20)} & \color{#52C41A}\text{普及+提高 绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline\color{#052242}\text{TLE黑} & \text{052242} & \text{(5,34,66)} & \color{#3498DB}\text{提高+省选-蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline\color{#052242}\text{MLE黑} & \text{052242} & \text{(5,34,66)} & \color{#9D3DCF}\text{省选紫} & \text{9D3DCF} & \text{(157,61,207)} \\ \hline\color{#052242}\text{OLE黑} & \text{052242} & \text{(5,34,66)} & \color{#0E1D69}\text{NOI黑} & \text{0E1D69} & \text{(14,39,105)} \\ \hline\color{#0E1D69}\text{UKE蓝} & \text{0E1D69} & \text{(14,29,105)} & \color{#BFBFBF}\text{未评定灰} & \text{BFBFBF} & \text{(191,191,191)} \\ \hline \hline\color{#8E44AD}\text{紫名} & \text{8E44AD} & \text{(142,68,173)} & \color{#52C41A}\text{排行绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline\color{#E74C3C}\text{红名} & \text{E74C3C} & \text{(231,76,60)} & \color{#F39C11}\text{排行橙} & \text{F39C11} & \text{(243,156,17)} \\ \hline\color{#E67E22}\text{橙名} & \text{E67E22} & \text{(230,126,34)} & \color{#FADB14}\text{排行黄} & \text{FADB14} & \text{(250,219,20)} \\ \hline\color{#5EB95E}\text{绿名} & \text{5EB95E} & \text{(94,185,94)} & \color{#E74C3C}\text{排行红} & \text{E74C3C} & \text{(231,76,60)}\\ \hline\color{#0E90D2}\text{蓝名} & \text{0E90D2} & \text{(14,144,210)} & \color{#52C41A}\text{通过钩绿} & \text{52C41A} & \text{(82,196,26)} \\ \hline\color{#BFBFBF}\text{灰名} & \text{BFBFBF} & \text{(191,191,191)} & \color{#E74C3C}\text{不通过叉红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline\hline\color{#E74C3C}\text{吉利红} & \text{E74C3C} & \text{(231,76,60)} & \color{#E74C3C}\text{官方比赛红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline\color{#5EB95E}\text{中平绿} & \text{5EB95E} & \text{(94,185,94)} & \color{#054310}\text{团队比赛绿} & \text{054310} & \text{(5,67,16)} \\ \hline\color{#000000}\text{凶兆黑} & \text{000000} & \text{(0,0,0)} & \color{#3498DB}\text{个人比赛蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \hline\color{#8E44AD}\text{ACM制紫} & \text{8E44AD} & \text{(142,68,173)} & \color{#5EB95E}\text{Rated绿} & \text{5EB95E} & \text{(94,185,94)} \\ \hline\color{#F1C40F}\text{IOI制黄} & \text{F1C40F} & \text{(241,196,15)} & \color{#5EB95E}\text{未开始绿} & \text{5EB95E} & \text{(94,185,94)} \\ \hline\color{#F1C40F}\text{乐多制黄} & \text{F1C40F} & \text{(241,196,15)} & \color{#E74C3C}\text{已结束红} & \text{E74C3C} & \text{(231,76,60)} \\ \hline\color{#F39C11}\text{OI制橙} & \text{F39C11} & \text{(243,156,17)} & \color{#52C410}\text{进行中*} & \text{暂时无} & \text{暂时无} \\ \hline \hline\color{#EFEFEF}\text{背景灰} & \text{EFEFEF} & \text{(239, 239, 239)} & \color{#7F7F7F}\text{小字灰} & \text{7F7F7F} & \text{(127,127,127)} \\ \hline \hline\color{#0E90D2}\text{按钮蓝} & \text{0E90D2} & \text{(14,144,210)} & \color{#3498DB}\text{链接蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline\color{#DD514C}\text{按钮红} & \text{DD514C} & \text{(221,81,76)} & \color{#3498DB}\text{通过率蓝} & \text{3498DB} & \text{(52,152,219)} \\ \hline \hline\color{#FFE169}\text{金钩黄} & \text{FFE169} & \text{(255,225,105)} & \color{#F5CECD}\text{背景粉} & \text{F5CECD} & \text{(245,206,205)} \\ \hline\color{#5EB95E}\text{绿钩绿} & \text{5EB95E} & \text{(94,185,94)} & \color{#C9E7C9}\text{背景绿} & \text{C9E7C9} & \text{(201,231,201)} \\ \hline\color{#3498DB}\text{蓝钩蓝} & \text{3498DB} & \text{(52,152,219)} & \color{#CAEBFB}\text{背景蓝} & \text{CAEBFB} & \text{(202,235,251)} \\ \hline \hline\color{#3498DB}\text{题目来源蓝} & \text{3498DB} & \text{(52,152,219)} &\color{#7F7F7F}\text{灰色} & \text{7F7F7F} & \text{(127,127,127)} \\ \hline\color{#E74C3C}\text{题目算法红} & \text{E74C3C} & \text{(231,76,60)}& \color{#FFFFFF}\text{白色} & \text{FFFFFF} & \text{(255,255,255)} \\ \hline\color{#52C41A}\text{题目地点绿} & \text{52C41A} & \text{(82,196,26)}& \color{#000000}\text{黑色} & \text{000000} & \text{(0,0,0)} \\ \hline\end{array}$$:::