Block TiebaAD 5

屏蔽贴吧各種恼人元素

  1. // ==UserScript==
  2. // @name Block TiebaAD 5
  3. // @description 屏蔽贴吧各種恼人元素
  4. // @author xiang2009tw
  5. // @include http://tieba.baidu.com/*
  6. // @run-at document-start
  7. // @version 5.1
  8. // @namespace https://greasyfork.org/users/6037
  9. // @noframes
  10. // ==/UserScript==
  11. (function() {
  12.  
  13. var css = "";
  14. if (false || (document.domain == "tieba.baidu.com" || document.domain.substring(document.domain.indexOf(".tieba.baidu.com") + 1) == "tieba.baidu.com"))
  15. css += [
  16. "/*廣告*/\n.top_activity,#bonus_forum_aside ,.bonus_forum_aside ,.advertise_right_index,.baidutuisong-xiaoxiong,",
  17. "[id*=\"aside_ad\"],div[data-daid],#j_p_postlist>DIV:not(.l_post):not(.p_postlist),.tbui_afb_compact,.global_notice_wrap,",
  18. ".bdyx_tips_,.bdyx_tips_icon_,.firework_sender_wrap,.baidutuisong,.search_button{display:none !important;}",
  19. "/*樓中精品*/.thread_recommend{display:none !important;}\n/*帖子內收藏欄*/\n.core_title_absolute_bright{z-index: 0 !important;}",
  20. "/*簽名檔屏蔽*/\n.j_user_sign{display:none !important;}",
  21. "/*右側廣告刪除*/.search_form > div,[class*=\"live_show\"],[class*=\"j_encourage_entry\"],",
  22. "[class*=\"j_click_\"],[class*=\"celebrity\"],[class*=\"life_helper\"],[class*=\"my_app\"]{display:none !important;}",
  23. "/*浮動廣告*/\n.hover_btn,.close_btn,.u_joinvip{display:none !important;}",
  24. "/*帖子欄內廣告*/\nul#thread_list>li+li:not(.j_thread_list){display:none !important;}",
  25. "/*廣告*/\n#pb_adbanner,.pc2client,.dialogJmodal{display:none !important;}",
  26. "/*回覆帖特權*/\n.post_bubble_top,.post_bubble_middle,.post_bubble_bottom{background:none !important;}",
  27. ".save_face_bg.save_face_bg_2{display:none !important;}",
  28. "/*頂部遊戲、直播、推廣*/\n#com_u9_head,.u9_head,.game_live_list,.per_list{display:none !important;}",
  29. "/*廣告*/\n.pop_frame,.content_top,.j_play_list_panel,#pop_frame,.notify_bubble,.head_middle{display:none !important;}",
  30. "/*廣告*/[id*=\"questionnaire_contianer\"],[id*=\"questionnaire_bg\"],[class*=\"firework-wrap\"]{display:none !important;}"
  31.  
  32. ].join("\n");
  33. if (typeof GM_addStyle != "undefined") {
  34. GM_addStyle(css);
  35. } else if (typeof PRO_addStyle != "undefined") {
  36. PRO_addStyle(css);
  37. } else if (typeof addStyle != "undefined") {
  38. addStyle(css);
  39. } else {
  40. var node = document.createElement("style");
  41. node.type = "text/css";
  42. node.appendChild(document.createTextNode(css));
  43. var heads = document.getElementsByTagName("head");
  44. if (heads.length > 0) {
  45. heads[0].appendChild(node);
  46. } else {
  47. // no head yet, stick it whereever
  48. document.documentElement.appendChild(node);
  49. }
  50. }
  51. })();