Greasy Fork

Greasy Fork is available in English.

解除getrelax.club防去广告屏蔽

解除getrelax.club防去广告屏蔽。

当前为 2018-11-17 提交的版本,查看 最新版本

// ==UserScript==
// @name         解除getrelax.club防去广告屏蔽
// @namespace    http://cyd.space/
// @version      0.1
// @description  解除getrelax.club防去广告屏蔽。
// @author       CYD
// @match        https://getrelax.club/*
// @run-at      document-body
// @grant       unsafeWindow
// ==/UserScript==


(function() {
    //tampermonkey两次运行bug处理
    if(unsafeWindow.thisIsNotFirstRun){
    	return;
    }
    //删除已有节点
    var adDiv = unsafeWindow.document.getElementsByClassName("playno1_ad_test");
    if(adDiv.length !== 0){
    	adDiv[0].parentNode.removeChild(adDiv[0]);
        //嫁接新的div到body防止对于布局的干扰
	    var nDiv = unsafeWindow.document.createElement("div");
	    nDiv.className = "playno1_ad_test";
	    nDiv.style = "height:200px;visibility:hidden;";
	    unsafeWindow.document.body.appendChild(nDiv);
    }
    unsafeWindow.thisIsNotFirstRun = true;
})();