果壳网文章正文显示

让果壳网页版的隐藏的文章正文变可见

// ==UserScript==
// @name         果壳网文章正文显示
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  让果壳网页版的隐藏的文章正文变可见
// @author       coccvo
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABOUExURTNV//b3/87W/26G/+bq/zxc/9jf/yxP/y9S/3WM/+7x/1x3/1Rw/36T/+Dl/8DL/56u/4SY/0dl//z9/oeb/4+i/7fD/2mD/yNI/6y6//DhJgYAAAD2SURBVDjL7VLLksQgCEQDKmjUaEwy//+ji7WVzBx379NVtKiAPAT44u8I/oFuFKrM5blv67bvUzYGSjGmvUZFuy380rN1XayVDM0houlKyP4xkD0uWGI8MsHJzEVW5XeE0whiN+rpyA/MWUzO2dL7CdnSiYdGQIKovrxMIXjn4Kw1qDm4cLobuYaPKrYhVjl6lsHrBOfjMai2FI1QlE9KdEx/1drTh2WgVLGvXvbkrySFuZo1PDkAraZCroQuAbRi4nVFGaXefQivfhDh61qyORvKmJV36dttALyAp8HBty3RnjS3kGrlz2HNs/Cr+HDP7/uL/4MfyFoNaUW5khcAAAAASUVORK5CYII=
// @match        *://www.guokr.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 使文章内容可见的函数
    function makeContentVisible() {
        // 选择内容容器
        var content = document.querySelector("#js_content");
        if (content) {
            content.style.visibility = "visible";
            content.style.opacity = "1";
        }

        // 移除可能隐藏内容的内联样式
        var elements = document.querySelectorAll("*");
        elements.forEach(function(element) {
            if (element.style.visibility === "hidden") {
                element.style.visibility = "visible";
            }
            if (element.style.opacity === "0") {
                element.style.opacity = "1";
            }
        });
    }

    // 等待页面完全加载
    window.addEventListener('load', function() {
        makeContentVisible();
    });

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