🏠 Home 

【屏蔽广告】屏蔽谷歌广告、百度广告、知乎广告、隐藏谷歌和百度搜索增强百度搜索结果的各种广告等等(过滤所有采用谷歌联盟和百度联盟等广告联盟的广告)

强力模式可隐藏大部分悬浮广告,新增twitter和Youtube微博视频下载以及广告过滤,可按网址和关键词屏蔽过滤百度谷歌必应bing360微信微博知乎豆瓣B站的搜索结果、屏蔽谷歌推广的广告和去知乎广告、csdn广告、去百度搜索广告、去百度知道广告、去百度文库广告、去360搜索广告、去必应Bing搜索广告、百度文库去广告、去百度在别的网站的推广广告,移除知乎的强制登陆弹窗。去豆瓣广告、去B站广告

  1. // ==UserScript==
  2. // @name 【屏蔽广告】屏蔽谷歌广告、百度广告、知乎广告、隐藏谷歌和百度搜索增强百度搜索结果的各种广告等等(过滤所有采用谷歌联盟和百度联盟等广告联盟的广告)
  3. // @namespace http://gongju.dadiyouhui03.cn/app/tool/youhou/index.html
  4. // @version 4.805
  5. // @description 强力模式可隐藏大部分悬浮广告,新增twitter和Youtube微博视频下载以及广告过滤,可按网址和关键词屏蔽过滤百度谷歌必应bing360微信微博知乎豆瓣B站的搜索结果、屏蔽谷歌推广的广告和去知乎广告、csdn广告、去百度搜索广告、去百度知道广告、去百度文库广告、去360搜索广告、去必应Bing搜索广告、百度文库去广告、去百度在别的网站的推广广告,移除知乎的强制登陆弹窗。去豆瓣广告、去B站广告
  6. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUxpcQCI/////wKJ/0Cm/xmU/xaS/+33/9fs/0So/wSK/w2O/wCI/wGI/9/w/wCI/+/4/1Ct/wCI/wiM/xWS/+r1//H4/waL/+33/xGQ/wCI/5/S/4XG//f7/6/a//3+/x2W//b7/xmU/xCP/yCX/7Xc/wuN/1Ov/3a//7Hb/y6e/w6P/5/T/2+8//3+//7///r8/3fA/weL/zOg/xKQ/9/w//n8/xyV/+j0/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Xeg6TWPyi6c/99p+6Xf+Ey/9ZuV8+Zsfj+vs//e6WJB4IXTprV9+kJgwUXY/n8VcT7RF5AmQAgAAAAASUVORK5CYII=
  7. // @match *://*.baidu.com/*
  8. // @match *://*.google.com/*
  9. // @match *://*.bing.com/*
  10. // @match *://*.so.com/*
  11. // @match *://*.zhihu.com/*
  12. // @match *://*.douban.com/*
  13. // @match *://*.weibo.com/*
  14. // @match *://twitter.com/*
  15. // @match *://*.youtube.com/*
  16. // @match *://*.bilibili.com/*
  17. // @match *://*.csdn.net/*
  18. // @match *://*/*
  19. // @inject-into content
  20. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-d/jquery/2.1.4/jquery.min.js
  21. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-d/sweetalert/2.1.2/sweetalert.min.js
  22. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-d/jquery.qrcode/1.0/jquery.qrcode.min.js
  23. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-d/html2canvas/0.5.0-beta4/html2canvas.js
  24. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-d/echarts/5.0.1/echarts.min.js
  25. // @grant GM_addStyle
  26. // @grant GM_download
  27. // @grant GM_xmlhttpRequest
  28. // @grant GM_getResourceText
  29. // @run-at document-start
  30. // @grant unsafeWindow
  31. // @grant GM_setClipboard
  32. // @grant GM_setValue
  33. // @grant GM_getValue
  34. // @grant GM_deleteValue
  35. // @grant GM_openInTab
  36. // @grant GM_registerMenuCommand
  37. // @grant GM_unregisterMenuCommand
  38. // @grant GM.getValue
  39. // @grant GM.setValue
  40. // @grant GM_info
  41. // @grant GM_notification
  42. // @grant GM_getResourceText
  43. // @grant GM_openInTab
  44. // @grant GM_download
  45. // @license End-User License Agreement
  46. // @noframes
  47. // @connect zhihu.com
  48. // @connect baidu.com
  49. // @connect baiducontent.com
  50. // @connect dadiyouhui02.cn
  51. // @connect *
  52. // ==/UserScript==
  53. /*
  54. 需要更多功能和建议的话,
  55. 欢迎跟帖反馈
  56. 【网站广告优化】百度贴吧、百度知道、百度搜索等百度系去广告优化
  57. 大多数网站若使用了谷歌广告、百度广告的页面都将会被净化并隐藏相关广告
  58. 针对大部分网站通用的广告样式进行屏蔽美化
  59. 可按网址和关键词过滤搜索结果
  60. 您可自由修改网址和关键词词库且可随意导入导出备份
  61. 过滤大多数网站中谷歌联盟百度联盟的广告
  62. 去知乎广告,移除知乎官方不登录不让浏览的登陆弹窗
  63. twitter和Youtube微博视频下载以及广告过滤
  64. 强化知乎B站豆瓣油管的过滤,过滤功能对搜索结果、评论、昵称等可以同时生效
  65. 【模块化设计可自由的自定义开关功能】
  66. 若因为使用的网站更新而我们未及时更新导致部分功能异常的你都可以自由选择关闭和开启。
  67. 【搜索结果优化】自动隐藏搜索结果中的各种广告,
  68. 可按网址和关键词屏蔽过滤搜索结果,已支持的搜索:百度、谷歌、百度、必应bing、360等
  69. 例如你可以自行添加需要屏蔽的网址或则关键词,如:百家号、baijiahao.baidu.com之类的
  70. 【新增】twitter和Youtube微博视频下载以及广告过滤。播放遇到广告可自动跳过和屏蔽使用视频下载功能需自带##,不然无法下载。
  71. 视频解析功能基于视频解析站实现。感谢相关网站的服务
  72. 白名单解决有些网页被错误过滤的情况,设置白名单后插件将在名单的页面停止运行
  73. 2023.06.19 被动去广告增加对页面悬浮广告的删除能力。能屏蔽大部分牛皮癣广告了。
  74. -如果误杀请自行关闭被动去广告
  75. -如果页面显示错误可自行关闭被动去广告
  76. -如果网页异常可在插件管理器里排除在该网站网址内运行
  77. 增加对简书的广告过滤和某MP4下载站的广告过滤
  78. 说明:
  79. 声明:请您知晓本插件本是个人测试自用,本不完美也不保证可用性。
  80. 相关功能及代码均来自互联网及网友分享,我们仅做了相关功能的整合。
  81. 如无意中侵犯了哪个企业或个人等的知识产权,请联系我们将及时删除等相关处理
  82. 2023.06.19 被动去广告增加对页面悬浮广告的删除能力。能屏蔽大部分牛皮癣广告了。
  83. 如果误杀请自行关闭被动去广告
  84. */
  85. var mmmjhy=0;
  86. var bili22girl=true;
  87. function isMobile() {
  88. let flag= false;
  89. if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
  90. flag= true;
  91. }
  92. return flag
  93. }
  94. GM_setValue('zkdz_name', 'baiduga');
  95. function kgpingbisinfo() {
  96. if (GM_getValue('allconfig')) {
  97. return;
  98. }
  99. if (GM_getValue('hasRunkgpingbisBefore')) {
  100. return;
  101. }
  102. GM_setValue('hasRunkgpingbisBefore', true);
  103. swal({
  104. title: "欢迎您、插件已针对大部分网站通用的广告样式进行屏蔽美化",
  105. text: "本插件提供了很多自定义功能,可以自由开启/关闭相应功能,本次更新新增了被动去广告。被动去广告并且会过滤大部分网站的图片悬浮广告。建议开启增加广告过滤效果",
  106. icon: "success",
  107. buttons: ['暂时不用', '开启被动去广告模式'],
  108. }).then((value) => {
  109. if (value) {
  110. let allconfig = GM_getValue('allconfig') || {};
  111. allconfig.baidu = allconfig.baidu || {};
  112. allconfig.baidu.kgpingbis = true;
  113. GM_setValue('allconfig', allconfig);
  114. swal({
  115. title: "已为您开启被动去广告模式。过滤规则后续会继续更新,过滤规则可能不兼容所有的页面。如果页面显示不正常可将当前页面加入白名单、或者在控制面板-高级功能--特色功能关闭",
  116. icon: "info",
  117. });
  118. } else {
  119. swal({
  120. title: "您已取消被动去广告模式,如果想体验被动去广告模式可在控制面板-高级功能-特色功能中开启",
  121. icon: "info",
  122. });
  123. }
  124. });
  125. }
  126. (function() {
  127. let windodwhost=window.location.host;
  128. let ipdchcek=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
  129. if (windodwhost.indexOf(':') >0 || ipdchcek.test(windodwhost)==true ){
  130. return false;
  131. }
  132. // kgpingbisinfo();
  133. var configm='aHR0cHM6Ly93d3cuZGFkaXlvdWh1aTAxLmNuL2FwcC90b29sL3Y0LWJkdG9vbC5odG1s';
  134. configm=window.atob(configm);
  135. GM_registerMenuCommand("【♐ 控制面板-点击设置】", function(){
  136. GM_openInTab(configm, {active: !0});
  137. });
  138. var allconfig=new Array();
  139. allconfig=
  140. {
  141. "baidu": {'baidumenu':true,'baidulogo':true,'baidulianjie':true,'baiduhot':true,'baidueye':false,'baiducss':false,'baidutbq':true,'baidujdq':true,'kgbaidued':true,'kgbaiduad':true,'kggoogleed':true,'kggooglead':true,'kg360ed':true,'kg360ad':true,'kgbinged':true,'kgbingad':true,'kgtwied':true,'kgtwimv':true,'kgtwiad':true,'kgyoued':true,'kgyoumv':true,'kgyouad':true,'kgweixined':true,'kgweixinad':true,'kgdoubaned':true,'kgdoubanad':true,'kgzhihued':true,'kgzhihuad':true,'kgbilied':true,'kgbiliad':true,'kgweiboed':true,'kgweiboad':true,'kgweibomv':true,'kgpingbis':false,'Proactivelyads':false,'kgpingbiiframe':false,'addkwssbutton':true,'addssbutton':true,'baidueyecolor':'rgba(204,232,207,1)'},
  142. "google": {},
  143. "so360": {},
  144. "pingbiurl": [],
  145. "whiteurl": [],
  146. "pingbikw": [],
  147. };
  148. if (GM_getValue('allconfig')){
  149. }else{
  150. GM_setValue('allconfig', allconfig);
  151. }
  152. var configurl=window.location.href;
  153. var configmain = document.domain;
  154. var faviconurl = "https://favicon.yandex.net/favicon/v2/";
  155. var faviconurlb = "https://t3.gstatic.cn/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=";
  156. var favicmnurlb = "https://t3.gstatic.cn/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=";
  157. var allconfigtime=1661760210;
  158. var allconfigcz=0;
  159. if (GM_getValue('allconfigtime')){
  160. if (parseInt(GM_getValue('allconfigtime'))<allconfigtime){
  161. allconfigcz=1;
  162. GM_setValue('allconfigtime', allconfigtime);
  163. }
  164. }else{
  165. GM_setValue('allconfigtime', allconfigtime);
  166. allconfigcz=1;
  167. }
  168. if (allconfigcz==1){
  169. var saallconfig=new Array();
  170. saallconfig=
  171. {
  172. "baidu": {'baidumenu':true,'baidulogo':true,'baidulianjie':true,'baiduhot':true,'baidueye':false,'baiducss':false,'baidutbq':true,'baidujdq':true,'kgbaidued':true,'kgbaiduad':true,'kggoogleed':true,'kggooglead':true,'kg360ed':true,'kg360ad':true,'kgbinged':true,'kgbingad':true,'kgtwied':true,'kgtwimv':true,'kgtwiad':true,'kgyoued':true,'kgyoumv':true,'kgyouad':true,'kgweixined':true,'kgweixinad':true,'kgdoubaned':true,'kgdoubanad':true,'kgzhihued':true,'kgzhihuad':true,'kgbilied':true,'kgbiliad':true,'kgweiboed':true,'kgweiboad':true,'kgweibomv':true,'kgpingbis':false,'Proactivelyads':false,'kgpingbiiframe':false,'addkwssbutton':true,'addssbutton':true,'baidueyecolor':'rgba(204,232,207,1)'},
  173. "google": {},
  174. "so360": {},
  175. "pingbiurl": GM_getValue('allconfig').pingbiurl,
  176. "whiteurl": GM_getValue('allconfig').whiteurl,
  177. "pingbikw": GM_getValue('allconfig').pingbikw,
  178. };
  179. GM_setValue('allconfig', saallconfig);
  180. console.log('已重置');
  181. }
  182. if(configmain.indexOf("baidu.com") > 0 ) {
  183. $(document).ready(function(e) {
  184. $(this).keydown(function (e){
  185. if(e.which == "13"){
  186. bdgokw();
  187. }
  188. })
  189. });
  190. $('body').on('click',"input[id='su']",function(){
  191. bdgokw()
  192. })
  193. function bdgokw() {
  194. if (document.domain.indexOf("baidu.com") > 0 ) {
  195. if ($("input[id='su']").length > 0 && $("input[id='kw']").length > 0 && $("input[class='search-input']").length ==0){
  196. let kwtxt=$("input[id='kw']").val();
  197. let kwurl='https://www.baidu.com/s?ie=utf-8&wd='+encodeURIComponent(kwtxt);
  198. window.location.href=kwurl;
  199. }
  200. }
  201. }
  202. setTimeout(function(){
  203. if($("span[name='tj_settingicon']").length > 0){
  204. $("span[name='tj_settingicon']").after('<a class="s-top-right-text c-font-normal c-color-t s-top-right-new "style="position:relative;overflow: visible; " id="zk-top-gobtn" >控制面板</ a>');
  205. $('body').on('click','#zk-top-gobtn',function(){
  206. GM_openInTab(configm, {active: !0});
  207. })
  208. }
  209. }, 1000);
  210. }
  211. function configjc() {
  212. if (configmain.indexOf(window.atob('ZGFkaXlvdWh1aQ==')) >0 && configurl.indexOf(window.atob('YmR0b29sLmh0bWw=')) >0 ){
  213. if ($('#configload').length == 0 ) {
  214. $('body').attr('id','configload');
  215. $('#dataversion').attr('version',GM_info.script.version);
  216. $('#dataversion').html(GM_info.script.updateURL);
  217. }
  218. }else{
  219. return;
  220. }
  221. }
  222. $(document).ready(function(){
  223. $('body').on('click','.layui-btn.whiteurl',function(){
  224. configjc();
  225. if ($(this).siblings('input').attr("data_zt")=="0"){
  226. $(this).siblings('input').attr("data_zt","1");
  227. $(this).text("准备删除中,手动点击保存后方可生效");
  228. // 手动点击保存后方可生效,不点击保存按钮不会生效
  229. //若需按网址和关键词屏蔽过滤。请在控制面板中添加,并且手动点击保存后方可生效,不点击保存按钮不会生效
  230. $(this).css("background-color","#908d8d");
  231. }else{
  232. $(this).siblings('input').attr("data_zt","0");
  233. $(this).text("删除");
  234. $(this).css("background-color","#009688");
  235. }
  236. })
  237. $('body').on('click','.layui-btn.pingbiurl',function(){
  238. configjc();
  239. if ($(this).siblings('input').attr("data_zt")=="0"){
  240. $(this).siblings('input').attr("data_zt","1");
  241. $(this).text("准备删除中,手动点击保存后方可生效");
  242. // 手动点击保存后方可生效,不点击保存按钮不会生效
  243. //若需按网址和关键词屏蔽过滤。请在控制面板中添加,并且手动点击保存后方可生效,不点击保存按钮不会生效
  244. $(this).css("background-color","#908d8d");
  245. }else{
  246. $(this).siblings('input').attr("data_zt","0");
  247. $(this).text("删除");
  248. $(this).css("background-color","#009688");
  249. }
  250. })
  251. $('body').on('click','.layui-btn.pingbikw',function(){
  252. configjc();
  253. if ($(this).siblings('input').attr("data_zt")=="0"){
  254. $(this).siblings('input').attr("data_zt","1");
  255. $(this).text("准备删除中,手动保存后方可生效");
  256. $(this).css("background-color","#908d8d");
  257. }else{
  258. $(this).siblings('input').attr("data_zt","0");
  259. $(this).text("删除");
  260. $(this).css("background-color","#009688");
  261. }
  262. })
  263. $('body').on('click','.layui-btn.whiteurladd',function(){
  264. configjc();
  265. let addurl=$(this).siblings('input').val();
  266. if (addurl.length <5){
  267. alert("输入的网址太短");
  268. return;
  269. }
  270. if (addurl.indexOf("http") >=0){
  271. let addurldomain = addurl.split("/");
  272. if( addurldomain[2] ) {
  273. addurl=addurldomain[2];
  274. }else{
  275. alert("输入的网址错误");
  276. return;
  277. }
  278. }else{
  279. if (addurl.indexOf(".") >0){
  280. }else{
  281. alert("输入的网址不合法");
  282. return;
  283. }
  284. }
  285. $("#whiteurl").prepend('<label class="layui-form-label" style=" width: 150px;">新增网址</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+addurl+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn whiteurl" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  286. $(this).siblings('input').val('');
  287. })
  288. $('body').on('click','.layui-btn.pingbiurladd',function(){
  289. configjc();
  290. let addurl=$(this).siblings('input').val();
  291. if (addurl.length <5){
  292. alert("输入的网址太短");
  293. return;
  294. }
  295. if (addurl.indexOf("www.baidu.com/link?") >=0){
  296. alert("此网址是百度的网址,屏蔽后可能出现问题。请使用其他的网站的链接");
  297. return;
  298. }
  299. if (addurl.indexOf("http") >=0){
  300. let addurldomain = addurl.split("/");
  301. if( addurldomain[2] ) {
  302. addurl=addurldomain[2];
  303. }else{
  304. alert("输入的网址不合法");
  305. return;
  306. }
  307. }else{
  308. if (addurl.indexOf(".") >0){
  309. }else{
  310. alert("输入的网址不合法");
  311. return;
  312. }
  313. }
  314. $("#pingbiurl").prepend('<label class="layui-form-label" style=" width: 150px;">新增网址</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+addurl+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn pingbiurl" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  315. $(this).siblings('input').val('');
  316. })
  317. $('body').on('click','.layui-btn.pingbikwadd',function(){
  318. configjc();
  319. let addkw=$(this).siblings('input').val();
  320. if (addkw.length <2){
  321. alert("输入的关键词必须大于等于2个字 ");
  322. return;
  323. }
  324. $("#pingbikw").prepend('<label class="layui-form-label" style=" width: 150px;">新增关键词</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+addkw+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn pingbikw" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  325. $(this).siblings('input').val('');
  326. })
  327. })
  328. function sosave() {
  329. configjc();
  330. var whiteurlen=new Array();
  331. $(".layui-btn.whiteurl").siblings('input').each(function(index,element) {
  332. if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  333. whiteurlen.push($(this).val());
  334. }
  335. })
  336. whiteurlen=Array.from(new Set(whiteurlen));
  337. whiteurlen=whiteurlen.slice(0,999);
  338. var pingbiurlen=new Array();
  339. $(".layui-btn.pingbiurl").siblings('input').each(function(index,element) {
  340. if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  341. pingbiurlen.push($(this).val());
  342. }
  343. })
  344. pingbiurlen=Array.from(new Set(pingbiurlen));
  345. pingbiurlen=pingbiurlen.slice(0,999);
  346. var pingbiukwen=new Array();
  347. $(".layui-btn.pingbikw").siblings('input').each(function(index,element) {
  348. if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  349. pingbiukwen.push($(this).val());
  350. }
  351. })
  352. pingbiukwen=Array.from(new Set(pingbiukwen));
  353. pingbiukwen=pingbiukwen.slice(0,999);
  354. var saallconfig=new Array();
  355. saallconfig=
  356. {
  357. "baidu": {'baidumenu':$("#baidumenu").find("input").prop("checked"),'baidulogo':$("#baidulogo").find("input").prop("checked"),'baidulianjie':$("#baidulianjie").find("input").prop("checked"),'baiduhot':$("#baiduhot").find("input").prop("checked"),'baidutbq':$("#baidutbq").find("input").prop("checked"),'baidujdq':$("#baidujdq").find("input").prop("checked"),'kgbaidued':$("#kgbaidued").find("input").prop("checked"),'kgbaiduad':$("#kgbaiduad").find("input").prop("checked"),'kggoogleed':$("#kggoogleed").find("input").prop("checked"),'kggooglead':$("#kggooglead").find("input").prop("checked"),'kg360ed':$("#kg360ed").find("input").prop("checked"),'kg360ad':$("#kg360ad").find("input").prop("checked"),'kgbinged':$("#kgbinged").find("input").prop("checked"),'kgbingad':$("#kgbingad").find("input").prop("checked"),'kgtwied':$("#kgtwied").find("input").prop("checked"),'kgtwimv':$("#kgtwimv").find("input").prop("checked"),'kgtwiad':$("#kgtwiad").find("input").prop("checked"),'kgyoued':$("#kgyoued").find("input").prop("checked"),'kgyoumv':$("#kgyoumv").find("input").prop("checked"),'kgyouad':$("#kgyouad").find("input").prop("checked"),'kgweixined':$("#kgweixined").find("input").prop("checked"),'kgweixinad':$("#kgweixinad").find("input").prop("checked"),'kgdoubaned':$("#kgdoubaned").find("input").prop("checked"),'kgdoubanad':$("#kgdoubanad").find("input").prop("checked"),'kgzhihued':$("#kgzhihued").find("input").prop("checked"),'kgzhihuad':$("#kgzhihuad").find("input").prop("checked"),'kgbilied':$("#kgbilied").find("input").prop("checked"),'kgbiliad':$("#kgbiliad").find("input").prop("checked"),'kgweiboed':$("#kgweiboed").find("input").prop("checked"),'kgweiboad':$("#kgweiboad").find("input").prop("checked"),'kgweibomv':$("#kgweibomv").find("input").prop("checked"),'kgpingbis':$("#kgpingbis").find("input").prop("checked"),'Proactivelyads':$("#Proactivelyads").find("input").prop("checked"),'kgpingbiiframe':$("#kgpingbiiframe").find("input").prop("checked"),'addkwssbutton':$("#addkwssbutton").find("input").prop("checked"),'addssbutton':$("#addssbutton").find("input").prop("checked"),'baiducss':$("#baiducss").find("input").prop("checked"),'baidueye':$("#baidueye").find("input").prop("checked"),'baidueyecolor':$("#baidueyecolor").val()},
  358. "google": {},
  359. "so360": {},
  360. "pingbiurl": pingbiurlen,
  361. "whiteurl": whiteurlen,
  362. "pingbikw": pingbiukwen,
  363. };
  364. GM_setValue('allconfig', saallconfig);
  365. alert("已保存设置");
  366. }
  367. function sosoreset() {
  368. if (configmain.indexOf(window.atob('ZGFkaXlvdWh1aQ==')) >0 && configurl.indexOf(window.atob('YmR0b29sLmh0bWw=')) >0 ){
  369. if (GM_getValue('allconfig')){
  370. }else{
  371. GM_setValue('allconfig', allconfig);
  372. }
  373. let allwconfig=GM_getValue('allconfig');
  374. for(let i in allwconfig){
  375. if ( Object.keys(allwconfig[i]).length > 0){
  376. if (i=="pingbiurl"){
  377. $("#pingbiurl").html("");
  378. for(let b in allwconfig[i]){
  379. $("#pingbiurl").append('<label class="layui-form-label" style=" width: 150px;">已经屏蔽的网址'+(Number(b)+1)+'</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+allwconfig[i][b]+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn pingbiurl" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  380. }
  381. }
  382. if (i=="whiteurl"){
  383. $("#whiteurl").html("");
  384. for(let b in allwconfig[i]){
  385. $("#whiteurl").append('<label class="layui-form-label" style=" width: 150px;">白名单网址'+(Number(b)+1)+'</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+allwconfig[i][b]+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn whiteurl" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  386. }
  387. }
  388. if (i=="pingbikw"){
  389. $("#pingbikw").html("");
  390. for(let b in allwconfig[i]){
  391. $("#pingbikw").append('<label class="layui-form-label" style=" width: 150px;">已经屏蔽的关键词'+(Number(b)+1)+'</label> <div class="layui-input-block" > <input type="text" name="title" data_zt="0" lay-verify="title" value ="'+allwconfig[i][b]+'" autocomplete="off" class="layui-input" readonly="readonly" style="width: 300px;display: inline-block;margin-left: 50px;color: #898989;"> <button type="button" class="layui-btn pingbikw" style="display: inline-block;margin-left: 50px;">删除</button></div>' );
  392. }
  393. }
  394. for(let k in allwconfig[i]){
  395. //测试
  396. if (k=="baidueyecolor"){
  397. $("#"+k).val(allwconfig[i][k]);
  398. }
  399. if (k!="baidueyecolor"){
  400. if (allwconfig[i][k]==true){
  401. $("#"+k).children("input:eq(0)").prop( "checked", true );
  402. $("#"+k).children("div:eq(0)").attr("class","layui-unselect layui-form-switch layui-form-onswitch");
  403. $("#"+k).find("em").html("ON");
  404. }else{
  405. $("#"+k).children("input:eq(0)").prop( "checked", false );
  406. $("#"+k).children("div:eq(0)").attr("class","layui-unselect layui-form-switch");
  407. $("#"+k).find("em").html("OFF");
  408. }
  409. }
  410. }
  411. }
  412. }
  413. }
  414. }
  415. $(document).ready(function(){
  416. configjc();
  417. sosoreset();
  418. $('body').on('click','.layui-btn.sososave',function(){
  419. configjc();
  420. //保存
  421. GM_setValue('allconfig', allconfig);
  422. sosave();
  423. });
  424. $('body').on('click','.layui-btn.layui-btn-primary.sosoreset',function(){
  425. //重置
  426. configjc();
  427. GM_setValue('allconfig', allconfig);
  428. sosoreset();
  429. alert("已还原默认设置");
  430. });
  431. })
  432. var zkddomain = document.domain;
  433. var zkdurldomain = location.href;
  434. var zhihudl=0;
  435. var kgmmm=0;
  436. if (GM_getValue('allconfig').whiteurl){
  437. if (GM_getValue('allconfig').whiteurl.length>0 ){
  438. for(let b in GM_getValue('allconfig').whiteurl){
  439. if (zkddomain.indexOf(GM_getValue('allconfig').whiteurl[b]) >=0){
  440. kgmmm=1;
  441. }
  442. }
  443. if (kgmmm==1){
  444. return;
  445. }
  446. }
  447. }
  448. if(zkddomain.indexOf(".op.gg") > 0 ) {
  449. $(".vm-placement").remove();
  450. $(".vm-placemmment").remove();
  451. }
  452. if(zkddomain.indexOf(".ctyun.cn") >= 0 || zkddomain.indexOf("cloud.189.cn") >= 0) {
  453. return;
  454. }
  455. var goingnuma=1;
  456. var goingnumb=10;
  457. $(document).ready(function() {
  458. var ref = setInterval(function() {
  459. kgpingbisgo();
  460. }, 1000);
  461. setTimeout(function() {
  462. clearInterval(ref);
  463. }, 2000);
  464. var t1 = setInterval(function(){
  465. zkdurldomain = location.href;
  466. delgoogle();
  467. delzhihu();
  468. delbili();
  469. deldouban();
  470. bing();
  471. delbaidu();
  472. delother();
  473. del360();
  474. goingnuma++;
  475. if (goingnuma>=goingnumb ){
  476. clearInterval(t1);
  477. }
  478. },1000);
  479. });
  480. if (window.top == window.self){
  481. if(zkdurldomain.indexOf("twitter.com") >= 0 || location.href.indexOf("youtube.com/watch?") >= 0 ) {
  482. $('body').on('click','#gogoxvideoa',function(){
  483. GM_setValue('gogoxvideodown', $(this).attr('data-url'));
  484. window.open("https://www.getfvid.com/zh/twitter");
  485. })
  486. $('body').on('click','#gogoxvideob',function(){
  487. GM_setValue('gogoxvideodown', $(this).attr('data-url'));
  488. window.open("https://9convert.com");
  489. })
  490. $('body').on('click','#gogoxvideoc',function(){
  491. GM_setValue('gogoxvideodown', $(this).attr('data-url'));
  492. window.open("https://www.y2mate.com/download-youtube");
  493. })
  494. $('body').on('click','#gogoxvideod',function(){
  495. GM_setValue('gogoxvideodown', $(this).attr('data-url'));
  496. window.open("https://zh.savefrom.net");
  497. })
  498. }
  499. }
  500. let tab_bd_tabcss = `#wrapper #content_left > div a{position:relative;text-decoration:none;}#wrapper #content_left > div a:before{content:"";position:absolute;width:0;left:0;bottom:-2px;border-bottom:solid 2px;-webkit-transition:width .38s ease-in-out;transition:width .38s ease-in-out;}#wrapper #content_left > div a:hover{color:#3476d2;}#wrapper #content_left > div a:hover:before{width:100%;}#wrapper #content_left >.c-container{padding:5px 20px 5px 20px;}#wrapper #content_left >.c-container:hover{border-radius:10px;box-shadow:0 6px 20px 0 rgb(0 0 0 / 30%);}`;
  501. let tab_bing_tabcss = `#b_r###lts>.b_algo{padding: 12px 30px 0;}.b_algo a{position:relative;text-decoration:none;}.b_algo a:before{text-decoration:none;content:"";position:absolute;width:0;left:0;bottom:-2px;border-bottom:solid 2px;-webkit-transition:width .38s ease-in-out;transition:width .38s ease-in-out;}.b_algo a:hover{text-decoration:none;color:#3476d2;}.b_algo a:hover:before{width:100%;}li.b_algo{padding:5px 20px 5px 20px;}li.b_algo:hover{border-radius:10px;box-shadow:0 6px 20px 0 rgb(0 0 0 / 30%);}`;
  502. let tab_google_tabcss = `div.g{padding:5px 20px 5px 20px;}div.g:hover{border-radius:10px;box-shadow:0 6px 20px 0 rgb(0 0 0 / 30%);}`;
  503. if (GM_getValue('allconfig').baidu.baiducss==true){
  504. if(zkdurldomain.indexOf('google.com') > 0 && zkdurldomain.indexOf('/search?') > 0 && !isMobile()){
  505. GM_addStyle(tab_google_tabcss);
  506. }
  507. if ((zkdurldomain.indexOf('/s?word') > 0 || zkdurldomain.indexOf('&wd=') > 0 || zkdurldomain.indexOf('?wd=') > 0 || zkdurldomain.indexOf('&word=') > 0) && zkdurldomain.indexOf('baidu.com') > 0 && zkdurldomain.indexOf('&rtt=') < 0 && !isMobile()){
  508. GM_addStyle(tab_bd_tabcss);
  509. }
  510. if(zkdurldomain.indexOf('bing.com/search?') > 0 && zkdurldomain.indexOf('q=') > 0 && !isMobile()){
  511. GM_addStyle(tab_bing_tabcss);
  512. }
  513. }
  514. function kgpingbisgo() {
  515. var kgpingbiswhitezt=true;
  516. var kgpingbiswhiteurl = [
  517. "recaptcha.google",
  518. "captcha.qq.com",
  519. "alicdn.com",
  520. "aliyun.com",
  521. "taobao.com",
  522. "mall.com",
  523. "weibo.com",
  524. ".le.com",
  525. "iqiyi.com",
  526. "tudou.com",
  527. "qq.com",
  528. "douyin.com",
  529. "javascript:",
  530. "youku.com",
  531. "sohu.com",
  532. "pptv.com",
  533. "twitter.com",
  534. "facebook.com",
  535. "instagram.com",
  536. "tiktok.com",
  537. "imdb.com",
  538. "vk.com",
  539. "mtv.com",
  540. "56.com",
  541. "ku6.com",
  542. "cntv.cn",
  543. "####.cn",
  544. "mgtv.com",
  545. "yinyuetai.com",
  546. "wasu.cn",
  547. "163.com",
  548. "1905.com",
  549. "xunlei.com",
  550. "funshion.com",
  551. "youhui",
  552. "pornhub.com",
  553. "youtube.com",
  554. "bilibili.com",
  555. "mama.com",
  556. "zhihu.com",
  557. "baidu.com"];
  558. var whiteHosts = [
  559. 'suning.com',
  560. 'vip.com',
  561. 'jd.com',
  562. 'taobao.com',
  563. 'mall.com'
  564. ];
  565. if (whiteHosts.some(function (host) {
  566. return location.hostname.indexOf(host) > -1;
  567. })) {
  568. kgpingbiswhitezt = false;
  569. }
  570. var inputList = $("input").filter(":visible");;
  571. inputList.each(function() {
  572. var $this = $(this);
  573. var placeholder = $this.attr('placeholder') || '';
  574. if ($this.attr('name') === 'username' ||
  575. $this.is('[type="password"]') ||
  576. $this.attr('name') === 'password' ||
  577. $this.attr('type') === 'email' ||
  578. $this.attr('type') === 'phone' ||
  579. $this.attr('name') === 'email' ||
  580. $this.attr('name') === 'code' ||
  581. $this.attr('name') === 'phone' ||
  582. placeholder.indexOf('手机') !== -1 ||
  583. placeholder.indexOf('邮箱') !== -1 ||
  584. placeholder.indexOf('账号') !== -1 ||
  585. placeholder.indexOf('密码') !== -1 ||
  586. placeholder.indexOf('注册') !== -1) {
  587. kgpingbiswhitezt = false;
  588. return false;
  589. }
  590. });
  591. //说明:此处是为了匹配某些网站登陆时插件错误屏蔽登陆验证的页面需要,防止不能正常登陆。并无没有收集用户的任何信息
  592. var classNames = ['data-down-ui', 'data-down-ui1', 'data-down-ui2'];
  593. for (var i = 0; i < classNames.length; i++) {
  594. var className = classNames[i];
  595. if (document.getElementsByClassName(className).length > 0) {
  596. kgpingbiswhitezt = false;
  597. return;
  598. }
  599. }
  600. if (GM_getValue('allconfig').whiteurl){
  601. if (GM_getValue('allconfig').whiteurl.length>0 ){
  602. for(let b in GM_getValue('allconfig').whiteurl){
  603. if (zkddomain.indexOf(GM_getValue('allconfig').whiteurl[b]) >=0){
  604. kgpingbiswhitezt=false;
  605. }
  606. }
  607. }
  608. }
  609. if (GM_getValue('allconfig').baidu.kgpingbiiframe==true && kgpingbiswhitezt){
  610. let iframehost=window.location.host;
  611. $("iframe").each(function(index){
  612. var iframeon=0;
  613. if ($(this).attr("src")){
  614. let iframesrc=$(this).attr("src");
  615. for(let i = 0; i < kgpingbiswhiteurl.length; i++) {
  616. if (iframesrc.indexOf(kgpingbiswhiteurl[i])>=0){
  617. kgpingbiswhitezt=false;
  618. }
  619. }
  620. if ($(this).attr("src").indexOf("http")==0 && window.location.href.indexOf("tool")<0 && window.location.href.indexOf("video")<0 && $(this).attr("src").indexOf("video")<0 && $(this).attr("src").indexOf("?url=")<0 && $(this).attr("src").indexOf(iframehost)<0 && kgpingbiswhitezt){
  621. $(this).remove();
  622. iframeon=1;
  623. }
  624. }
  625. if ( iframeon==0){
  626. try {
  627. var inputElements = $(this).contents();
  628. try {
  629. var inputLength = inputElements.find('input').length;
  630. var textareaLength = inputElements.find('textarea').length;
  631. var imgLength = inputElements.find('img').length;
  632. var videoLength = inputElements.find('video').length;
  633. var bodyText = inputElements.find('body').first().text();
  634. var bodyTextLength =bodyText.length;
  635. if (inputLength > 0 || textareaLength > 0 || imgLength==0 || videoLength>0 || bodyTextLength > 200) {
  636. kgpingbiswhitezt = false;
  637. }
  638. if (kgpingbiswhitezt){
  639. var imgElements = inputElements.find('img');
  640. var maxImgElement = null;
  641. var maxImgArea = 0;
  642. imgElements.each(function() {
  643. var imgWidth = $(this).width();
  644. var imgHeight = $(this).height();
  645. var imgArea = imgWidth * imgHeight;
  646. if (imgArea > maxImgArea) {
  647. maxImgArea = imgArea;
  648. maxImgElement = this;
  649. }
  650. });
  651. var iframeWidth = $(this).width();
  652. var iframeHeight = $(this).height();
  653. var iframeArea = iframeWidth * iframeHeight;
  654. var imgWidth = $(maxImgElement).width();
  655. var imgHeight = $(maxImgElement).height();
  656. var imgArea = imgWidth * imgHeight;
  657. if (imgArea / iframeArea > 0.5) {
  658. $(this).remove();
  659. kgpingbiswhitezt = false;
  660. }
  661. }
  662. if (kgpingbiswhitezt){
  663. $(this).remove();
  664. }
  665. } catch (error) {
  666. console.log('读取 iframe 失败');
  667. }
  668. } catch (error) {
  669. console.log('第', index + 1, '个非同源的 iframe');
  670. }
  671. }
  672. })
  673. }
  674. if (GM_getValue('allconfig').baidu.kgpingbis==true && kgpingbiswhitezt){
  675. function getImageSize(element) {
  676. if (element.attr('kxtool') ) {
  677. return false;
  678. }
  679. if (element.prop('tagName') === 'HTML' || element.prop('tagName') === 'HEADER' || element.prop('tagName') === 'BODY' || element.prop('tagName') === 'MAIN') {
  680. return false;
  681. }
  682. var childElements = element.find("*");
  683. for (var i = 0; i < childElements.length; i++) {
  684. var childTag = $(childElements[i]).prop('tagName');
  685. if (childTag === 'HTML' || childTag === 'HEADER' || childTag === 'BODY' || childTag=== 'MAIN') {
  686. return false;
  687. }
  688. }
  689. var $elem = element;
  690. var targets = [];
  691. if ($elem.prop('tagName') === 'IMG') {
  692. targets.push($elem);
  693. }
  694. var $imgs = $elem.find('img');
  695. if ($imgs.length > 0) {
  696. var maxWidth = 0;
  697. $imgs.each(function() {
  698. var width = $(this).prop('naturalWidth') || $(this).width();
  699. if (width > maxWidth) {
  700. maxWidth = width;
  701. targets.push($(this));
  702. }
  703. });
  704. }
  705. var $bgImgs = $elem.find('*').filter(function() {
  706. var style = getComputedStyle(this);
  707. return (
  708. style['background-image'] !== 'none' && style['background-image'] !== ''
  709. ) || (
  710. style['background'] && style['background'].includes('url(')
  711. );
  712. });
  713. if ($bgImgs.length > 0) {
  714. $bgImgs.each(function() {
  715. targets.push($(this));
  716. });
  717. }
  718. if (targets.length > 0) {
  719. var maxTarget = targets.reduce(function(max, target) {
  720. var width = target.width();
  721. return width > max.width ? {target: target, width: width} : max;
  722. }, {target: null, width: 0});
  723. if (maxTarget.target) {
  724. return {
  725. width: maxTarget.width,
  726. tag: maxTarget.target.prop('tagName'),
  727. url: maxTarget.target.attr('src'),
  728. rl: maxTarget.target.attr('style'),
  729. height: maxTarget.target.height()
  730. };
  731. }
  732. }
  733. return false;
  734. }
  735. var windowHeight = $(window).height();
  736. var windowwidth= $(window).width() *0.8;
  737. var removeHeight=200;
  738. if (isMobile()){
  739. removeHeight=150;
  740. windowwidth= $(window).width() *0.9;
  741. }
  742. var datag=true;
  743. if (window.location.href.indexOf('dadi') >0 || window.location.href.indexOf('teng') >0 ) {
  744. datag=false;
  745. }
  746. if (datag){
  747. $('img').filter(function() {
  748. var $this = $(this);
  749. var offsetTop = $this.offset().top;
  750. return offsetTop >= 50 && $this.parents('picture').length === 0 && $this.width() >= windowwidth && $this.height() >10 && $this.height() <= removeHeight && $this.is(':visible');
  751. }).remove();
  752. $('[style*="position: fixed"]').add('*')
  753. .filter(function() {
  754. return ($(this).css('position') === 'fixed');
  755. })
  756. .filter(function() {
  757. var classes = $(this).attr('class');
  758. return (!classes || !classes.match(/\b.*nav.*\b/));
  759. })
  760. .filter(':visible')
  761. .not('form, input')
  762. .each(function() {
  763. var $this = $(this);
  764. var hasFormOrInput = $this.find('form, input').length > 0;
  765. if (hasFormOrInput) {
  766. return;
  767. }
  768. var $imgs = $this.find('img');
  769. if ($imgs.length === 0) {
  770. return;
  771. }
  772. var $maxImg = $imgs.eq(0);
  773. var divarea = $this.width() * $this.height();
  774. let getSize = getImageSize($this);
  775. if (getSize) {
  776. var IMGarea = getSize.width * getSize.height;
  777. if (IMGarea >= divarea * 0.8) {
  778. $this.remove();
  779. } else {
  780. let Divthistext = /^\s*$/.test($this.text());
  781. if (Divthistext) {
  782. $this.remove();
  783. }
  784. }
  785. }
  786. });
  787. }
  788. }
  789. }
  790. function delother() {
  791. var kuaizixun= "www.360kuai.com/";
  792. var biliurl= "search.bilibili.com/";
  793. var weixinurl= "weixin.sogou.com/weixin?";
  794. var zhihuurl= "www.zhihu.com/search?";
  795. var doubanurl= "www.douban.com/search?";
  796. var doubanaurl= "search.douban.com/movie/subject_search?";
  797. var weibourl= "weibo.com/";
  798. var youurl= ".youtube.com";
  799. var twiurl= "twitter.com/";
  800. var csdn= "csdn.net";
  801. var wanweibaike= "wanweibaike.net/wiki";
  802. var yinhua= "dmh8.com";
  803. var webkemono= "kemono.party";
  804. if(zkdurldomain.indexOf("dang.com") >= 0 ){
  805. $('.fixed_s').remove();
  806. }
  807. if(zkdurldomain.indexOf(webkemono) >= 0 ){
  808. $("div[class='exo_wrapper exo_notransition']").remove();
  809. $("div[class='exo_wrapper']").remove();
  810. $("div[class='ad-container']").remove();
  811. }
  812. if(zkdurldomain.indexOf("www.jianshu.com/p") >= 0 ){
  813. $('div[style^="width: 200px; height: 400px; position: fixed; top:"]').remove();
  814. $('div[style^="display: block; padding: 0px; margin: 0px; z-index:"]').remove();
  815. $('div[style^="display: block; padding: 0px; margin: 0px; position: fixed; "]').remove();
  816. }
  817. if(zkdurldomain.indexOf("mp4") >= 0 ){
  818. $('#HMcoupletDivleft').remove();
  819. $('#HMcoupletDivright').remove();
  820. $('#hbidbox').remove();
  821. $('#HMRichBox').remove();
  822. }
  823. $("script[src*='pos.baidu.com']").remove();
  824. $("iframe[src^='https://g.163.com']").remove();
  825. $("iframe[src*='pos.baidu.com']").remove();
  826. $("iframe[src*='//googleads']").remove();
  827. $("iframe[src*='show-3.mediav.com']").remove();
  828. $("div[class*='wwads-cn wwads']").remove();
  829. $("div[data-type='GoogleRender']").remove();
  830. if(zkdurldomain.indexOf(yinhua) >= 0 ){
  831. $("#HMRichBox").remove();
  832. $("#fix_bottom_dom").remove();
  833. $("#HMCOVER_ID1").remove();
  834. $("div[style^='width:300px;height:300px;']").remove();
  835. }
  836. if(zkdurldomain.indexOf(wanweibaike) >= 0 ){
  837. $(".real-all-mask").css("position","unset");
  838. $("#page-report-modal").css("display","none");
  839. }
  840. if(zkdurldomain.indexOf(csdn) >= 0 ){
  841. if ($("span[class='hide-preCode-bt']").length>0 ){
  842. $("span[class='hide-preCode-bt']").click();
  843. }
  844. $("div[class='wwads-cn wwads-vertical']").remove();
  845. $("#blogExtensionBox").remove();
  846. $("iframe[src*='//kunpeng-sc.csdn']").remove();
  847. $("div[class='passport-login-container']").remove();
  848. $("div[id='kp_box_blog_up']").remove();
  849. $("div[id='kp_box_www_swiper']").remove();
  850. $(".ad_fullWidth").remove();
  851. $("div[class='weixin-shadowbox wap-shadowbox']").css("display","none");
  852. $("div[class='hide-article-box hide-article-pos text-center']").css("display","none");
  853. $("div[id='article_content']").css({"overflow":"auto" ,"height":"auto"});
  854. $("div[class='readall_box']").css("display","none");
  855. $("div[class='article_content']").css({"overflow":"auto" ,"height":"auto"});
  856. $('body').on('click','.hljs-button.signin,.unlogin-comment-bt,.toolbar-btn-login',function(){
  857. window.location.href="//passport.csdn.net/login";
  858. })
  859. if(zkdurldomain.indexOf('ink.csdn.net/?target=') >= 0 ){
  860. if($("a[class='loading-btn']").length>0 ){
  861. window.location.href=$("a[class='loading-btn']").attr("href");
  862. }
  863. }
  864. }
  865. if(zkdurldomain.indexOf(weibourl) >= 0 ){
  866. $("div[class='vue-recycle-scroller__item-view']").each(function(k,v){
  867. let zxcvlkw=$(this).find(".wbpro-feed-content").text();
  868. let bhnm=0;
  869. for(let b in GM_getValue('allconfig').pingbikw){
  870. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  871. $(this).remove();
  872. bhnm=1;
  873. }
  874. }
  875. if (GM_getValue('allconfig').baidu.kgweibomv==true){
  876. if ($(this).find(".wbpv-tech") && bhnm==0){
  877. if($(this).find(".wbpv-tech").attr('src') ){
  878. if ($(this).find(".wbpv-tech").attr('data_zt') ){
  879. }else{
  880. $(this).find(".wbpro-feed-content").find("div:first").find("a:last").after('<a target="_blank" href="'+$(this).find(".wbpv-tech").attr('src')+'">➦下载视频</a>');
  881. $(this).find(".wbpv-tech").attr('data_zt','0');
  882. }
  883. }
  884. }
  885. }
  886. })
  887. if (GM_getValue('allconfig').baidu.kgweibomv==true){
  888. if(zkdurldomain.indexOf(weibourl) >= 0 && zkdurldomain.indexOf("/tv/show/") >= 0 ){
  889. if($(".wbpv-tech").length>0 ){
  890. if($(".wbpv-tech").attr('src') ){
  891. if ($(".wbpv-tech").attr('data_zt') ){
  892. }else{
  893. $(".wbpv-tech").attr('data_zt','0');
  894. $("div[class='woo-box-flex woo-box-alignCenter']").prepend('<div class="woo-box-flex woo-box-alignCenter Detail_opt_2w8oi"><i class="star-font star-font--retweet"></i><a class="star-f12" style="color:#939393" href="'+$(".wbpv-tech").attr("src")+'">下载</a></div>');
  895. }
  896. }
  897. }
  898. }
  899. }
  900. }
  901. if(zkdurldomain.indexOf(biliurl) >= 0 && GM_getValue('allconfig').baidu.kgbiliad==true){
  902. $(".video-list-item > .bili-video-card").each(function(k,v){
  903. let zxcvlkw=$(this).text();
  904. for(let b in GM_getValue('allconfig').pingbikw){
  905. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  906. $(this).hide();
  907. }
  908. }
  909. })
  910. }
  911. if(zkdurldomain.indexOf('bilibili.com/video/') >= 0 && GM_getValue('allconfig').baidu.kgbiliad==true){
  912. $("div[class='comment-list ']").find(".list-item.reply-wrap ").each(function(k,v){
  913. let zxcvlkw=$(this).find("p[class='text']").text().replace(/\ +/g,"");
  914. //主题
  915. for(let b in GM_getValue('allconfig').pingbikw){
  916. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  917. $(this).remove();
  918. }
  919. }
  920. })
  921. $("div[class='user']").each(function(h,j){
  922. let zxcvlkw=$(this).find("span[class='text-con']").text().replace(/\ +/g,"");
  923. // console.log(zxcvlkw);
  924. //评论
  925. for(let b in GM_getValue('allconfig').pingbikw){
  926. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  927. $(this).remove();
  928. }
  929. }
  930. })
  931. }
  932. if(zkdurldomain.indexOf('zhihu.com/question') >= 0 && GM_getValue('allconfig').baidu.kgzhihuad==true){
  933. $("div[class='css-14nvvry']").each(function(k,v){
  934. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  935. for(let b in GM_getValue('allconfig').pingbikw){
  936. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  937. //$(this).remove();
  938. $(this).html('<div class="CommentContent css-1ygdre8">触发自定义关键词,已屏蔽</div>');
  939. }
  940. }
  941. })
  942. $("div[role='list']").find(".List-item").each(function(k,v){
  943. if ($(this).attr("zkdx")){}else{
  944. $(this).attr("zkdx","1");
  945. let zxcvlkw=$(this).find("div[class='RichContent-inner']").text().replace(/\ +/g,"");
  946. let zhdazhu=$(this).find("span[class='UserLink AuthorInfo-name']").text();
  947. zxcvlkw=zxcvlkw+zhdazhu;
  948. //问题回答
  949. for(let b in GM_getValue('allconfig').pingbikw){
  950. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  951. $(this).remove();
  952. }
  953. }
  954. if ( $(this).find("li").length>0){
  955. //问题评论
  956. $(this).find("li").each(function(h,j){
  957. let zxcvlkw=$(this).find("div[class='CommentRichText CommentItemV2-content']").text().replace(/\ +/g,"");
  958. let zhdazhu=$(this).find("a[class='UserLink-link']").text();
  959. zxcvlkw=zxcvlkw+zhdazhu;
  960. for(let b in GM_getValue('allconfig').pingbikw){
  961. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  962. $(this).remove();
  963. }
  964. }
  965. })
  966. }
  967. }
  968. })
  969. }
  970. if(zkdurldomain.indexOf(doubanaurl) >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
  971. $("div[class='root']").find(".item-root").each(function(k,v){
  972. let zxcvlkw=$(this).find(".title").text();
  973. // console.log(zxcvlkw);
  974. for(let b in GM_getValue('allconfig').pingbikw){
  975. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  976. $(this).remove();
  977. }
  978. }
  979. })
  980. }
  981. if(zkdurldomain.indexOf(doubanurl) >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
  982. $("div[class='r###lt-list']").find(".r###lt").each(function(k,v){
  983. let zxcvlkw=$(this).find("h3").text();
  984. for(let b in GM_getValue('allconfig').pingbikw){
  985. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  986. $(this).remove();
  987. }
  988. }
  989. })
  990. }
  991. if(zkdurldomain.indexOf('douban.com/group/') >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
  992. $("table[class='olt']").find("tr").each(function(k,v){
  993. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  994. //主题
  995. //console.log(zxcvlkw);
  996. for(let b in GM_getValue('allconfig').pingbikw){
  997. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  998. $(this).remove();
  999. }
  1000. }
  1001. })
  1002. $("ul[class='topic-reply']").find("li").each(function(k,v){
  1003. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  1004. //评论
  1005. for(let b in GM_getValue('allconfig').pingbikw){
  1006. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1007. $(this).remove();
  1008. }
  1009. }
  1010. })
  1011. }
  1012. //主页推荐
  1013. if(zkdurldomain.indexOf(youurl) >= 0 && GM_getValue('allconfig').baidu.kgyouad==true){
  1014. $("ytd-rich-item-renderer[class='style-scope ytd-rich-grid-row']").each(function(k,v){
  1015. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  1016. for(let b in GM_getValue('allconfig').pingbikw){
  1017. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1018. $(this).remove();
  1019. }
  1020. }
  1021. })
  1022. //搜索结果
  1023. $("ytd-video-renderer[class='style-scope ytd-item-section-renderer']").each(function(k,v){
  1024. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  1025. for(let b in GM_getValue('allconfig').pingbikw){
  1026. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1027. $(this).remove();
  1028. }
  1029. }
  1030. })
  1031. //评论
  1032. $("ytd-comment-thread-renderer[class='style-scope ytd-item-section-renderer']").each(function(h,j){
  1033. let zxcvlkw=$(this).text().replace(/\ +/g,"");
  1034. for(let b in GM_getValue('allconfig').pingbikw){
  1035. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1036. $(this).remove();
  1037. }
  1038. }
  1039. })
  1040. }
  1041. if(zkdurldomain.indexOf(zhihuurl) >= 0 && GM_getValue('allconfig').baidu.kgzhihuad==true){
  1042. $("div[class='List']").find(".Card.SearchR###lt-Card").each(function(k,v){
  1043. let zxcvlkw=$(this).find(".Highlight").text();
  1044. for(let b in GM_getValue('allconfig').pingbikw){
  1045. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1046. $(this).remove();
  1047. }
  1048. }
  1049. })
  1050. }
  1051. if(zkdurldomain.indexOf(weixinurl) >= 0 && GM_getValue('allconfig').baidu.kgweixinad==true){
  1052. $("ul > li").each(function(k,v){
  1053. let zxcvlkw=$(this).text();
  1054. for(let b in GM_getValue('allconfig').pingbikw){
  1055. if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1056. $(this).remove();
  1057. }
  1058. }
  1059. })
  1060. }
  1061. if(zkdurldomain.indexOf(kuaizixun) > 0 ){
  1062. $("article[data-ggclick='ad']").remove();
  1063. $("#as_shop_gg").remove();
  1064. $("div[class='content clearfix']").not("[data-primitive-rawurl^='http']").remove();
  1065. $("div[class='position--fixed--right--bottom']").remove();
  1066. $(".unslider-ad").remove();
  1067. $("li[class*='recommend__item--gg--video']").remove();
  1068. $("div[class*='lawnfooter-image__panel']").remove();
  1069. $("div[class*='open-screen__ad']").remove();
  1070. $("iframe[src*='mediav.com']").remove();
  1071. $("div[class='card default detail--v3 default clearfix img--3']").hide();
  1072. $("div[class='card default detail--v3 default clearfix img--0']").hide();
  1073. $("div[class='kzx__showcase kzx__showcase--normal']").hide();
  1074. $("div[class='right_aside_wrapper float--left']").hide();
  1075. $("div[class='position--fixed--right--bottom ']").hide();
  1076. $("div[class='content__block clearfix']").hide();
  1077. $("li[class='aside__item float--left recommend__item recommend__item--gg gg-subscript']").hide();
  1078. $("div[class='bkg-block']").hide();
  1079. $("div[class='recommend__item--gg']").hide();
  1080. $("a[class='article__content__textgg']").hide();
  1081. $("div[class='g4 ']").hide();
  1082. $(".recommend-article__wrapper").hide();
  1083. $("div[data-ggsrc]").remove();
  1084. }
  1085. }
  1086. function delgoogle() {
  1087. if(zkdurldomain.indexOf('google.com') > 0 && zkdurldomain.indexOf('/search?') > 0){
  1088. if ( $('#bingconfig_btn').length>0){
  1089. } else{
  1090. // $('#hdtb-tls').before('<a id="bingconfig_btn" class="gb_Sc" style="border: 1px solid transparent; text-align: center; border-radius: 2px; line-height: 19px; cursor: pointer; margin-left: -1px; padding: 4px 11px; margin-right: -11px;" href="'+configm+'" >设置</a>');
  1091. // 谷歌搜索页面的搜索控制按钮,注释后不会显示测按钮
  1092. }
  1093. $($("div[id='rso']")).find("div[lang*='zh-']").each(function(zxb,hfd){
  1094. let urlxzv="";
  1095. let urlxzt="";
  1096. urlxzv=$(hfd).find("a").attr("href");
  1097. urlxzt=$(hfd).text();
  1098. let pingbijc=0;
  1099. if (urlxzv){
  1100. if (urlxzv.indexOf('/url?')==0 && urlxzv.indexOf('&url=')>0 ){
  1101. let sdcurl = urlxzv.match(/\&url\=(\S*)\&/);
  1102. if (sdcurl){
  1103. urlxzv = sdcurl[1];
  1104. urlxzv=decodeURIComponent(urlxzv);
  1105. $(hfd).find("a").attr("href",urlxzv);
  1106. }
  1107. }
  1108. if (GM_getValue('allconfig').baidu.kggooglead==true){
  1109. $("a[href*='http']").each(function() {
  1110. if ( $(this).attr("zlogo")){}else{
  1111. if ( $(this).find("h3").length>0){
  1112. let logurl=$(this).attr("href");
  1113. let urldomain = logurl.split("/");
  1114. let urldofavicon = "";
  1115. if( urldomain[2] ) {
  1116. urldofavicon=faviconurl+urldomain[2]+"?size=32";
  1117. }
  1118. $(this).attr("zlogo","1");
  1119. $(this).find("h3").prepend('<div style="border-radius: 1%;display: inline-block; max-width:24px; position: relative; top: 3px;background: rgba(0, 0, 0, 0);margin-right: 8px;"><img style="max-width:24px;" src="'+urldofavicon+'" ></div>');
  1120. }
  1121. }
  1122. })
  1123. if (GM_getValue('allconfig').baidu.baidulianjie==true){
  1124. for(let b in GM_getValue('allconfig').pingbiurl){
  1125. if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1126. $(hfd).remove();
  1127. pingbijc=1;
  1128. }
  1129. }
  1130. }
  1131. if ( pingbijc==0 ){
  1132. for(let b in GM_getValue('allconfig').pingbikw){
  1133. if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1134. $(hfd).remove();
  1135. }
  1136. }
  1137. }
  1138. }
  1139. }
  1140. });
  1141. }
  1142. if (GM_getValue('allconfig').baidu.kggoogleed==true){
  1143. $(".adsbygoogle").remove();
  1144. //$("#taw").remove();
  1145. $("#bottomads").remove();
  1146. $("script[src*='adsbygoogle.js']").remove();
  1147. $("script[src*='g.doubleclick.net']").remove();
  1148. $("div[id*='google_ads']").remove();
  1149. $("div[data-google-query-id]").remove();
  1150. }
  1151. }
  1152. function bing() {
  1153. if(zkdurldomain.indexOf('bing.com/search?') > 0 && zkdurldomain.indexOf('q=') > 0 ){
  1154. if (GM_getValue('allconfig').baidu.kgbinged==true){
  1155. $(".b_ad").remove();
  1156. $(".b_bingoad").remove();
  1157. $(".b_algo").each(function() {
  1158. let b_algokg=0;
  1159. if ($(this).find("p")){
  1160. if ($(this).find("p").attr("class")){
  1161. b_algokg=1;
  1162. }
  1163. }
  1164. if ($(this).text().indexOf('广告') >0){
  1165. b_algokg=1;
  1166. }
  1167. let anum=$(this).find(".b_attribution").children().length;
  1168. if (anum==1 && b_algokg==1){
  1169. //$(this).hide();
  1170. }
  1171. })
  1172. }
  1173. if ( $('#bingconfig_btn').length>0){
  1174. } else{
  1175. $('#id_sc').before('<span id="bingconfig_btn" class="cbtn" style="line-height: 45px; margin-left:20px;margin-right:20px;" onclick="window.location.href=\''+configm+'\';" ><input type="button" value="控制面板"></span>');
  1176. }
  1177. if (GM_getValue('allconfig').baidu.kgbingad==true){
  1178. $($("li[class='b_algo']")).each(function(zxb,hfd){
  1179. let urlxzv="";
  1180. let urlxzt="";
  1181. urlxzv=$(hfd).find("h2").find("a").attr("href");
  1182. urlxzt=$(hfd).text();
  1183. //console.log(urlxzv)
  1184. let pingbijc=0;
  1185. if (urlxzv){
  1186. if (GM_getValue('allconfig').baidu.baidulianjie==true){
  1187. for(let b in GM_getValue('allconfig').pingbiurl){
  1188. if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1189. $(hfd).remove();
  1190. pingbijc=1;
  1191. }
  1192. }
  1193. }
  1194. }
  1195. if ( pingbijc==0 && urlxzt ){
  1196. for(let b in GM_getValue('allconfig').pingbikw){
  1197. if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1198. $(hfd).remove();
  1199. }
  1200. }
  1201. }
  1202. });
  1203. }
  1204. }
  1205. }
  1206. function del360() {
  1207. if ( zkdurldomain=='https://www.so.com/' || zkdurldomain=='https://www.so.com' ||zkdurldomain.indexOf('www.so.com/?') > 0){
  1208. if (GM_getValue('allconfig').baidu.kg360ed==true){
  1209. $("ul[class*='mh-list g-list mh-sdk-sad gclearfix']").remove();
  1210. $("div[class*='open-screen__ad']").remove();
  1211. $("#__lawnImageContainer").remove();
  1212. if($("div[id='lawnFooterCloseBtn']").length>0 ){
  1213. $("div[id='lawnFooterCloseBtn']").click();
  1214. }
  1215. if($("div[id='lawnFooterCloseBtn']").length>0 ){
  1216. $("div[id='lawnFooterCloseBtn']").click();
  1217. }
  1218. $("#res_news_flow ").find("li").each(function() {
  1219. if ($(this).find("span[class='txt']").length > 0){
  1220. if ($(this).find("span[class='txt']").text()=='广告'){
  1221. $(this).remove();
  1222. }
  1223. }
  1224. })
  1225. }
  1226. }
  1227. if (zkdurldomain.indexOf('m.so.com/s') > 0 ){
  1228. openxcd();
  1229. $("div[class^='g-card res-list']").each(function(mindex,mment) {
  1230. if ( $(this).attr("data-kwkwed")==undefined ){
  1231. if ($(this).text()){
  1232. $(this).attr("data-kwkwed","1");
  1233. let pingbici=$(this).text();
  1234. if (GM_getValue('allconfig').baidu.kg360ad==true){
  1235. for(let b in GM_getValue('allconfig').pingbikw){
  1236. if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1237. $(mment).remove();
  1238. }
  1239. }
  1240. }
  1241. }
  1242. }
  1243. if ( $(this).attr("data-kwurled")==undefined ){
  1244. $(this).attr("data-kwurled","1");
  1245. if ($(this).find("a").attr('href')){
  1246. let zogourl=decodeURIComponent($(this).find("a").attr('href').replace(/https:\/\/m.so.com\/jump\?u=/g,''));
  1247. for(let b in GM_getValue('allconfig').pingbiurl){
  1248. if (zogourl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1249. $(mment).remove();
  1250. }
  1251. }
  1252. $(this).find("a").attr("href",zogourl);
  1253. }
  1254. }
  1255. })
  1256. }
  1257. if (GM_getValue('allconfig').baidu.kg360ed==true){
  1258. if (zkdurldomain.indexOf('news.so.com') > 0 ){
  1259. $("li[data-from='ad']").remove();
  1260. }
  1261. if (zkdurldomain.indexOf('tv.360kan.com') > 0 ){
  1262. $("li > div[data-so-mod='list-ad']").remove();
  1263. $("li > div[data-so-c='list-ad']").remove();
  1264. }
  1265. if (zkdurldomain.indexOf('image.so.com') > 0 ){
  1266. $("li[class='cell']").each(function() {
  1267. if ($(this).find("s").length > 0){
  1268. if ($(this).find("s").text()=='广告'){
  1269. $(this).remove();
  1270. }
  1271. }
  1272. })
  1273. }
  1274. if (zkdurldomain.indexOf('ly.so.com') > 0 ){
  1275. $(".f-list-wrap").find("li").each(function() {
  1276. if ($(this).find("i").length > 0){
  1277. $(this).remove();
  1278. }
  1279. })
  1280. }
  1281. if (zkdurldomain.indexOf('baike.so.com') > 0 ){
  1282. $(".right-ad-concern").remove();
  1283. $("#J-mod-right-ad-interest").remove();
  1284. $("#J-mod-right-recommend").remove();
  1285. $(".doc-widget-rightbanner").remove();
  1286. $("div[class='box-bd cl js-plus-body']").remove();
  1287. $("div[class='boxwrap").remove();
  1288. }
  1289. if (zkdurldomain.indexOf('wenku.so.com') > 0 ){
  1290. $(".rt-side").remove();
  1291. $(".side-mod").remove();
  1292. }
  1293. if (zkdurldomain.indexOf('fanyi.so.com') > 0 ){
  1294. $("#card_container").remove();
  1295. }
  1296. if (zkdurldomain.indexOf('m.so.com') > 0 ){
  1297. $("div[class^='g-ad-card']").remove();
  1298. $("div[class='tg-wrap").remove();
  1299. $("div[data-so-biz-type]").remove();
  1300. }
  1301. if (zkdurldomain.indexOf('m.news.so.com') > 0 ){
  1302. $(".g-card.res-list.has-summary").remove();
  1303. }
  1304. if (zkdurldomain.indexOf('m.image.so.com') > 0 ){
  1305. $("li").each(function() {
  1306. if ($(this).find("div[class='li-txt li-cm li-cm--default']").length > 0){
  1307. $(this).remove();
  1308. }
  1309. })
  1310. }
  1311. if (zkdurldomain.indexOf('m.video.360kan.com/') > 0 ){
  1312. $("li[data-so-mod='ad']").remove();
  1313. $("li[class='recommend-item recommend-item__cm recommend-item__no-img']").remove();
  1314. }
  1315. if (zkdurldomain.indexOf('360kan.com') > 0 ){
  1316. $("li[class='v-list-item']:empty").remove();
  1317. $("li[data-so-mod='ad']").remove();
  1318. $("a[class='link js-ad-curl']").remove();
  1319. $("div[class*='info-flow__ad']").remove();
  1320. $("div[class*='open-screen__ad']").remove();
  1321. }
  1322. if (zkdurldomain.indexOf('wenda.so.com') > 0 ){
  1323. $("li[class='left-rec-list js-left-flow-busi']").remove();
  1324. $("#attention").remove();
  1325. $("div[class='mod-detail-normal pt25 hide js-mod-flow ']").remove();
  1326. $("article[class='card']").remove();
  1327. $("article[class='card-bor']").remove();
  1328. $("div[class='busi-article js-busi-article']").remove();
  1329. $("div[class='js-relate-list']").remove();
  1330. $("ul[class='relate-list']").remove();
  1331. $("section[class='g-card recflow-list js-recflow-list']").remove();
  1332. $("#js-sd-list").remove();
  1333. }
  1334. }
  1335. if (zkddomain.indexOf('so.com') > 0 && zkdurldomain.indexOf('so.com/s') > 0){
  1336. if ( $("div[class='close").length > 0){
  1337. $("div[class='close").click();
  1338. }
  1339. $("ul[class='mh-list g-list mh-sdk-sad gclearfix']").remove();
  1340. $('.title.home-nav').attr('href',configm);
  1341. $('.title.home-nav').text('控制面板');
  1342. $("li[class='m-spread-middle e-buss").remove();
  1343. $("#mohe-360pic_ext--normal").remove();
  1344. $($("li[class='res-list']")).each(function(zx,hfd){
  1345. let urlxzv="";
  1346. let urlxzt="";
  1347. if ($(hfd).children("h3").children("a").attr("data-mdurl")){
  1348. urlxzv=$(hfd).children("h3").children("a").attr("data-mdurl");
  1349. }else{
  1350. urlxzv=$(hfd).children("h3").children("a").attr("href");
  1351. }
  1352. urlxzt=$(hfd).text();
  1353. //console.log(urlxzv)
  1354. let pingbijc=0;
  1355. if (urlxzv){
  1356. if (GM_getValue('allconfig').baidu.kg360ad==true){
  1357. if (GM_getValue('allconfig').baidu.baidulianjie==true){
  1358. for(let b in GM_getValue('allconfig').pingbiurl){
  1359. if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1360. $(hfd).remove();
  1361. pingbijc=1;
  1362. }
  1363. }
  1364. }
  1365. if ( pingbijc==0){
  1366. for(let b in GM_getValue('allconfig').pingbikw){
  1367. if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1368. $(hfd).remove();
  1369. }
  1370. }
  1371. }
  1372. }
  1373. }
  1374. });
  1375. if (GM_getValue('allconfig').baidu.kg360ed==true){
  1376. $("#e_idea_pp").remove();
  1377. // $("#side").remove();
  1378. $("#right_show_top").remove();
  1379. $("#right_show").remove();
  1380. $("#so_kw-ad").remove();
  1381. $("#lm-rightbottom").remove();
  1382. $("#res-mediav-right").remove();
  1383. $(".res-mediav-right").remove();
  1384. $("#mohe-360pic_sad--normal").remove();
  1385. $("#e_map_idea").remove();
  1386. $("#e_idea_pp_vip_bottom").remove();
  1387. }
  1388. }
  1389. if (GM_getValue('allconfig').baidu.kg360ed==true){
  1390. if(zkddomain.indexOf('so.com') > 0 ){
  1391. $(".aside").remove();
  1392. $("#js-bussiness-bot-list").remove();
  1393. $("#js-mod-fixed-inn").remove();
  1394. $("#e_idea_wenda_leftBox").remove();
  1395. }
  1396. if(zkddomain.indexOf('360kan.com') > 0 ){
  1397. $("li[data-clicklog]").remove();
  1398. }
  1399. }
  1400. }
  1401. function openxcd() {
  1402. if (GM_getValue('allconfig').baidu.baidumenu==true && isMobile() ){
  1403. if($(".zxbcopenxcd").length==0 ){
  1404. $('body').append('<div class="zxbcopenxcd" style="position: fixed;top: 85%; right: 10%; width: 30px; z-index: 999999;"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA+VemSAAAACXBIWXMAAA7EAAAOxAGVKw4bAAARgklEQVR42u3dbYwd1X3H8S9Xq9XKshBaXGSsFdq6hjgOTxKW4y5GparqUNsBYoggL5o6beiDmkACGALEr1wgQEhCk6oPpC1NXmRRwAFiXOKqLRWOixwjUSAOAdddIQusyqwia2WtVlurL/5zd++u7947c+/M/M+Z+X2kkR/kvfO/M+fneTrnzDnj4+NI8FYCo8myEjgfWNGyDAPLgcGWZSj5FWAGmE5+bS5TwCRwsmX5EDgBTCTLCe8vLp0NeBcgc5YDlybLFcAa5kM71OdnD/X4GdPMh/ko8F/AW8ky5b3BRAH2sgzYAGwCrgIuB1Z7F9XGELA2WRY7BrwBvAYcAA4Bp70LrhsFuBwrgGuBa4Ax4Eri3/ark+X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VXVVa0ShOsn80RlgGbARC/NVwOXAau8iMzoGvAG8hoX2VTSBQukUYB+ngX9LlqblwKVYmC8D1gCjyTLkVOc01ud4Ahso8CYW2rfQTbsgKMDhmGL+tHuxlcyHeSVwPnZa3lyGsf8ABluWoeRXsJtt08mvzWUKu7F0smX5EDjBfGhPeG8U6ez/AUERP4sz2O4fAAAAAElFTkSuQmCC" style="width: 30px;" > </div>');
  1405. }
  1406. setTimeout(function(){
  1407. $(".zxbcopenxcd").hide();
  1408. }, 2500);
  1409. }
  1410. if (GM_getValue('allconfig').baidu.baidueye==true){
  1411. $("html body #page-bd article").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
  1412. $("#head,#foot,.se-head-tablink,#relativewords,#page-hd,#page,#rs,#help,.foot-inner").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
  1413. $("div[class='res-list g-mohe g-card g-block']").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
  1414. }
  1415. }
  1416. $('body').on('click','.zxbcopenxcd',function(){
  1417. GM_openInTab(configm, {active: !0});
  1418. })
  1419. function delbaidu() {
  1420. if(zkdurldomain.indexOf("baidu.com/") > 0 ) {
  1421. if ( $("span[class='s-menu-item s-menu-mine']").length > 0 && $("span[class='s-menu-item current']").length > 0 && $("span[class='s-menu-item s-menu-mine']").attr('current') ==undefined ){
  1422. $("span[class='s-menu-item s-menu-mine']").attr('current',1);
  1423. $("span[class='s-menu-item s-menu-mine']").click();
  1424. }
  1425. //移动端
  1426. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1427. var xcbdjc=0;
  1428. if ((zkdurldomain.indexOf('/s?word') > 0 || zkdurldomain.indexOf('&wd=') > 0 || zkdurldomain.indexOf('?wd=') > 0 || zkdurldomain.indexOf('&word=') > 0) && zkdurldomain.indexOf('&rtt=') < 0){
  1429. xcbdjc=1;
  1430. goingnumb=600;
  1431. }
  1432. if (xcbdjc==1){
  1433. if ( $("div[class='r###lt c-container new-pmd']").length > 0){
  1434. $("div[class='c-r###lt-content']").each(function(mindex,mment) {
  1435. if ( $(this).find("a[data-click*=':']").length > 0){
  1436. if ( $(this).find("a[data-click*=':']").text().indexOf("广告") >=0){
  1437. $(this).remove();
  1438. }
  1439. }
  1440. })
  1441. }
  1442. $("div[class='r###lt-op c-container xpath-log new-pmd'][tpl='sp_hot_sale']").remove();
  1443. $("div[class='r###lt-op c-container xpath-log new-pmd'][tpl='b2b_prod']").remove();
  1444. $("b[class^='cur-tab c-color-t cur-tab']").css('color','#626675;');
  1445. $("#content_right").find(".c-row").remove();
  1446. if ( $("a[class='toindex']").attr('href')!=configm){
  1447. $("a[class='toindex']").attr('href',configm);
  1448. $("a[class='toindex']").text('控制面板');
  1449. }
  1450. $("#top-ad").remove();
  1451. if (isMobile()){
  1452. openxcd();
  1453. $('body').on('click','a',function(){
  1454. if ($(this).attr("href")){
  1455. window.location.href=$(this).attr("href");
  1456. }
  1457. })
  1458. $("span[ref='open']").parent().parent().remove();
  1459. $(".ec_wise_ad").remove();
  1460. $(".ec-r###lt-inner").remove();
  1461. $(".c-r###lt.r###lt[srcid='xcx_multi']").remove();
  1462. $("div[data-module='b']").remove();
  1463. if (GM_getValue('allconfig').baidu.kgbaiduad==true){
  1464. $("div[class='c-r###lt-content']").each(function(mindex,mment) {
  1465. if ($(mment).text()){
  1466. let pingbici=$(this).text();
  1467. if ( $(mment).attr("data-kwkwed")==undefined ){
  1468. for(let b in GM_getValue('allconfig').pingbikw){
  1469. $(mment).attr("data-kwed","1");
  1470. if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1471. $(mment).remove();
  1472. }
  1473. }
  1474. }
  1475. }
  1476. if ( $(mment).attr("data-kwurled")==undefined ){
  1477. if ($(mment).find("article")){
  1478. if ($(mment).find("article").attr("rl-link-href")){
  1479. let bdzxmurl=$(mment).find("article").attr("rl-link-href");
  1480. GM_xmlhttpRequest({
  1481. method : "GET",
  1482. dataType: "json",
  1483. timeout: 1000,
  1484. url : bdzxmurl,
  1485. onreadystatechange : function (response) {
  1486. if (response.responseText){
  1487. bdzxmurl=response.responseText.match(/url=(\S*)"/)[1];
  1488. $(mment).find("article").attr("rl-link-href",bdzxmurl)
  1489. $(mment).find("a").attr("href",bdzxmurl)
  1490. $(mment).attr("data-kwurled","1");
  1491. for(let b in GM_getValue('allconfig').pingbiurl){
  1492. if (bdzxmurl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1493. $(mment).remove();
  1494. }
  1495. }
  1496. }
  1497. }
  1498. })
  1499. }
  1500. }
  1501. }
  1502. })
  1503. }
  1504. }
  1505. }
  1506. }
  1507. //
  1508. if(zkdurldomain=="https://www.baidu.com/" || zkdurldomain=="https://www.baidu.com" || zkdurldomain.indexOf('www.baidu.com/?') > 0 ) {
  1509. $("div[class='san-card'][tpl='feed-ad']").remove();
  1510. if (GM_getValue('allconfig').baidu.baiduhot==true){
  1511. $("div[class='hot-news-wrapper']").remove();
  1512. $("#s-hotsearch-wrapper").remove();
  1513. }
  1514. }
  1515. if(zkdurldomain.indexOf('baijiahao.baidu.com/s') > 0 ) {
  1516. if (GM_getValue('allconfig').baidu.baiduhot==true){
  1517. $("div[class^='index-module_topList']").remove();
  1518. }
  1519. }
  1520. if ((location.href.indexOf('.baidu.com/s') > 0 || location.href.indexOf('word=') > 0) && location.href.indexOf('&rtt=') < 0 && isMobile()){
  1521. $("div[class='c-r###lt r###lt']").each(function(index,element) {
  1522. if ($(element).attr("d-lg") ){
  1523. }else{
  1524. let durl="";
  1525. let durldata="";
  1526. if ($(element).attr("data-log")){
  1527. durldata=$(element).attr("data-log");
  1528. durldata =JSON.parse(durldata);
  1529. durl=durldata.mu;
  1530. }
  1531. $(element).attr("d-lg","1");
  1532. if ( durl.indexOf("//")>= 0 ) {
  1533. let urldomain = durl.split("/");
  1534. let urldofavicon = "";
  1535. if( urldomain[2] ) {
  1536. urldofavicon=faviconurl+urldomain[0]+"//"+urldomain[2]+"?size=32";
  1537. }
  1538. if (GM_getValue('allconfig').baidu.baidulogo==true){
  1539. if ($(element).find(".bd-icon-s").length==0){
  1540. $(element).find(".single-text").before('<div class="c-img c-img-circle c-gap-right-xsmall" style="border-radius: 1%;display: inline-block;position: relative; top: 3px;background: rgba(0, 0, 0, 0);max-width:24px;"><span class="c-img-border c-img-source-border c-img-radius-large" style="background: rgba(0, 0, 0, 0);border: 0px solid rgba(0,0,0,0);"></span><img style="max-width:18px;border-radius: 3px;" src="'+urldofavicon+'" onerror="javascript:this.parentNode.style.display = \'none\';" ></div>');
  1541. $(".single-text").css("overflow","initial");
  1542. }
  1543. }
  1544. }
  1545. }
  1546. })
  1547. }
  1548. if(zkdurldomain.indexOf('www.baidu.com/s') > 0 && zkdurldomain.indexOf('&rtt=') < 0){
  1549. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1550. $("[cmatchid]").remove();
  1551. //$("#content_right").remove();
  1552. $("#top-ad").remove();
  1553. $(".ec-pc_mat_c_banner__cc_banner_background_b").remove();//品牌广告模块
  1554. }
  1555. //右边栏
  1556. if (GM_getValue('allconfig').baidu.baiduhot==true){
  1557. $("#con-ar").remove();//热搜
  1558. }
  1559. $(".layout").remove();
  1560. $(".hint_right_middle").remove();
  1561. //$("#content_left").css("width","100%");
  1562. //$(".c-container").css("width","100%").css("padding-bottom","20px");
  1563. if (GM_getValue('allconfig').baidu.baidueye==true){
  1564. $("html body").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
  1565. $("#head,#foot,#page,#rs,#help,.foot-inner").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
  1566. }
  1567. //
  1568. $("div[id='content_left'] >div").each(function(index,element) {
  1569. let t = $(element).children(':last-child').children(':last-child').text();
  1570. if (t=="广告"){
  1571. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1572. $(element).remove();
  1573. }
  1574. }
  1575. let xzggbt =$(element).find("span");
  1576. if (xzggbt){
  1577. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1578. xzggbt.each(function(index,elnt) {
  1579. if ( $(elnt).text()=="广告"){
  1580. $(element).remove();
  1581. }
  1582. })
  1583. }
  1584. }
  1585. let xzbt =$(element).find("h3").find("a");
  1586. let durl=xzbt.attr("href");
  1587. if ($(element).attr("d-new") ){
  1588. }else{
  1589. if (durl){
  1590. if ( durl.indexOf("baidu.com/link?") >0 ){
  1591. if (durl.indexOf("eqid") < 0 ){
  1592. durl = durl + "&wd=&eqid=";
  1593. }
  1594. let durltxt=xzbt.text();
  1595. let durlhtml=durltxt;
  1596. let wurl="";
  1597. GM_xmlhttpRequest({
  1598. method : "GET",
  1599. dataType: "json",
  1600. timeout: 2000,
  1601. url : durl,
  1602. onreadystatechange : function (response) {
  1603. if (response.response){
  1604. var urlzxa2=response.response.match(/URL=\'(\S*)\'/);
  1605. xzbt.attr("href",urlzxa2[1]);
  1606. durl=urlzxa2[1];
  1607. $(element).attr("d-new","1");
  1608. if (durl){
  1609. let bdvbt = $(element).children(':last-child').find('.c-showurl.c-color-gray');
  1610. if (bdvbt){
  1611. let durlvtxt=bdvbt.text();
  1612. let addurl=urlzxa2[1];
  1613. // console.log(bdvbt.html())
  1614. let addxurldomain = urlzxa2[1].split("/");
  1615. if( addxurldomain[2] ) {
  1616. addxurl=addxurldomain[2];
  1617. }
  1618. if (durlvtxt.indexOf('.') < 0){
  1619. durlvtxt=durlvtxt+':'+addxurl;
  1620. }else{
  1621. durlvtxt=addxurl;
  1622. }
  1623. bdvbt.text(durlvtxt);
  1624. bdvbt.attr('href',durl);
  1625. }
  1626. if (GM_getValue('allconfig').baidu.kgbaiduad==true){
  1627. if (GM_getValue('allconfig').baidu.baidulianjie==true){
  1628. for(let b in GM_getValue('allconfig').pingbiurl){
  1629. if (durl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
  1630. $(element).remove();
  1631. }
  1632. }
  1633. }
  1634. }
  1635. if ($(element).attr("d-lg") ){
  1636. }else{
  1637. $(element).attr("d-lg","1");
  1638. let urldomain = durl.split("/");
  1639. let urldofavicon = "";
  1640. if( urldomain[2] ) {
  1641. urldofavicon=faviconurl+urldomain[0]+"//"+urldomain[2]+"?size=32";
  1642. }
  1643. if($(element).find("h3").find("img").attr('src') ) {
  1644. urldofavicon=$(element).find("h3").find("img").attr('src');
  1645. }
  1646. if (GM_getValue('allconfig').baidu.baidulogo==true){
  1647. if($(element).find("h3").find("img").attr('src') ) {
  1648. }else{
  1649. if ($(element).find("h3").length==1){
  1650. $(element).find("h3").find("a").prepend('<div class="c-img c-img-circle c-gap-right-xsmall" style="border-radius: 1%;display: inline-block;position: relative; top: 3px;background: rgba(0, 0, 0, 0);max-width:24px;"><span class="c-img-border c-img-source-border c-img-radius-large" style="background: rgba(0, 0, 0, 0);border: 0px solid rgba(0,0,0,0);"></span><img style="max-width:24px;" src="'+urldofavicon+'" onerror="javascript:this.parentNode.style.display = \'none\';" ></div>');
  1651. }
  1652. }
  1653. }
  1654. }
  1655. }
  1656. }
  1657. }
  1658. })
  1659. }
  1660. }
  1661. }
  1662. if ($(element).attr("d-old") ){
  1663. }else{
  1664. $(element).attr("d-old","1");
  1665. let pingbijc=0;
  1666. if (GM_getValue('allconfig').baidu.kgbaiduad==true){
  1667. if ( pingbijc==0 ){
  1668. for(let b in GM_getValue('allconfig').pingbikw){
  1669. let pingbici= $(element).find("h3").find("a").text()+ $(element).find(".c-abstract").text();
  1670. if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
  1671. $(element).remove();
  1672. pingbijc=1;
  1673. }
  1674. }
  1675. }
  1676. }
  1677. }
  1678. })
  1679. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1680. if(zkdurldomain.indexOf("sf/vsearch") < 0 ) {
  1681. $("#content_left").find("div:eq(0)").each(function() {
  1682. let bid = String($(this).attr("id"));
  1683. let bclass = String($(this).attr("class"));
  1684. if (bid == "undefined" && bclass == "undefined" ) {
  1685. $(this).remove();
  1686. }
  1687. })
  1688. }
  1689. }
  1690. }
  1691. if (GM_getValue('allconfig').baidu.kgbaidued==true){
  1692. if(zkdurldomain.indexOf('zhidao.baidu.com') > 0){
  1693. $(".shop-entrance").remove();
  1694. $(".activity-entry").remove();
  1695. $(".task-list-button").remove();
  1696. }
  1697. if(zkdurldomain.indexOf('zhidao.baidu.com/index/') > 0){
  1698. if (isMobile()){
  1699. $("div[class='ecs-wraper']").remove();
  1700. }
  1701. }
  1702. if(zkdurldomain.indexOf('zhidao.baidu.com/search') > 0){
  1703. if ($("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").length>0){
  1704. $("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").click();
  1705. }
  1706. if (isMobile()){
  1707. $("div[class='ecs-wraper']").remove();
  1708. }
  1709. $(".bannerdown").remove();
  1710. $(".aside.fixheight").remove();
  1711. $(".wgt-bottom-ask").remove();
  1712. $(".leftup").remove();
  1713. $(".wgt-iknow-special-business").remove();
  1714. }
  1715. if(zkdurldomain.indexOf('zhidao.baidu.com/question') > 0){
  1716. if ($("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").length>0){
  1717. $("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").click();
  1718. }
  1719. $("div[class^='wgt-vva']").remove();
  1720. $(".feed-recommend-list").remove();
  1721. if (isMobile()){
  1722. $("div[class='wap-youx-change-asp']").remove();
  1723. $("#feed-recommend").remove();
  1724. $("div[class*='ecom-ads']").remove();
  1725. if($(".circusee-bg").length>0 ){
  1726. $(".circusee-bg").hide();
  1727. $("div[class='chat-consult shorten']").css('height','auto');
  1728. }
  1729. }
  1730. if($(".circusee-bg").length>0 ){
  1731. $(".circusee-bg").hide();
  1732. $(".chat-consult-box").css('height','auto');
  1733. }
  1734. $("#knowledge-answer").remove();
  1735. $(".grid-r.qb-side").remove();
  1736. $(".wgt-ads").remove();
  1737. $(".wgt-bottom-union").remove();
  1738. $(".adTopImg").remove();
  1739. $(".exp-topwld-tip").remove();
  1740. $("#wgt-ecom-banner").remove();
  1741. $("#wgt-ecom-right").remove();
  1742. $(".question-number-text-chain").remove();
  1743. $(".ec-pc_mat_coeus__related_link_text-content").remove();
  1744. }
  1745. if(zkdurldomain.indexOf('wapbaike.baidu.com/item') >= 0){
  1746. $("div[class='yitiao-content J-yitiao-content']").remove();
  1747. }
  1748. if(zkdurldomain.indexOf('baike.baidu.com') > 0){
  1749. $("#navbarAdNew").remove();
  1750. $(".userbar_mall").remove();
  1751. }
  1752. if(zkdurldomain.indexOf('baike.baidu.com/item') > 0){
  1753. $("a[onclick^='page.Mixedor.mixedOpen(this").remove();
  1754. $(".yitiao-container").remove();
  1755. //$(".before-content").remove(); 百度百科多义词和秒懂百科视频相关
  1756. $(".configModuleBanner").remove();
  1757. $(".topA").remove();
  1758. $(".right-ad").remove();
  1759. $(".bottom-recommend-wrapper").remove();
  1760. $(".lemmaWgt-promotion-vbaike").remove();
  1761. $(".lemmaWgt-promotion-slide").remove();
  1762. $("#side_box_unionAd").remove();
  1763. }
  1764. if(zkdurldomain.indexOf('wenku.baidu.com') > 0){
  1765. $(".banner-ad").remove();
  1766. $(".ad-box").remove();
  1767. $("#banurl").remove();
  1768. $("#my-wkHome-vip-tips").parent().remove();
  1769. $(".vip-card").remove();
  1770. $(".zsj-topbar").remove();
  1771. $(".lastcell-dialog").remove();
  1772. $(".zsj-toppos").remove();
  1773. $(".fc-r###lt-container").remove();
  1774. }
  1775. if(zkdurldomain.indexOf('wenku.baidu.com/search') > 0){
  1776. $("#fengchaoad").remove();
  1777. $("div[class='adlist-wrap']").remove();
  1778. $(".yuedu-recommend-wrap").remove();
  1779. $(".search-aside-adWrap").remove();
  1780. $(".fc-first-r###lt-wrap").remove();
  1781. }
  1782. if(zkdurldomain.indexOf('wk.baidu.com/') > 0){
  1783. $(".fc-r###lt").remove();
  1784. }
  1785. if(zkdurldomain.indexOf('haokan.baidu.com/') > 0){
  1786. $(".landrightbanner-content").remove();
  1787. }
  1788. if(zkdurldomain.indexOf('wk.baidu.com/view') > 0){
  1789. if (isMobile()){
  1790. $(".middle-box-root").remove();
  1791. $(".fc-ad-contain").remove();
  1792. $(".shops-hot").remove();
  1793. $(".b-bigpic-root").remove();
  1794. $(".video-rec-wrap").remove();
  1795. $(".shops-hot").remove();
  1796. $("div[class='new-guideapp-card-btn new-guideapp-card-animation']").remove();
  1797. $("div[class='reader-wrap reader-copy']").css('height','auto');
  1798. $("#view-app").css('max-height','');
  1799. }
  1800. }
  1801. if(zkdurldomain.indexOf('wenku.baidu.com/view') > 0){
  1802. if (isMobile()){
  1803. $(".middle-box-root").remove();
  1804. $(".fc-ad-contain").remove();
  1805. $(".shops-hot").remove();
  1806. $(".b-bigpic-root").remove();
  1807. $(".video-rec-wrap").remove();
  1808. $(".shops-hot").remove();
  1809. $("div[class='fold-pager with-margin']").remove();
  1810. $("div[class='reader-wrap reader-copy']").css('height','auto');
  1811. $("#view-app").css('max-height','auto');
  1812. }
  1813. $(".hx-bottom-wrapper").remove();
  1814. $(".hx-warp").remove();
  1815. $(".fc-fold-page").remove();
  1816. $(".hx-recom-wrapper").remove();
  1817. $(".hx-bottom-wrapper").remove();
  1818. $(".relative-recommend-wrapper").remove();
  1819. $(".fc-container").remove();
  1820. $("#ggbtm").parent().remove();
  1821. $(".union-ad-bottom").remove();
  1822. $(".ad-vip-close-bottom").remove();
  1823. $(".operation-wrapper").remove();
  1824. $(".relative-course-wrapper").remove();
  1825. $(".hot-search-wrapper").remove();
  1826. $(".hx-right-wrapper").remove();
  1827. $("#relative-videos-wrap").remove();
  1828. $(".add-has-money-pay").remove();
  1829. $(".wk-color-vip-red").parent().parent().remove();
  1830. $(".vip-tips-wrap").parent().remove();
  1831. $(".top-ads-banner-wrap").remove();
  1832. $(".wangpan-tip").remove();
  1833. $(".new-user-discount-tip").remove();
  1834. $(".pay-vip-btn-wrap").remove();
  1835. $(".relative-doc-ad-wrapper").remove();
  1836. $(".view-like-recom-fc").remove();
  1837. }
  1838. if(zkdurldomain.indexOf('baidu.com/video/page') > 0){
  1839. $("div[class='na-ec-item']").each(function() {
  1840. if ($(this).find("a[data-type='native_ad']").length > 0){
  1841. $(this).remove();
  1842. }
  1843. })
  1844. }
  1845. if(zkdurldomain.indexOf('baidu.com/s?') > 0){
  1846. $("div[class*='c-container ec_resitem']").remove();
  1847. $("span[ref='open']").parent().parent().remove();
  1848. }
  1849. if(zkdurldomain.indexOf('m.baidu.com') > 0 || zkdurldomain.indexOf('www.baidu.com') > 0){
  1850. $("div[style='overflow: hidden;background: #fff;position: relative;']").remove();
  1851. }
  1852. if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=image_content') > 0){
  1853. $("body").on("click","div[class^='c-image-viewer-img']",function(){
  1854. if($(this).find("img").length>0 ){
  1855. window.location.href=$(this).find("img").attr("src");
  1856. }
  1857. })
  1858. $("body").on("click",".icon.icon-download",function(){
  1859. if($(".c-image-viewer-item-current").find("img").length>0 ){
  1860. window.location.href=$(this).find("img").attr("src");
  1861. }
  1862. })
  1863. $("div[class^='sfc-image-content-waterfall-item']").each(function() {
  1864. if ($(this).find("div[class='sfc-image-content-img-toolbar-ad-text']").length > 0){
  1865. $(this).remove();
  1866. }
  1867. if ($(this).find("div[class='commodity-row-item']").length > 0){
  1868. $(this).remove();
  1869. }
  1870. })
  1871. }
  1872. if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=video') > 0){
  1873. $("div[data-type='ad']").remove();
  1874. }
  1875. if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=wenku') > 0){
  1876. $("div[data-tpl='adv_wenku_fc']").remove();
  1877. }
  1878. if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=tieba') > 0 || zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=wenda_tab') > 0){
  1879. $("div[class*='c-container ec-container']").remove();
  1880. }
  1881. if(zkdurldomain.indexOf('image.baidu.com/search/index') > 0){
  1882. $("li[class='newfcImgli']").remove();
  1883. $("#pnlBeforeContent").remove();
  1884. $(".fcImgli").remove();
  1885. }
  1886. if(zkdurldomain.indexOf('image.baidu.com/search/detail') > 0){
  1887. $(".text-link-ads").remove();
  1888. $(".rsr###lt-card").remove();
  1889. $("#adCard").remove();
  1890. }
  1891. if(zkdurldomain.indexOf('tieba.baidu.com/sf/vsearch') > 0){
  1892. $("div[class*='c-container ec-container']").remove();
  1893. }
  1894. if(zkdurldomain.indexOf('tieba.baidu.com/f/search') > 0){
  1895. $(".s_aside").remove();
  1896. }
  1897. if(zkdurldomain.indexOf('tieba.baidu.com/p/') > 0){
  1898. if (isMobile()){
  1899. $("div[class='banner-wrapper-defensive']").remove();
  1900. $("div[class='fengchao-banner-defensive']").remove();
  1901. $("div[class='list-content']").find("div[class='list-content']").remove();
  1902. }
  1903. }
  1904. if(zkdurldomain.indexOf('tieba.baidu.com/f?') > 0){
  1905. $(".bus-top-activity-wrap").remove();
  1906. $(".plat_recom_carousel").hide();
  1907. $(".activity_head ").hide();
  1908. $("#branding_ads").hide();
  1909. if ($(".activity_head").length>0){
  1910. $(".head_main").css("margin-top","100px");
  1911. }
  1912. if (isMobile()){
  1913. $("div[class='tb-banner-wrapper-defensive tb-banner tb-threadlist__item']").remove();
  1914. }
  1915. $("img[class='close_btn j_click_close']").click();
  1916. $("div[class='clearfix thread_item_box']").remove();
  1917. $("div[id='fc-wrap']").remove();
  1918. $("#mediago-frs-aside").remove();
  1919. $("#mediago-tb-pb-list-aside").remove();
  1920. $("div[class='fengchao-wrap']").hide();
  1921. $(".fengchao-wrap-box").remove();
  1922. $("div[class='fengchao-wrap']").remove();
  1923. $("div[id*='mediago-tb-']").remove();
  1924. $("div[class*='l_post'][data-field='{}']").remove();
  1925. $("div[ad-dom-img]").remove();
  1926. }
  1927. if(zkdurldomain.indexOf('tieba.baidu.com/p') > 0){
  1928. //setInterval(function(){ }, 1000);
  1929. //$("span:contains('广告')").parent().parent().parent().parent().parent().parent().remove();
  1930. $("#branding_ads").hide();
  1931. $("div[id='aside-ad-wrapper']").hide();
  1932. $("#mediago-frs-aside").remove();
  1933. $("div[id='aside-ad-wrapper']").hide();
  1934. $("div[class='fengchao-wrap-feed']").hide();
  1935. $("#mediago-tb-pb-list-aside").remove();
  1936. $("div[class='fengchao-wrap']").hide();
  1937. $("div[id*='mediago-tb-']").remove();
  1938. $("div[class*='l_post'][data-field='{}']").remove();
  1939. $("div[ad-dom-img]").remove();
  1940. }
  1941. if(zkdurldomain.indexOf('map.baidu.com/search') > 0){
  1942. $(".damoce-search-item.damoce-search-item-nopoi").remove();
  1943. }
  1944. if(zkdurldomain.indexOf('jingyan.baidu.com/search') > 0){
  1945. $(".ec_ad").parent().remove();
  1946. $("a[class='gogoxvideo']").remove();
  1947. }
  1948. if(zkdurldomain.indexOf('jingyan.baidu.com/article') > 0){
  1949. $("#fresh-share-exp-e").remove();
  1950. $(".wgt-income-money").remove();
  1951. $(".aside-pro-container").remove();
  1952. $("#bottom-ads-container").remove();
  1953. $(".magzine-list").remove();
  1954. $("div[class='aside-wrap wgt-cms-banner']").hide();
  1955. $("div[class='right-fixed-related-wrap']").hide();
  1956. $("div[class='ad-card']").hide();
  1957. $("aside[class='rel-exp-feed-ad-item']").hide();
  1958. }
  1959. if(zkdurldomain.indexOf('video.baidu.com') > 0 || zkdurldomain.indexOf('v.baidu.com') > 0){
  1960. $("#PCallpagesidebar1").remove();
  1961. $("#PCallpagesidebar2").remove();
  1962. $(".bdvideo-adver-carousel").parent().remove();
  1963. $("div[id*='adone']").remove();
  1964. $("div[id*='adtwo']").remove();
  1965. $("#pallcommoncolumnad").remove();
  1966. $("#index_right_top").remove();
  1967. $("#qzfcadid").remove();
  1968. $("#pcshortchannelTopRight").remove();
  1969. $("#__lawnImageContainer").parent().parent().remove();
  1970. $("#detail_adm_right").remove();
  1971. $(".ctt-adver1-banner").remove();
  1972. $("div[id*='PCDetailPageTopRightList']").remove();
  1973. $("div[id*='channelBannerAdver']").remove();
  1974. $("div[id*='channelColumn']").parent().remove();
  1975. $("div[id*='ChannelColumn']").parent().remove();
  1976. $("div[id*='pc']").remove();
  1977. $("div[id*='PC']").remove();
  1978. $("div[id*='adv-carousel-item']").parent().remove();
  1979. $("[id*='FeedAdSys']").remove();
  1980. $("div[id*='TabAd']").remove();
  1981. $(".section-ad").remove();
  1982. $(".full-collunm-ad").remove();
  1983. }
  1984. if(zkdurldomain.indexOf('video.baidu.com/v') > 0 || zkdurldomain.indexOf('v.baidu.com/v') > 0){
  1985. $(".top-ad-cont").remove();
  1986. $("div[id*='searchMoreLong']").remove();
  1987. $("#searchPagefeedBanner").remove();
  1988. $(".side-content").remove();
  1989. $("#psBottomColumn").parent().remove();
  1990. $("#searchR###ltAdOne").remove();
  1991. $("#searchHotShortSeven").remove();
  1992. $("#searchHotShortSevenTwo").remove();
  1993. }
  1994. if(zkdurldomain.indexOf('www.baidu.com/sf/vsearch') > 0){
  1995. $("#s_tab").next().next().each(function() {
  1996. var id = String($(this).attr("id"));
  1997. if (id == "undefined") {
  1998. $(this).remove();
  1999. }
  2000. })
  2001. }
  2002. }
  2003. }
  2004. }
  2005. function delzhihu() {
  2006. if (location.href.indexOf('link.zhihu.com/?target=')>= 0 ) {
  2007. if ($('p[class="link"]').length>0 ){
  2008. window.location.href=$("p[class='link']").text();
  2009. }
  2010. }
  2011. if(zkdurldomain.indexOf('zhihu.com') > 0){
  2012. if (GM_getValue('allconfig').baidu.kgzhihued==true){
  2013. $("div[class='Pc-card Card']").remove();
  2014. if(zkdurldomain.indexOf('zhihu.com/signin?') > 0){
  2015. window.location.href='https://www.zhihu.com/knowledge-plan/hot-question/hot/0/day';
  2016. }
  2017. if (isMobile()){
  2018. $("a[class='MBannerAd']").remove();
  2019. $("a[class='MHotFeedAd']").remove();
  2020. $("div[class='Card RelatedReadings']").remove();
  2021. }
  2022. if ( $('.Button.Button--primary.Button--blue').length>1 ){
  2023. $('.Button.Button--primary.Button--blue').each(function(k,v){
  2024. if ($(this).text().indexOf('立即登录/注册') ==0){
  2025. $(this).parent().hide();
  2026. }
  2027. })
  2028. }
  2029. if ( $(".Button.Modal-closeButton.Button--plain").length>0 && $(".signFlowModal-container").length>0 && zhihudl==0){
  2030. zhihudl=1;
  2031. $(".Button.Modal-closeButton.Button--plain").click();
  2032. }
  2033. $(".Pc-word").hide();
  2034. $(".Pc-feedAd").remove();
  2035. $(".Banner-adsense").remove();
  2036. $("img").each(function(){
  2037. if ($(this).attr("alt")=="广告"){
  2038. $(this).remove();
  2039. }
  2040. });
  2041. }
  2042. }
  2043. }
  2044. function delbili() {
  2045. if(zkdurldomain.indexOf('bilibili.com') > 0){
  2046. if (GM_getValue('allconfig').baidu.kgbilied==true){
  2047. $("div[class='flip-view p-relative over-hidden w-100']").remove();
  2048. if (bili22girl==true && $("button[class='minimize-btn pointer bg-contain']").length>0){
  2049. $("div[class='haruna-ctnr none-select']").hide();
  2050. bili22girl=false;
  2051. }
  2052. $(".bili-video-card").each(function() {
  2053. if ($(this).find("a")){
  2054. if ($(this).find("a").attr('href')){
  2055. if ($(this).find("a").attr('href').indexOf('cm.bilibili.com/cm/api/fees') > 0){
  2056. $(this).hide();
  2057. }
  2058. }
  2059. }
  2060. })
  2061. $("a[target='_blank']").each(function() {
  2062. if ($(this).attr('href')) {
  2063. if($(this).attr('href').indexOf('cm.bilibili.com/cm/api/fees') > 0){
  2064. $(this).hide();
  2065. }
  2066. }
  2067. })
  2068. }
  2069. }
  2070. }
  2071. function deldouban() {
  2072. if(zkdurldomain.indexOf('douban.com') > 0){
  2073. // $('div[ad-status]').attr('ad-status')
  2074. if (GM_getValue('allconfig').baidu.kgdoubaned==true){
  2075. $('div[ad-status]').each(function() {
  2076. if ($(this).attr('ad-status') == "appended") {
  2077. $(this).remove();
  2078. }
  2079. })
  2080. }
  2081. }
  2082. }
  2083. //test
  2084. function closeytAds(){
  2085. var adclose = document.querySelector('.ytp-ad-skip-button')||document.querySelector('.ytp-ad-overlay-close-button');
  2086. var adybremove = document.querySelector('#player-ads')||document.querySelector('div#sparkles-container')||document.querySelector('ytd-compact-promoted-item-renderer')||document.querySelector('ytd-video-masthead-ad-v3-renderer');
  2087. if (GM_getValue('allconfig').baidu.kgyoued==true){
  2088. if(adybremove){
  2089. adybremove.remove();
  2090. }
  2091. }
  2092. if(adclose){
  2093. adclose.click();
  2094. }
  2095. }
  2096. function getytvele(){
  2097. if($('div#info-contents').length>0){
  2098. // addbtn();
  2099. }else{
  2100. setTimeout(getytvele,500);
  2101. }
  2102. }
  2103. function inybit(){
  2104. document.querySelector('ytd-popup-container').style.display='';
  2105. document.querySelector('ytd-app').style.zIndex='';
  2106. }
  2107. function reytb(){
  2108. closeytAds();
  2109. if(location.href!==zkdurldomain)
  2110. {
  2111. inybit();
  2112. zkdurldomain=location.href;
  2113. getytvele();
  2114. }
  2115. }
  2116. if(zkdurldomain.indexOf("youtube.com") >= 0 ) {
  2117. goingnumb=999999992;
  2118. setInterval(function(){
  2119. reytb();
  2120. reydown();
  2121. },1500);
  2122. }
  2123. setInterval(function(){
  2124. deltwitter()
  2125. },1500);
  2126. function deltwitter() {
  2127. if(zkdurldomain.indexOf("twitter.com") >= 0 ) {
  2128. $("article").each(function(index,element) {
  2129. if ($(element).attr("d-twitter") ){
  2130. }else{
  2131. let xzggtt =$(element).find("span");
  2132. if (xzggtt){
  2133. xzggtt.each(function(index,elnt) {
  2134. if ( $(elnt).text()=="推荐"){
  2135. if (GM_getValue('allconfig').baidu.kgtwied==true){
  2136. $(element).hide();
  2137. }
  2138. }
  2139. })
  2140. }
  2141. }
  2142. let xzggaurl =$(element).find("a");
  2143. let xzggavideo =$(element).find("video");
  2144. let xzggatime =$(element).find("time");
  2145. if (xzggaurl && xzggavideo){
  2146. if ($(element).attr("d-vurl") ){
  2147. }else{
  2148. if (xzggatime.length<2){
  2149. xzggavideo.each(function(index,vurl) {
  2150. if ( $(vurl).attr('preload')){
  2151. if ($(vurl).attr("d-vurl") ){
  2152. }else{
  2153. xzggaurl.each(function(index,aurl) {
  2154. if ( $(aurl).attr('href')){
  2155. if ($(vurl).attr("d-vurl") ){
  2156. }else{
  2157. if (GM_getValue('allconfig').baidu.kgtwimv==true){
  2158. if ($(aurl).attr('href').indexOf("status") >= 0 ) {
  2159. let videourl = $(aurl).attr('href');
  2160. videourl = videourl.match(/status\/(\S*)/)[1];
  2161. videourl="https://twitter.com/i/status/"+videourl;
  2162. $(vurl).attr("d-vurl","1");
  2163. $(vurl).attr("d-video",videourl);
  2164. $(element).attr("d-vurl","1");
  2165. $(element).find("div[role='group'][id^='id']").each(function(index,downbut) {
  2166. //$(downbut).remove();
  2167. if ($(this).attr('downdown')==undefined){
  2168. $(this).attr('downdown','1');
  2169. $(this).attr('style',' border-top-width:0px !important;');
  2170. $(downbut).before('<div style="margin-top: 10px;" downdown="1"><a style=" text-align:center;border:2px solid #DCDCDC;padding:3px 10px; background:#dddddd;border-radius:10px;-moz-border-radius:10px;" id="gogoxvideoa" data-url="'+videourl+'" >下载视频线路一</a><a style=" text-align:center;border:2px solid #DCDCDC;padding:3px 10px; background:#dddddd;border-radius:10px;-moz-border-radius:10px;margin-left: 10px;" id="gogoxvideod" data-url="'+videourl+'" >下载视频线路二</a><div>' );
  2171. }
  2172. })
  2173. }
  2174. }
  2175. }
  2176. }
  2177. })
  2178. }
  2179. }
  2180. // console.log('')
  2181. })
  2182. }
  2183. }
  2184. }
  2185. $(element).attr("d-twitter","1");
  2186. })
  2187. }
  2188. }
  2189. function reydown(){
  2190. if(location.href.indexOf("youtube.com/watch?") >= 0 ) {
  2191. if (GM_getValue('allconfig').baidu.kgyoumv==true){
  2192. if ($("a[class='gogoxvideo']").attr('data-url')==location.href){
  2193. return;
  2194. } else {
  2195. $(".gogoxvideo").remove();
  2196. var basebtn = '<div style="margin-top:8px;" downdown="1" ><a style="text-align:center;border:2px solid #DCDCDC;padding:3px 20px; background:#dddddd;border-radius:10px;-moz-border-radius:10px;width: 80px;" id="gogoxvideod" class="gogoxvideo" data-url="'+location.href+'" data-durl="https://zh.savefrom.net" >下载视频线路一</a><a style="margin-left: 10px;text-align:center;border:2px solid #DCDCDC;padding:3px 20px; background:#dddddd;border-radius:10px;-moz-border-radius:10px;width: 80px;" id="gogoxvideob" class="gogoxvideo" data-url="'+location.href+'" data-durl="https://9convert.com" >高清线路二</a><a style="margin-left: 10px;text-align:center;border:2px solid #DCDCDC;padding:3px 20px; background:#dddddd;border-radius:10px;-moz-border-radius:10px;width: 80px;" id="gogoxvideoc" class="gogoxvideo" data-url="'+location.href+'" data-durl="https://www.y2mate.com/download-youtube" >高清线路三</a></div>';
  2197. if($("div[downdown='1']").length==0){
  2198. $('div#info-contents').after(basebtn);
  2199. let playLineTd = document.querySelectorAll('.gogoxvideo');
  2200. playLineTd.forEach(function(item){
  2201. item.addEventListener('click',function(){
  2202. console.log('custom click event triggered');
  2203. GM_setValue('gogoxvideodown', $(this).attr('data-url'));
  2204. window.open($(this).attr('data-durl'));
  2205. })
  2206. })
  2207. }
  2208. }
  2209. }
  2210. }
  2211. }
  2212. window.onload = function() {
  2213. $('body').on('click','.gogoxvideo',function(){
  2214. console.log("11");
  2215. })
  2216. }
  2217. if(location.href.indexOf("9convert.com") >= 0 ) {
  2218. if (GM_getValue('gogoxvideodown')){
  2219. setTimeout(function(){
  2220. $("input[name='query']").attr('value',GM_getValue('gogoxvideodown'));
  2221. GM_deleteValue('gogoxvideodown');
  2222. $(".btn-red").click();
  2223. }, 1000);
  2224. }
  2225. }
  2226. if(location.href.indexOf("y2mate.com/") >= 0 && location.href.indexOf("/download-youtube") >= 0 ) {
  2227. if (GM_getValue('gogoxvideodown')){
  2228. setTimeout(function(){
  2229. $("input[name='query']").attr('value',GM_getValue('gogoxvideodown'));
  2230. GM_deleteValue('gogoxvideodown');
  2231. $("button[id='btn-submit']").click();
  2232. }, 1000);
  2233. }
  2234. }
  2235. if(location.href.indexOf("savefrom.net") >= 0 ) {
  2236. if (GM_getValue('gogoxvideodown')){
  2237. setTimeout(function(){ $("input[name='sf_url']").attr('value',GM_getValue('gogoxvideodown'));
  2238. GM_deleteValue('gogoxvideodown');
  2239. $("button[class='submit']").click();
  2240. }, 1000);
  2241. }
  2242. }
  2243. if(location.href.indexOf("getfvid.com/zh/twitter") >= 0 ) {
  2244. $("#s-hotsearch-wrapperwebone").remove();
  2245. $("#s-hotsearch-wrapperwebtone").remove();
  2246. $("#s-hotsearch-wrapperwebcone").remove();
  2247. $("#s-hotsearch-wrapperwebbone").remove();
  2248. if (GM_getValue('gogoxvideodown')){
  2249. setTimeout(function(){ $("input[name='url']").attr('value',GM_getValue('gogoxvideodown'));
  2250. GM_deleteValue('gogoxvideodown');
  2251. $("button[id='btn_submit']").click();
  2252. }, 1000);
  2253. }
  2254. }
  2255. //
  2256. })()