360问答美化&360新知美化

360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告;支持电脑端和手机端

目前為 2020-04-15 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name 360问答美化&360新知美化
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.6.1
  5. // @description 360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告;支持电脑端和手机端
  6. // @author AN drew
  7. // @match https://*.wenda.so.com/*
  8. // @match http://xinzhi.wenda.so.com/*
  9. // @grant none
  10. // ==/UserScript==
  11. function getByClass(sClass){
  12. var aResult=[];
  13. var aEle=document.getElementsByTagName('*');
  14. for(var i=0;i<aEle.length;i++)
  15. {
  16. /*将每个className拆分*/
  17. if(typeof(aEle[i].className)=='string')
  18. {
  19. var arr=aEle[i].className.split(/\s+/);
  20. for(var j=0;j<arr.length;j++)
  21. {
  22. /*判断拆分后的数组中有没有满足的class*/
  23. if(arr[j]==sClass)
  24. {
  25. aResult.push(aEle[i]);
  26. }
  27. }
  28. }
  29. }
  30. return aResult;
  31. };
  32.  
  33. (function() {
  34.  
  35. var url = window.location.href;
  36. if(url.indexOf("wenda.so.com/u")== -1)
  37. {
  38. var article = getByClass("article")[0]
  39. if(article != null)
  40. article.style.width="1175px"
  41. }
  42.  
  43. var detail_leftside_rec= document.getElementById("detail-leftside-rec");
  44. if(detail_leftside_rec != null)
  45. detail_leftside_rec.setAttribute("style","display:none")
  46.  
  47. var js_mod_fixed_float = document.getElementById("js-mod-fixed-float");
  48. if(js_mod_fixed_float != null)
  49. js_mod_fixed_float.setAttribute("style","display:none")
  50.  
  51. var top_search_banner = getByClass("top-search-banner")[0]
  52. if(top_search_banner != null)
  53. top_search_banner.setAttribute("style","display:none")
  54.  
  55. var detail_guess = getByClass("detail-guess")[0]
  56. if(detail_guess != null)
  57. detail_guess.setAttribute("style","display:none")
  58.  
  59. var detail_guess_wrap = document.getElementById("detail-guess-wrap");
  60. if(detail_guess_wrap != null)
  61. detail_guess_wrap.setAttribute("style","display:none")
  62.  
  63. var js_mod_recommond_list = document.getElementById("js-mod-recommond-list");
  64. if(js_mod_recommond_list != null)
  65. js_mod_recommond_list.setAttribute("style","display:none")
  66.  
  67. var h2s = document.getElementsByTagName("h2");
  68. if(h2s != null)
  69. {
  70. for(var i=0; i<h2s.length; i++)
  71. {
  72. if(h2s[i].innerHTML.indexOf("您可能感兴趣的内容") != -1)
  73. {
  74. h2s[i].setAttribute("style","display:none")
  75. }
  76. else if(h2s[i].innerHTML.indexOf("为您推荐") != -1)
  77. {
  78. h2s[i].setAttribute("style","display:none")
  79. }
  80. else if(h2s[i].innerHTML.indexOf("今日热点") != -1)
  81. {
  82. h2s[i].setAttribute("style","display:none")
  83. }
  84. else if(h2s[i].innerHTML.indexOf("相关资讯") != -1)
  85. {
  86. h2s[i].setAttribute("style","display:none")
  87. }
  88. }
  89. }
  90.  
  91. var autoList = document.getElementById("autoList");
  92. if(autoList != null)
  93. autoList.setAttribute("style","display:none")
  94.  
  95. var onesearch = document.getElementById("onesearch");
  96. if(onesearch != null)
  97. onesearch.setAttribute("style","display:none")
  98.  
  99. var task_left_wrap = document.getElementById("task-left-wrap");
  100. if(task_left_wrap != null)
  101. task_left_wrap.setAttribute("style","display:none")
  102.  
  103. var mod_see_other = getByClass("mod-see-other")[0];
  104. if(mod_see_other != null)
  105. mod_see_other.click()
  106.  
  107. var btn_wrap = getByClass("btn-wrap")[0];
  108. if(btn_wrap != null)
  109. btn_wrap.click()
  110.  
  111. var aside = getByClass("aside")
  112. if(aside != null && url.indexOf("wenda.so.com/u")== -1)
  113. {
  114. for(i =0; i<aside.length; i++)
  115. {
  116. console.log(aside[i])
  117. aside[i].setAttribute("style","display:none");
  118. }
  119. }
  120.  
  121. var js_fixed_rt_bot_inn = document.getElementById("js-fixed-rt-bot-inn");
  122. if(js_fixed_rt_bot_inn != null)
  123. js_fixed_rt_bot_inn.setAttribute("style","display:none");
  124.  
  125. var busi_article = getByClass("busi-article");
  126. if(busi_article != null)
  127. {
  128. for(i =0; i<busi_article.length; i++)
  129. {
  130. busi_article[i].setAttribute("style","display:none");
  131. }
  132. }
  133.  
  134. var e_xinzhi_detail_interested = document.getElementById("e_xinzhi_detail_interested");
  135. if(e_xinzhi_detail_interested != null)
  136. e_xinzhi_detail_interested.setAttribute("style","display:none");
  137.  
  138. var js_list_item = document.getElementById("js-list-item");
  139. if(js_list_item != null)
  140. js_list_item.setAttribute("style","display:none");
  141.  
  142.  
  143. var news_card = document.getElementById("news-card");
  144. if(news_card != null)
  145. news_card.setAttribute("style","display:none");
  146.  
  147. var garllery = document.getElementById("garllery");
  148. if(garllery != null)
  149. garllery.setAttribute("style","display:none");
  150.  
  151. var business = document.getElementById("business");
  152. if(business != null)
  153. business.setAttribute("style","display:none");
  154.  
  155. var card_bor = getByClass("card-bor");
  156. if(card_bor != null)
  157. {
  158. for(i =0; i<card_bor.length; i++)
  159. {
  160. card_bor[i].setAttribute("style","display:none");
  161. }
  162. }
  163.  
  164. var js_relate_list = getByClass("js-relate-list")[0]
  165. if(js_relate_list != null)
  166. js_relate_list.setAttribute("style","display:none")
  167.  
  168. var js_ajax_askmore = getByClass("js-ajax-askmore")[0]
  169. if(js_ajax_askmore != null)
  170. js_ajax_askmore.setAttribute("style","display:none")
  171.  
  172. var js_interest_list = getByClass("js-interest-list")[0]
  173. if(js_interest_list != null)
  174. js_interest_list.setAttribute("style","display:none")
  175.  
  176. var interest_list = document.getElementById("interest-list");
  177. if(interest_list != null)
  178. interest_list.setAttribute("style","display:none")
  179.  
  180.  
  181. var g_scroll_loading = getByClass("g-scroll-loading")[0]
  182. if(g_scroll_loading != null)
  183. g_scroll_loading.setAttribute("style","display:none")
  184.  
  185.  
  186. var info_list = document.getElementById("info-list");
  187. if(info_list != null)
  188. info_list.setAttribute("style","display:none")
  189.  
  190.  
  191. var js_rec = document.getElementById("js-rec");
  192. if(js_rec != null)
  193. js_rec.setAttribute("style","display:none")
  194.  
  195.  
  196. var mod_detail_normal = getByClass("mod-detail-normal");
  197. if(mod_detail_normal != null)
  198. {
  199. for(i =0; i<mod_detail_normal.length; i++)
  200. {
  201. mod_detail_normal[i].setAttribute("style","display:none; visibility:hidden");
  202. console.log(mod_detail_normal[i])
  203. }
  204. }
  205.  
  206. })();
  207.  
  208.  
  209.  
  210.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址