Skip to content

Instantly share code, notes, and snippets.

@LiuJi-Jim
Last active January 25, 2024 04:10
Show Gist options
  • Save LiuJi-Jim/e1e7a858b91e7d8346f9 to your computer and use it in GitHub Desktop.
Save LiuJi-Jim/e1e7a858b91e7d8346f9 to your computer and use it in GitHub Desktop.
百度贴吧去广告
/*
用于Stylish
网址前缀:http://tieba.baidu.com/
*/
/* 列表页的 */
#thread_list>li:not(.j_thread_list)>.t_con,
#thread_list>li:not(.j_thread_list)>.iframe_wrapper,
#thread_list>li:not(.j_thread_list)>[id^=cpro],
#com_u9_head,
.aside_region.my_app,
.aside_region.life_helper,
[id="pagelet_frs-aside/pagelet/ad"],
[id="pagelet_frs-header/pagelet/head_content_middle"],
#game_live_list,
.search_form > div,
/* 详情页的 */
.p_postlist>div:not(.l_post):not(.p_postlist):not(.recommend_outtest_container), /* 详情页的异步翻页有BUG,会造成.p_postlist嵌套2层 */
.p_postlist>div[data-isautoreply],
.p_postlist > div.l_post.l_post_bright.j_l_post.clearfix:not([data-field]),
.thread_recommend.thread-recommend,
#encourage_entry,
#pb_adbanner,
#pb_content>.right_section>div:not(#celebrity):not(#my_tieba_mod):not(#tieba-notice) {
position: relative !important;
}
/* 列表页的 */
#thread_list>li:not(.j_thread_list)>.t_con:before,
#thread_list>li:not(.j_thread_list)>.iframe_wrapper:before,
#thread_list>li:not(.j_thread_list)>[id^=cpro]:before,
#com_u9_head:before,
.aside_region.my_app:before,
.aside_region.life_helper:before,
[id="pagelet_frs-aside/pagelet/ad"]:before,
[id="pagelet_frs-header/pagelet/head_content_middle"]:before,
#game_live_list:before,
.search_form > div:before,
/* 详情页的 */
.p_postlist>div:not(.l_post):not(.p_postlist):not(.recommend_outtest_container):before,
.p_postlist>div[data-isautoreply]:before,
.p_postlist > div.l_post.l_post_bright.j_l_post.clearfix:not([data-field]):before,
.thread_recommend.thread-recommend:before,
#encourage_entry:before,
#pb_adbanner:before,
#pb_content>.right_section>div:not(#celebrity):not(#my_tieba_mod):not(#tieba-notice):before {
content: '推广,请无视';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: -webkit-box;
-webkit-box-align: center;
-webkit-box-pack: center;
background: rgba(255, 255, 255, 0.8);
font-size: 24px;
font-family: sans-serif;
color: #999;
z-index: 300; /* 它那个sticky的header正好是301 */
}
/* 特殊 */
/* 左侧飘浮广告 */
div.clearfix>div>a[data-locate="点击跳转"]>img {
opacity: 0.2;
}
div.clearfix>div>a[data-locate="点击跳转"]>img:hover {
opacity: 1.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment