Luogu User Content Block Remover

This removes the content blocker on Luogu user homepage.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Luogu User Content Block Remover
// @namespace    http://tampermonkey.net/
// @version      2024-01-20
// @match        https://www.luogu.com.cn/user/*
// @grant        none
// @author       Rainbow_qwq
// @description  This removes the content blocker on Luogu user homepage.
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    function wait(calb, cond) {
        if (cond()) {
            return calb();
        } else {
            setTimeout(function() {
                wait(calb, cond);
            }, 0);
        }
    }
    wait(function() {
        let t = document.querySelector(".introduction.marked");
        if (t.style.display === "none") {
            t.style.display = "block";
            for (let i = 0; i < t.parentElement.children.length; i++) {
                if (t.parentElement.children[i].innerText === '系统维护,该内容暂不可见。') {
                    t.parentElement.children[i].remove();
                }
            }
        }
    }, function() {
        return document.querySelector(".introduction.marked") !== null;
    });
})();