JK Steam

这个世界上又双叒叕多了一个盗版Steam(喜)

// ==UserScript==
// @name         JK Steam
// @namespace    http://tampermonkey.net/
// @version      1.3.1-beta-2
// @description  这个世界上又双叒叕多了一个盗版Steam(喜)
// @author       Debug618, Snoozing_QwQ
// @match        http://noip.ac.cn/*
// @match        http://www.noip.ac.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=www.noip.ac.cn
// @grant        none
// @license      GPL-3.0
// ==/UserScript==

var ooos_for_stoooj = "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo";
//stooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooj(喜
var yiyan = [
    "!\`st${ooos_for_stoooj.substr(0,Math.floor(Math.random()*210)+40)}j - Snoozing_QwQ\`",//!开头的表示不定
    "<a href='/user/2'>沃尔玛购物袋</a>:我最喜欢<a href='/user/2'>南通</a>了",
    "有bug记得反馈给<a href='/user/32'>我</a>或<a href='/user/43'>Debug618</a>哦 - Snoozing_QwQ",
    "AC?不可能!\n我不信梦熊的评测机卡不掉你!",
    "梦熊?哈?可以次掉吗?",
    `<a href="/contest">被你发现了/kk快打电竞去</a>`,
    `众所周知,<a href="//www.luogu.com.cn/user/10703">小粉兔</a>的眼睛是红色的,所以是杀手兔`,
    `<a href="//www.bilibili.com/video/BV1GJ411x7h7/?spm_id_from=333.337.search-card.all.click">点我次掉一言</a>`,
    "Snq*b - qizhiyu(费用0RMB)",
    "w*有南通 - qizhiyu(费用0RMB)",
    `<a href="/wiki/help">noip新用户避读</a>`,
    "想不想看Snq照片(此处为Snq加:以后粉福可能会有) - qizhiyu(费用0RMB)",
    "这是我的祖先 - Debug618",
    "€€£断开了连接,因为你没有给€€£打钱 - Debug618",
    `<a href="//www.luogu.com.cn/user/558147">给Debug618引流</a></br><a href="//space.bilibili.com/1795213216">Debug618的B站</a>`,
    "东郭凉,冻果梁,董郭亮,懂过量,动裹粮,洞粿糧。挏锅俩,咚聒良。懂过两,冬过良。</br></br>翻译:东边的镇子非常寒冷,把(放在野外的)果子粮食冻坏了,有一个叫董郭亮的人,知道很多(贮存食物的)知识,于是动手(用土)裹住粮食,(挖开的洞)充满了粮食。(来年取出并)摇动(有粮食的)两个锅,发出的声响很大。(如果你)懂得的有一些,冬天会更好过的。",
    "注意背后!小心精卫!",
    "XKL:“时光如白驹过隙!”老师:“下课。” - Debug618",
    "众所周知,(1e5)^2=1e7,所以O(n^2)在MX能过1e5的数据。 - Debug618",
    `众所周知,在梦熊可以跑过1e12的数据,所以当n=10e6,O(n^2)在MX能过1s的数据。
根据摩根定律,每18月CPU性能*=2,所以每15年左右MX的性能就会×1024
也就是说,梦熊的狗屎栈评测是领先于其它评测机的 - Snoozing_QwQ`,
    "麒曰:“善哉,然也!”",
    "卓曰:“善哉,然也!一鼻屎,一手指,在教室。人不堪其忧,然也不改其乐。善哉,然也!”",
    '广告位招租, 可投稿给 <a href="/user/32">Snoozing_QwQ</a>',
];

function sleep(time) {
    return new Promise((resolve) => setTimeout(resolve, time));
}

