Greasy Fork is available in English.

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

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

Version vom 28.06.2023. Aktuellste Version

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