Opera UserJs:屏蔽淘宝首页弹出广告
Opera UserJs Code:
/**
* 淘宝首页
* @url http://www.taobao.com
* @description 屏蔽淘宝首页弹出广告
*/
if( location.hostname.indexOf('www.taobao.com') != -1 ) {
//屏蔽新窗口广告弹出
window.opera.addEventListener(
'BeforeEventListener.load',
function (e) {
if(e.listener.toString().indexOf('function(){q._showAds()}') != -1) {
e.preventDefault();
return;
}
}, false
);
//屏蔽右下角pop窗口
window.opera.addEventListener(
'BeforeExternalScript',
function (e) {
if(e.element.src.indexOf('wizard.js') != -1) {
e.preventDefault();
return;
}
}, false
);
}
Firefox Greasemonkey Code:
// ==UserScript==
// @name taobao
// @namespace tb
// @author nanzhi at www.12sui.cn
// @description pingbi index ad
// @include http://www.taobao.com
// @include http://taobao.com
// ==/UserScript==
document.cookie = '_tb_defaultbackpop_=1';
document.getElementById('J_DirectionalFloat').innerHTML = '';
对Greasemonkey不甚熟悉,所以用的方法比较散~
标签: greasemonkey, userjs
这篇文章发布于 2009年10月14日,星期三,21:29,归类于 JavaScript, Opera。 您可以跟踪这篇文章的评论通过 RSS 2.0 feed。 您可以留下评论,或者从您的站点trackback。