Luogu Better Plus

Luogu is different from the past.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Luogu Better Plus
// @namespace    https://www.luogu.com.cn/user/1030733
// @version      1.0.2.8
// @description  Luogu is different from the past.
// @author       nythm
// @match        https://www.luogu.com.cn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=luogu.com.cn
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_registerMenuCommand
// @license      GPL
// ==/UserScript==
 
(function() {
    'use strict';
    const target = document.evaluate('/html/body/div[1]/div[2]/div[2]/div[2]/div[1]/text()[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
    if (target) {
        target.textContent = "享受 宁 的快乐!";
    }
})();
(function() {var css = "";
	css += [
		"[data-v-e5ad98f0][data-v-f9624136]{",
		"	display:block !important;",
		"}",
	].join("\n");
if (typeof GM_addStyle != "undefined") {
	GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
	PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
	addStyle(css);
} else {
	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node);
	} else {
		// no head yet, stick it whereever
		document.documentElement.appendChild(node);
	}
}
})();
function Again()
{
    var css = GM_getValue("css");
    document.querySelector('main[style="background-color: rgb(239, 239, 239);"]').style=css;
}
window.onload=function(){
    var config = GM_getValue("config");
    if(GM_getValue("config")==null) {
        config=1
        GM_setValue("config",config);
        GM_setValue("css","background-color: rgb(239, 239, 239);");
    }
    GM_registerMenuCommand("设置背景CSS",function(){
        var css = GM_getValue("css");
        css=prompt("Please give us your CSS:","");
        GM_setValue("css",css);
        alert("OK!");
    });
    Again();
    setTimeout(function(){
        Again();
    }, 2000);
};