Greasy Fork

Greasy Fork is available in English.

自动展开全文(新浪看点、百度经验、持续增加中)

很多网站故意隐藏一些内容,用“在APP打开”这样的按钮来遮挡后面的内容,你总得小心翼翼的避开这些陷阱,以免点到这些按钮,否则会直接进入APK的下载页面🤣。这个脚本用来帮助用户直接在网页上展开这些内容😊

当前为 2021-02-12 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         自动展开全文(新浪看点、百度经验、持续增加中)
// @namespace 	 wangji
// @version      0.0.3
// @esversion    6
// @description  很多网站故意隐藏一些内容,用“在APP打开”这样的按钮来遮挡后面的内容,你总得小心翼翼的避开这些陷阱,以免点到这些按钮,否则会直接进入APK的下载页面🤣。这个脚本用来帮助用户直接在网页上展开这些内容😊 
// @author       [email protected]
// @include      *://k.sina.cn/article*
// @include      *://tech.sina.cn/*
// @include      *://jingyan.baidu.com/article*
// @grant        none
// ==/UserScript==





(function () {
    kandian();
    baidujingyan();
})();

/** 新浪看点 */
function kandian() {
    const url = window.location.href;
    if (!/k.sina.cn\/article/.test(url) && !/tech.sina.cn\//.test(url)) return;
    function removeAPKDownloadButton() {
        const section = document.querySelector('.z_c1')
        if (!section) return false;
        section.setAttribute("style", "height: auto;overflow: visible;");
        document.querySelector('.look_more')?.remove();
        return true;
    }
    const observer = new MutationObserver(function () {
        const ok = removeAPKDownloadButton();
        if (ok) observer.disconnect();
    });
    observer.observe(document.body, { childList: true, subtree: true });
}
/** 百度经验 */
function baidujingyan() {
    const url = window.location.href;
    if (!/jingyan.baidu.com\/article/.test(url)) return;
    function removeSeeMoreButton() {
        const section = document.querySelector('.exp-content-container');
        if (!section) return false;
        section.setAttribute("style", "max-height: fit-content;overflow: visible;");
        document.querySelector('.read-whole-mask')?.remove();
        return true;
    }
    const observer = new MutationObserver(function () {
        const ok = removeSeeMoreButton();
        if (ok) observer.disconnect();
    });
    observer.observe(document.body, { childList: true, subtree: true });
}