(async function () {
    let url = location.href;
    let mode = null;

    const matches = {
        "^http://*": "defalt",
        "^http://*.noip.ac.cn/": "index",
        "^http://*.noip.ac.cn": "index",
        "^http://*.noip.ac.cn/p/*": "problem",
        "^http://*.noip.ac.cn/p/*tid=*": "problem",
        "^http://*.noip.ac.cn/p": "problems",
        "^http://*.noip.ac.cn/p?page=*": "problems",
        "^http://*.noip.ac.cn/p?q=*&page=*": "problems",
        "^http://*.noip.ac.cn/p?q=*": "problems",
        "^http://*.noip.ac.cn/ranking*": "rank",
        "^http://*.noip.ac.cn/record*": "record",
        "^http://(www\.)?noip\.ac\.cn/record\?uidOrName=[1-9]*": "record",
        "^http://(www\.)?noip\.ac\.cn/record/[0-9]*": "record_",
        "^http://*.noip.ac.cn/homework*": "homework",
        "^http://*.noip.ac.cn/discuss*": "discuss",
        "^http://*.noip.ac.cn/contest*": "contests",
        "^http://*.noip.ac.cn/contest/*": "contest",
        "^http://*.noip.ac.cn/user/*": "user",
        "^http://×noip.ac.cn/wiki/help": "help",
        "^http://*.noip.ac.cn/training/*": "training",
    };
    for (let e of Object.keys(matches)) {
        if (new RegExp(e).test(url)) mode = matches[e];
    }
    console.log('Now at ' + mode);
    let a = document.getElementsByClassName('nav__item');
    for (let i = 0; i < a.length; i++) {
        if (~a[i].innerHTML.search('首页')) a[i].innerHTML = '家';
        else if (~a[i].innerHTML.search('题库')) a[i].innerHTML = '库';
        else if (~a[i].innerHTML.search('训练')) a[i].innerHTML = '练习';
        else if (~a[i].innerHTML.search('比赛')) a[i].innerHTML = '电竞';
        else if (~a[i].innerHTML.search('作业')) a[i].innerHTML = '任务';
        else if (~a[i].innerHTML.search('讨论')) a[i].innerHTML = '论坛';
        else if (~a[i].innerHTML.search('评测记录')) a[i].innerHTML = '游玩记录';
        else if (~a[i].innerHTML.search('排名')) a[i].innerHTML = '排行榜';
    }
    a = document.getElementsByClassName('section__title');
    for (let i = 0; i < a.length; i++) {
        if (~a[i].innerHTML.search('首页')) a[i].innerHTML = '家';
        else if (~a[i].innerHTML.search('题库')) a[i].innerHTML = '库';
        else if (~a[i].innerHTML.search('训练')) a[i].innerHTML = '练习';
        else if (a[i].innerHTML == '比赛') a[i].innerHTML = '电竞';
        else if (~a[i].innerHTML.search('作业')) a[i].innerHTML = '任务';
        else if (~a[i].innerHTML.search('讨论')) a[i].innerHTML = '论坛';
        else if (~a[i].innerHTML.search('评测记录')) a[i].innerHTML = '游玩记录';
        else if (~a[i].innerHTML.search('排名')) a[i].innerHTML = '排行榜';
    }
    let navlistitem = document.getElementsByClassName('nav__list-item');
    navlistitem[0].innerHTML = `<a href="https://store.steampowered.com"><img src="https://store.cdn.queniuqe.com/public/shared/images/header/logo_steam.svg?t=962016" width="176" height="44"></a>`
    let typoa = document.getElementsByClassName("typo-a"), sectiontitle = document.getElementsByClassName("section__title");
    if (mode == "index") {
        let div = document.getElementsByClassName("section__body typo richmedia");
        div[0].innerHTML = `\n
<h3>
    <font color="red">
        永久置顶一言
    </font>
    </br>
    </br>
    <font color="cyan">
        沃尔玛购物袋(如下图):我最喜欢南通了
    </font>
</h3>
<h1>
    <img src="https://store.cdn.queniuqe.com/public/shared/images/header/logo_steam.svg?t=962016" width="176" height="44">
    好闪,拜谢.
    <img src="https://store.cdn.queniuqe.com/public/shared/images/header/logo_steam.svg?t=962016" width="176" height="44">
</h1>
<h2 id="%E8%AF%B7%E5%90%8C%E5%AD%A6%E4%BB%AC%E6%8A%84%E9%A2%98%E8%A7%A3-%EF%BC%8C%E6%AD%A4%E7%A7%8D%E8%A1%8C%E4%B8%BA%E8%A2%AB%E5%8F%91%E7%8E%B0%E5%90%8E%E4%BC%9A%E8%AD%A6%E5%91%8A%EF%BC%9B" tabindex="-1">
    请同学们
    <span class="katex">
        <span class="katex-mathml">
            <math xmlns="http://www.w3.org/1998/Math/MathML">
                <semantics>
                    <mrow>
                        <mstyle mathcolor="red">
                            <mtext>
                                要
                            </mtext>
                        </mstyle>
                    </mrow>
                    <annotation encoding="application/x-tex">
                        \\color{red}{要}
                    </annotation>
                </semantics>
            </math>
        </span>
        <span class="katex-html" aria-hidden="true">
            <span class="base">
                <span class="strut" style="height:0.6833em;">
                </span>
                <span class="mord" style="color:red;">
                    <span class="mord cjk_fallback" style="color:red;">
                        要
                    </span>
                </span>
            </span>
        </span>
    </span>
    抄题解 ,此种行为被发现后会
    <span class="katex">
        <span class="katex-mathml">
            <math xmlns="http://www.w3.org/1998/Math/MathML">
                <semantics>
                    <mrow>
                        <mstyle mathcolor="purple">
                            <mtext>
                                超级管理员
                            </mtext>
                        </mstyle>
                    </mrow>
                <annotation encoding="application/x-tex">
                    \\color{purple}{超级管理员}
                </annotation>
            </semantics>
        </math>
    </span>
    <span class="katex-html" aria-hidden="true">
        <span class="base">
            <span class="strut" style="height:0.6833em;">
            </span>
            <span class="mord" style="color:brown;">
                <span class="mord cjk_fallback" style="color:purple;">
                    超级管理员
                </span>
            </span>
        </span>
    </span>
</span>
奖励;
<h2 id="%E8%AF%B7%E5%90%8C%E5%AD%A6%E4%BB%AC%E5%B0%8A%E9%87%8D%EF%BC%8C%E5%9C%A8%E6%AF%94%E8%B5%9B%E6%9C%9F%E9%97%B4%E5%B0%86%E4%BB%A3%E7%A0%81%E5%88%86%E4%BA%AB%E7%BB%99%E5%85%B6%E4%BB%96%E4%BA%BA%E3%80%82" tabindex="-1">请同学们尊重<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML">
                <semantics>
                    <mrow>
                        <mstyle mathcolor="red">
                            <mtext>抄袭</mtext>
                        </mstyle>
                    </mrow>
                    <annotation encoding="application/x-tex">\\color{red}{抄袭}</annotation>
                </semantics>
            </math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord" style="color:red;"><span class="mord cjk_fallback" style="color:red;">抄袭</span></span></span></span></span>,<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML">
                <semantics>
                    <mrow>
                        <mstyle mathcolor="red">
                            <mtext>要</mtext>
                        </mstyle>
                    </mrow>
                    <annotation encoding="application/x-tex">\\color{red}{要}</annotation>
                </semantics>
            </math>
        </span>
        <span class="katex-html" aria-hidden="true">
            <span class="base">
                <span class="strut" style="height:0.6833em;">
                </span>
                <span class="mord" style="color:red;">
                    <span class="mord cjk_fallback" style="color:red;">
                        要
                    </span>
                </span>
            </span>
        </span>
    </span>
    在比赛期间将代码分享给其他人。
</h2>
<hr>
<p style='font-size: 288%'>大 逝 寄</p>
<span>公元2024年12月22日16时前后,JK Steam所有用户因</span>
<span style='font-size: 114%'><b>抄题解次数过多</b></span>
<span>而被给予了</span>
<span style='color: purple; font-size: 250%'><b>超级管理员</b></span>
<span>奖励。</span>
<br>
<p>公元2024年12月23日下午,XL6B的某位同学一不小心将 (10^4)^2 算成了 10^6。</p>
<h2>
    MC专区
</h2>
<p>
<a href="https://ltcat.lanzoui.com/b0aj6gsid">
    下载启动器1点击这里(验证码PCL2)
</a>
一个很好的服务器地址:starmc.vip:25560
<a href="https://hmcl.huangyuhui.net/">
    下载启动器2点击这里
</a>
<h2>
    杂到不能再杂的东西
</h2>

<a href="http://noip.ac.cn/file/2/0A%E6%B2%B9%E7%8C%B4%E6%8F%92%E4%BB%B6.zip">tampermonkey</a></p>
<p style='text-align: center; '>警告:别往下翻!</p>
<p style='text-align: center; '>警告:别往下翻!!</p>
<p style='text-align: center; '>警告:别往下翻!!!</p>
<p style='text-align: center; '>警告:别往下翻!!!!</p>
<p style='text-align: center; '>警告:别往下翻!!!!!</p>
<p style='padding-bottom: 114px; color: yellow; text-align: center; '>警告:别往下翻!!!!!!</p>
<p style='padding-bottom: 288px; color: orange; text-align: center; '>警告:别往下翻!!!!!!!!!!!!</p>
<p style='padding-bottom: 514px; color: red; text-align: center; '>警告:别往下翻!!!!!!!!!!!!!!!!!!!!</p>
<img src='https://cdn.luogu.com.cn/upload/image_hosting/g5jm19g5.png' alt='这是沃尔玛购物袋'>
`;
        sectiontitle[6].innerHTML = '最新练习赛';
        sectiontitle[9].innerHTML = 'Steam';
        document.getElementsByClassName("section__body")[5].innerHTML = `
<ul class="group-list">
    <li class="group-list__item">
        <h2 class="section__title">
            好玩的服务器(待添加)
        </h2>
        <ol class="chip-list">
            <li class="chip-list__item">
                starmc.vip:25560或mchaptim.cn(同一个)
            </li>
        </ol>
    </li>
</ul>
        `
        let QwQ = yiyan[Math.floor(Math.random() * yiyan.length)];
        if (QwQ[0] == '!') QwQ = eval(QwQ.substr(1, QwQ.length - 1));
        QwQ = "\n" + QwQ;
        document.getElementsByClassName("section__body typo")[1].innerHTML = QwQ;
        await sleep(100);
        while (document.getElementsByClassName("section__body typo")[1].innerHTML == QwQ) await sleep(50);
        document.getElementsByClassName("section__body typo")[1].innerHTML = QwQ;
    }
    if (mode == "discuss") {
        sectiontitle[3].innerHTML = 'Steam';
    }
    if (mode == "discuss" || mode == "index") {
        console.log(mode);
        typoa[1].innerHTML = '启动';
        typoa[1].href = 'http://8.130.79.89:56789/';
        typoa[2].innerHTML = 'Steam上的网页游戏';
        typoa[2].href = 'https://store.steampowered.com';
        typoa[6].innerHTML = '技巧';
        typoa[6].href = 'https://www.bilibili.com/video/BV1GJ411x7h7/?spm_id_from=333.337.search-card.all.click';
        typoa[7].innerHTML = '游戏讨论专区'
        typoa[7].href = 'https://store.steampowered.com/?l=schinese&area=forums%22';
        typoa[8].innerHTML = '快速上分'
        typoa[8].href = 'https://hypixel.net';
        typoa[9].innerHTML = 'Steam';
        typoa[9].href = 'http://8.130.79.89:55674/';
    }
    if (mode == "rank") {
        document.getElementsByClassName("col--user")[0].style.width = document.getElementsByClassName("col--user")[2].style.width = '330px';
        document.getElementsByClassName("col--rp")[1].innerHTML = '积分';
        document.getElementsByClassName("col--detail rp-problem")[1].innerHTML = '练习';
        document.getElementsByClassName("col--ac")[1].innerHTML = '胜利';
        let ranking = Array.from({ length: 10 }, (v, i) => document.getElementsByClassName(`user-profile-badge v-center badge--lv${i + 1}`));
        let name_ = ["原木", "圆石", "铜块", "红石", "铁块", "金块", "钻石", "黑曜石", "合金块", "基岩"];
        for (let i = 0; i < 10; i++) {
            for (let j = ranking[i].length - 1; j >= 0; j--) {
                ranking[i][j].innerHTML = name_[i];
                ranking[i][j].dataset.tooltip = name_[i] + ranking[i][j].dataset.tooltip.substr(ranking[i][j].dataset.tooltip.search(":"), ranking[i][j].dataset.tooltip.length - ranking[i][j].dataset.tooltip.search(":"));
            }
        }
        document.getElementsByClassName(`user-profile-badge v-center badge--su`)[1].innerHTML = `沃尔玛购物袋`;
        document.getElementsByClassName(`user-profile-badge v-center badge--su`)[1].dataset.tooltip = `沃尔玛购物袋`;
        let name = document.getElementsByClassName("user-profile-name");
        for (let i = 0; i < name.length; i++) {
            if (~name[i].innerHTML.search("wushangheng")) name[i].innerHTML = `\n          Snoozing_QwQ (wushangheng)\n      <a class="user-profile-badge v-center badge--su" data-tooltip="JK Steam最傻逼的贡献者">贡献者 - 大脑残</a>\n`;
            else if (~name[i].innerHTML.search("Debug618")) name[i].innerHTML = `\n          刘泽辰 (Debug618)\n      <a class="user-profile-badge v-center badge--su" data-tooltip="JK Steam 作者">作者</a>\n`;
            else if (~name[i].innerHTML.search("qizhiyu")) name[i].innerHTML = `\n          qizhiyu\n      <a class="user-profile-badge v-center badge--su" data-tooltip="JK Steam 文案贡献者">贡献者</a>\n`;
        }
    } else if (mode == "record_") {
        let title_status = document.getElementsByClassName("section__title")[0];
        if (title_status.innerHTML == '\n      <span class="icon record-status--icon fail"></span>\n            <span style="color: #ff4f4f">0</span>\n            <span class="record-status--text fail">\n        Compile Error\n      </span>\n    ') title_sta
    } else if (mode == "problems") {
        let accepted = document.getElementsByClassName("record-status--text pass");
        let fail = document.getElementsByClassName("record-status--text fail");
        let lang = document.getElementsByClassName("col--lang");
        while (1) {
            for (let i = 0; i < accepted.length; i++) accepted[i].innerHTML = '\n            <span style="color: #25ad40">冠军!!!</span>\n\n    ';
            for (let i = 0; i < fail.length; i++) {
                if (fail[i].innerHTML.search("Wrong Answer") != -1) fail[i].innerHTML = "\n失败,评分:" + fail[i].innerHTML.substr(0, fail[i].innerHTML.search("Wrong Answer"));
                if (fail[i].innerHTML.search("Compile Error") != -1) fail[i].innerHTML = "\n文件缺失";
                if (fail[i].innerHTML.search("Time Exceeded") != -1) fail[i].innerHTML = "\n连接超时";
                if (fail[i].innerHTML.search("System Error") != -1) fail[i].innerHTML = "\n连接错误";
                if (fail[i].innerHTML.search("Runtime Error") != -1) fail[i].innerHTML = "\n文件错误";
            }
            for (let i = 3; i < lang.length; i++) {
                if (lang[i].innerHTML.search("C+") != -1) lang[i].innerHTML = lang[i].innerHTML.slice(0, lang[i].innerHTML.search("C+")) + "Steam" + lang[i].innerHTML.slice(lang[i].innerHTML.search("C+") + 3, lang[i].innerHTML.length);
            }
            await sleep(50);
        }
    } else if (mode == "record") {
        let accepted = document.getElementsByClassName("record-status--text pass");
        let progress = document.getElementsByClassName("record-status--text progress");
        let fail = document.getElementsByClassName("record-status--text fail");
        let lang = document.getElementsByClassName("col--lang");
        document.getElementsByClassName("col--problem")[1].innerHTML = '练习赛名称';
        document.getElementsByClassName("col--submit-by")[1].innerHTML = '游玩者';
        document.getElementsByClassName("col--lang")[1].innerHTML = '服务端版本';
        document.getElementsByClassName("col--time")[1].innerHTML = '游玩时长';
        document.getElementsByClassName("col--memory")[1].innerHTML = '占用内存';
        document.getElementsByClassName("col--submit-at")[1].innerHTML = '游玩时间';
        while (1) {
            for (let i = 0; i < accepted.length; i++) accepted[i].innerHTML = '\n            <span style="color: #25ad40">冠军!!!</span>\n\n    ';
            for (let i = 0; i < progress.length; i++) {
                if (progress[i].innerHTML.search("Fetched") != -1) progress[i].innerHTML = "\n连接到服务器";
                if (progress[i].innerHTML.search("Waiting") != -1) progress[i].innerHTML = "\n匹配中";
                if (progress[i].innerHTML.search("Compiling") != -1) progress[i].innerHTML = "\n等待开始";
                if (progress[i].innerHTML.search("Running") != -1) progress[i].innerHTML = "\n进行中";
            }
            for (let i = 0; i < fail.length; i++) {
                if (fail[i].innerHTML.search("Wrong Answer") != -1) fail[i].innerHTML = "\n失败,评分:" + fail[i].innerHTML.substr(0, fail[i].innerHTML.search("Wrong Answer"));
                if (fail[i].innerHTML.search("Compile Error") != -1) fail[i].innerHTML = "\n文件缺失";
                if (fail[i].innerHTML.search("Time Exceeded") != -1) fail[i].innerHTML = "\n连接超时";
                if (fail[i].innerHTML.search("System Error") != -1) fail[i].innerHTML = "\n连接错误";
                if (fail[i].innerHTML.search("Runtime Error") != -1) fail[i].innerHTML = "\n文件错误";
            }
            for (let i = 3; i < lang.length; i++) {
                if (lang[i].innerHTML.search("C+") != -1) lang[i].innerHTML = lang[i].innerHTML.slice(0, lang[i].innerHTML.search("C+")) + "Steam" + lang[i].innerHTML.slice(lang[i].innerHTML.search("C+") + 3, lang[i].innerHTML.length);
            }
            await sleep(50);
        }
    }
})();