Greasy Fork

Greasy Fork is available in English.

新浪网页端去掉"app 打开"

去掉 新浪网页端的 app 打开,浏览完整内容

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         新浪网页端去掉"app 打开"
// @namespace    https://github.com/harryhare
// @version      0.1
// @description  去掉 新浪网页端的 app 打开,浏览完整内容
// @author       harryhare
// @license      GPL 3.0
// @icon         https://raw.githubusercontent.com/harryhare/userscript/master/index.png
// @match        https://*.sina.cn/*
// @match        https://sina.cn/*
// @grant        none
// ==/UserScript==


var counter = 0;

function clean_page() {
    counter += 1;
    console.log("****", counter);
    var x = document.getElementsByClassName("callApp_fl_btn")[0];
    //x.style.position="relative";
    if (x) {
        x.style.display = "none";
    }
    x = document.querySelectorAll(".s_card.z_c1")[0];
    //x.style.overflow="scroll";
    if (x) {
        x.style.height = "auto";
    }

    x = document.querySelectorAll(".look_more")[0];
    if (x) {
        x.style.display = "none";
    }
}

function onchange(records) {
    clean_page();
}

(function () {
    'use strict';
    // onload 太慢了,sina 网页加载太慢
    // window.onload=clean_page;
    clean_page();
    var mo = new MutationObserver(onchange);

    var option = {
        'childList': true,
        'subtree': false,
    };
    mo.observe(document.body, option);
})();