洛谷主页净化

让洛谷主页变得简洁

目前為 2023-04-28 提交的版本,檢視 最新版本

// ==UserScript==
// @name         洛谷主页净化
// @version      0.4
// @description  让洛谷主页变得简洁
// @match        https://www.luogu.com.cn$
// @author       MlkMathew
// @license      MIT
// @grant        none
// @namespace https://gf.qytechs.cn/users/1068192
// ==/UserScript==
(function() {
    'use strict';
    const s= document.querySelectorAll('a');
    for (let i = 0; i < s.length; i++) {
        if(s[i].href.match('discuss')&&s[i].href.match('241461')){
            -s[i].parentNode.parentNode.parentNode.removeChild(s[i].parentNode.parentNode);
        }
        if(s[i].href.match('vijos')){
            -s[i].parentNode.parentNode.parentNode.removeChild(s[i].parentNode.parentNode);
        }
        if(s[i].href.match('discuss')&&s[i].href.match('list')&&(!s[i].href.match('miaomiaowu'))){
            -s[i].parentNode.removeChild(s[i]);
        }
    }
    const k = document.querySelectorAll('a');
    for (let i = 0; i < k.length; i++){
        if(k[i].href.match('#$')){
            -k[i].parentNode.parentNode.parentNode.remove();
        }
    }
    const t = document.querySelectorAll('a');
    for (let i = 0; i < t.length; i++) {
        if(t[i].href.match('discuss')&&(!t[i].href.match('142324'))){
            -t[i].parentNode.parentNode.parentNode.parentNode.remove();
        }
    }
    const q = document.querySelectorAll('h2');
    q[0].parentNode.className='am-u-md-12 lg-punch am-text-center';
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址