Created
December 29, 2011 07:32
-
-
Save panfu/1532630 to your computer and use it in GitHub Desktop.
weibo广告杀手,适用于Chrome。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 铲除一切害人虫 | |
// @description 移除我想移除,留下我想留下 | |
// @match http://weibo.com/* | |
// @match http://*.weibo.com/* | |
// @match http://t.sina.com.cn/* | |
// @version 1.0 | |
// ==/UserScript== | |
// 在这里添加你想要去掉的dom的id | |
var as = [ | |
"pully_list", | |
"ads_bottom_1", | |
"pl_content_userGuider", | |
"pl_common_newuserguide" | |
]; | |
// 下面的代码不用不用动 | |
for (var i=0; i < as.length; i++) { | |
var g = document.getElementById(as[i]); | |
g.style.display="none"; | |
g.style.visibility="visible"; | |
} | |
var ps = ["Box_right"]; | |
for (var i=0; i < ps.length; i++) { | |
var b = document.getElementById(ps[i]); | |
var cs = b.children; | |
for (var i=0; i < cs.length; i++) { | |
var cid = cs[i].id; | |
if (/^(ad|pl_common)/.test(cid)) { | |
b.removeChild(document.getElementById(cid)); | |
} | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment