showall

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

Advertisement:

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

Advertisement:

// ==UserScript==
// @name         showall
// @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
    });
})();