Greasy Fork

Greasy Fork is available in English.

tsdm no Popups

天使动漫论坛签到防弹窗处理

当前为 2014-06-14 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        tsdm no Popups
// @author         Ted423
// @description 天使动漫论坛签到防弹窗处理
// @namespace   http://greasyfork.icu/users/85
// @include     http://www.tsdm.net/*
// @version     1.2
// @grant       none
// ==/UserScript==
var temp=document.getElementsByTagName("font")[0];
document.getElementsByTagName("font")[0].textContent="签到";
	temp=document.getElementsByTagName("font")[0].parentElement;
temp.onclick=function(){
	if(window.navigator.userAgent.indexOf("Chrome")===-1){
		var temp2;
temp1=temp.attributes;
	for(i=0;i<temp1.length;i++)
	if(temp1[i].value.indexOf("showWindow")!=-1){
    console.log(i);
  console.log(temp1[i].value);
   temp2=temp1[i].value;
		
break;
}
eval(temp2);
}
			var callback = function(records){
    records.map(function(record){
    //	console.log('Mutation target id: ' + record.target.id);
   //	console.log('Mutation type: ' + record.type); 
    	if((record.target.id==='fwin_content_dsu_paulsign')&&(record.target.nextElementSibling)){
var script = document.createElement('script');
script.type = 'text/javascript';
fn="function openTsRecommend(sId){};";
script.textContent = fn.toString();

var de = document.documentElement;
de.appendChild(script);
Icon_selected("ng");
mo.disconnect();
    }
    });
};

var mo = new MutationObserver(callback);

var option = {
    'childList': true, 
    'subtree': true,
    'characterData' : true
};
var element = document.getElementById("fwin_content_dsu_paulsign");
mo.observe(document.body, option);

}