Greasy Fork

来自缓存

Greasy Fork is available in English.

HideSinaFlashInstallTips

去掉新浪微博弹出的提示“我们的产品需要安装flashplayer 10或更高版本”

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         HideSinaFlashInstallTips
// @name:zh-CN   隐藏新浪微博Flash安装提示
// @namespace    cat
// @version      0.1
// @description  去掉新浪微博弹出的提示“我们的产品需要安装flashplayer 10或更高版本”
// @author       Gavin
// @include      http://blog.sina.com.cn/*
// @run-at       document-end
// @website      https://21ido.com/
// @supportURL   https://github.com/think2cat/js4tampermonkey/blob/master/hideSinaFlashInstallTips/hideSinaFlashInstallTips.user.js
// ==/UserScript==

(function() {
    'use strict';

	let timer = 0;
	let clearAlert = () => {
        try{
            let alertDom = document.getElementsByClassName("CP_w");
            if(alertDom){
                for(let i=0; i < alertDom.length; i++){
					if("none" != alertDom[i].style.display){
						alertDom[i].style.display = "none";
						alertDom[i].previousElementSibling.style.display = "none";
						clearInterval(timer);
					}
				}
            }
        }catch(e){
        }
	};

    window.onload = function(){
		timer = setInterval(clearAlert, 3000);
		setTimeout(()=>{
			clearInterval(timer);
		},60000);
    };
})();