Zero Hedge - Auto-expand Comments

Automatically expands the fun comments.

// ==UserScript==
// @name        Zero Hedge - Auto-expand Comments
// @match       https://www.zerohedge.com/*
// @version     1.0
// @author      MedX
// @namespace   MedX-AA
// @license     MIT
// @icon        https://s2.googleusercontent.com/s2/favicons?domain=www.zerohedge.com
// @description Automatically expands the fun comments.
// ==/UserScript==

(function() {
    'use strict';

    function clickComments() {
        const buttons = document.getElementsByClassName("BlockComments_showBtn__Ds_Lu");
        if (buttons.length > 0) {
            for (const button of buttons) {
                button.click();
            }
            observer.disconnect(); // Stop observing once clicked.
        }
    }

    const observer = new MutationObserver(mutations => {
        clickComments();
    });

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

    // Initial check, in case the elements are already loaded.
    clickComments();
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址