Skip to content

Commit a45e6e8

Browse files
committed
fix
1 parent b7ba13c commit a45e6e8

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

Kill TieBa AD/Kill TieBa AD.user.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN 贴吧伪装广告清理
44
// @name:zh-TW 貼吧僞裝廣告清理
55
// @namespace hoothin
6-
// @version 0.51
6+
// @version 0.52
77
// @description Just Kill TieBa AD
88
// @description:zh-CN 清理ADB或UBO等未能清理掉的百度贴吧列表伪装广告、帖内伪装广告与推荐应用广告
99
// @description:zh-TW 清理ADB或UBO等未能清理掉的百度貼吧列表偽裝廣告、帖內偽裝廣告與推薦應用廣告
@@ -39,7 +39,7 @@
3939
};
4040
observer.observe(content, option);
4141
}else{
42-
content=document.querySelector(".content");
42+
content=document.querySelector(".l_container");
4343
if(content){
4444
delAD("#j_p_postlist","DIV");
4545
observer = new MutationObserver(function(records){
@@ -52,15 +52,17 @@
5252
observer.observe(content, option);
5353
}else{
5454
content=document.querySelector(".post_list");
55-
delAD(".threads_list","LI");
56-
observer = new MutationObserver(function(records){
55+
if(content){
5756
delAD(".threads_list","LI");
58-
});
59-
option = {
60-
'childList': true,
61-
'subtree': true
62-
};
63-
observer.observe(content, option);
57+
observer = new MutationObserver(function(records){
58+
delAD(".threads_list","LI");
59+
});
60+
option = {
61+
'childList': true,
62+
'subtree': true
63+
};
64+
observer.observe(content, option);
65+
}
6466
}
6567
}
6668

0 commit comments

Comments
 (0)