【555】

删除页面中所有元素的 'javascript-hide' 类名

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         【555】
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  删除页面中所有元素的 'javascript-hide' 类名
// @author       YourName
// @match        https://yande.re/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    // 定义一个执行函数
    const revealElements = () => {
        // 找到所有带有 javascript-hide 类的元素
        const hiddenElements = document.querySelectorAll('.javascript-hide');
        
        hiddenElements.forEach(el => {
            el.classList.remove('javascript-hide');
            // 如果你希望更彻底一点,可以打印日志确认
            // console.log('已显示隐藏元素:', el);
        });
    };

    // 1. 页面加载完成后立即执行一次
    revealElements();

    // 2. 应对瀑布流加载(如果页面是动态加载内容的)
    // 使用观察者模式实时监控 DOM 变化
    const observer = new MutationObserver((mutations) => {
        revealElements();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();