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

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

// ==UserScript==
// @name              【屏蔽广告】屏蔽谷歌广告、百度广告、知乎广告、隐藏谷歌和百度搜索增强百度搜索结果的各种广告等等(过滤所有采用谷歌联盟和百度联盟等广告联盟的广告)
// @namespace http://gongju.dadiyouhui03.cn/app/tool/youhou/index.html
// @version           4.758
// @description      新增twitter和Youtube微博视频下载以及广告过滤,可按网址和关键词屏蔽过滤百度谷歌必应bing360微信微博知乎豆瓣B站的搜索结果、屏蔽谷歌推广的广告和去知乎广告、csdn广告、去百度搜索广告、去百度知道广告、去百度文库广告、去360搜索广告、去必应Bing搜索广告、百度文库去广告、去百度在别的网站的推广广告,移除知乎的强制登陆弹窗。去豆瓣广告、去B站广告
// @icon    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUxpcQCI/////wKJ/0Cm/xmU/xaS/+33/9fs/0So/wSK/w2O/wCI/wGI/9/w/wCI/+/4/1Ct/wCI/wiM/xWS/+r1//H4/waL/+33/xGQ/wCI/5/S/4XG//f7/6/a//3+/x2W//b7/xmU/xCP/yCX/7Xc/wuN/1Ov/3a//7Hb/y6e/w6P/5/T/2+8//3+//7///r8/3fA/weL/zOg/xKQ/9/w//n8/xyV/+j0/9nt/ymb//X6//v9/3zC/9vu/4PF//L5/+Hx/zei/6LU/wmN/wGJ//D4/wKJ/9Hp/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VcT7RF5AmQAgAAAAASUVORK5CYII=
// @match        *://*.baidu.com/*
// @match        *://*.google.com/*
// @match        *://*.bing.com/*
// @match        *://*.so.com/*
// @match        *://*.zhihu.com/*
// @match        *://*.douban.com/*
// @match        *://*.weibo.com/*
// @match        *://twitter.com/*
// @match        *://*.youtube.com/*
// @match        *://*.bilibili.com/*
// @match        *://*.csdn.net/*
// @match        *://*/*
// @require https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js
// @require https://cdn.staticfile.org/sweetalert/2.1.2/sweetalert.min.js
// @require https://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js
// @require https://cdn.staticfile.org/html2canvas/0.5.0-beta4/html2canvas.js
// @require https://cdn.staticfile.org/echarts/5.0.1/echarts.min.js
// @grant        GM_addStyle
// @grant        GM_download
// @grant        GM_xmlhttpRequest
// @grant        GM_getResourceText
// @run-at       document-idle
// @grant             unsafeWindow
// @grant             GM_setClipboard
// @grant             GM_setValue
// @grant             GM_getValue
// @grant             GM_deleteValue
// @grant             GM_openInTab
// @grant             GM_registerMenuCommand
// @grant             GM_unregisterMenuCommand
// @grant             GM.getValue
// @grant             GM.setValue
// @grant             GM_info
// @grant             GM_notification
// @grant             GM_getResourceText
// @grant             GM_openInTab
// @grant             GM_download
// @license             End-User License Agreement
// @noframes
// @connect     zhihu.com
// @connect     baidu.com
// @connect     baiducontent.com
// @connect     dadiyouhui02.cn
// @connect *
// ==/UserScript==  
/*
需要更多功能和建议的话,欢迎跟帖反馈
【网站广告优化】百度贴吧、百度知道、百度搜索等百度系去广告优化
大多数网站若使用了谷歌广告、百度广告的页面都将会被净化并隐藏相关广告
针对大部分网站通用的广告样式进行屏蔽美化
可按网址和关键词过滤搜索结果
您可自由修改网址和关键词词库且可随意导入导出备份
过滤大多数网站中谷歌联盟百度联盟的广告
去知乎广告,移除知乎官方不登录不让浏览的登陆弹窗
twitter和Youtube微博视频下载以及广告过滤
强化知乎B站豆瓣油管的过滤,过滤功能对搜索结果、评论、昵称等可以同时生效

【模块化设计可自由的自定义开关功能】
若因为使用的网站更新而我们未及时更新导致部分功能异常的你都可以自由选择关闭和开启。

【搜索结果优化】自动隐藏搜索结果中的各种广告,
可按网址和关键词屏蔽过滤搜索结果,已支持的搜索:百度、谷歌、百度、必应bing、360等
例如你可以自行添加需要屏蔽的网址或则关键词,如:百家号、baijiahao.baidu.com之类的
【新增】twitter和Youtube微博视频下载以及广告过滤。播放遇到广告可自动跳过和屏蔽使用视频下载功能需自带梯子,不然无法下载。
视频解析功能基于视频解析站实现。感谢相关网站的服务

2022.9.3 隐藏樱花动漫广告dmh8.com
2022.8.29 搜索页面美化,默认关闭。需要可自行在控制面板开启
2022.8.23 修复谷歌搜索的关键词和网址屏蔽,优化页面
2022.8.13 默认最小化b站直播间那个22娘,免得影响影响看直播
2022.8.09 新增对部分页面广告的屏蔽
2022.8.05 新增试验功能强力过滤广告,此功能默认关闭,有需要可在控制面板自行开启。屏蔽网站引用的【外站】iframe以达到屏蔽广告的效果。外站的定义就是A域名网站引用B域名网站的iframe页面。(此项可能会造成部分正常引用i的frame不显示,设置白名单可以解决)。
2022.6.19 修复X浏览器百度页面翻页问题
2022.6.7 修复360搜索的广告过滤
2022.6.5 修复B站搜索结果过滤。允许自定义是否过滤百度首页热搜,百家号热搜。屏蔽bing的广告
2022.5.10 新增去csdn广告,无需关注自动展开全文
2022.5.6 优化了百度知道百度文档部分广告。百度知道可直接显示需要付费才能查看的内容了。修复手机端上的部分bug
2022.3.11 修复部分卡的问题,感谢LARA_SSR的反馈
2022.2.25 新增白名单功能, 可解决部分网站可能出现的兼容问题
2022.2.15 隐藏贴吧部分广告
2022.2.11 丰富知乎B站豆瓣油管的过滤功能,过滤功能对搜索结果、评论、昵称等可以同时生效
2021.12.21 新增微博视频解析下载
2021.12.20 新增支持屏蔽关键词屏蔽功能(微博、微信搜索、豆瓣、知乎、B站)
2021.12.18 新增屏蔽关键词的备份,可随意导入导出

2021.11.25
过滤B站广告

2021.10.28
去除点开知乎外链的跳转提醒,直达页面

2021.10.26
新增快资讯广告过滤

2021.8.31
修复Y-Y-Y 反馈的知乎回答,点击"使用匿名身份"无反应,第二次点击才有反应的问题

 2021.8.4
修复你要起飞啊反馈的使用百度资讯搜索,按时间排序,会导致搜索结果消失的问题

 2021.7.10
 新增:twitter和Youtube视频下载以及广告过滤。播放遇到广告可自动跳过和屏蔽

2021.6.16
移除知乎官方不登录不让浏览的登陆弹窗
强化豆瓣全站的广告过滤

2021.6.11
修复1074902074 反馈的拦截广告失败的问题

2021.6.8
修复syrsoN反馈的贴吧部分帖子拦截错误的问题
2021.5.26
修复TNTobsidian提供的不能拦截部分网站广告的问题
2021.5.14
修复lyjhyjyes提供的百度搜索结果中某些品牌广告没有被拦截到的问题
2021.4.29
修复(JIUYU)提供的百度资讯页面无法显示的问题
2021.4.22
修复(冇)提供的百度百科多义项词条被错误屏蔽问题

说明:
百度等网站有可能随时更新可能导致部分功能有些兼容问题需要更多功能和建议的话,欢迎跟帖反馈,

声明:请您知晓本插件本是个人测试自用,本不完美也不保证可用性。
相关功能及代码均来自互联网及网友分享,我们仅做了相关功能的整合。
如无意中侵犯了哪个企业或个人等的知识产权,请联系我们将及时删除等相关处理

   */
 
 
var mmmjhy=0;
var bili22girl=true;
function isMobile() {
let flag= false;
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))) {
 flag= true;
}
return flag
}

 GM_setValue('zkdz_name', 'baiduga');

(function() {
let windodwhost=window.location.host;
let ipdchcek=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
if (windodwhost.indexOf(':') >0 || ipdchcek.test(windodwhost)==true ){
return false;
	}
	var configm='aHR0cHM6Ly93d3cuZGFkaXlvdWh1aTAxLmNuL2FwcC90b29sL3YzLWJkdG9vbC5odG1s';
	configm=window.atob(configm);
	   GM_registerMenuCommand("【♐  网页广告过滤设置】", function(){
GM_openInTab(configm, {active: !0});
    });
var allconfig=new Array();
allconfig=
{
"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)'},
"google":        {},
"so360":        {},
"pingbiurl":     [],
"whiteurl":     [],
"pingbikw":     [],
    };
    if (GM_getValue('allconfig')){
	   }else{
	   GM_setValue('allconfig', allconfig);
	   }
var configurl=window.location.href;
var configmain = document.domain;
var allconfigtime=1661760210;
var allconfigcz=0;
   if (GM_getValue('allconfigtime')){
   	   if (parseInt(GM_getValue('allconfigtime'))<allconfigtime){
   	   	   allconfigcz=1;
   	   	    GM_setValue('allconfigtime', allconfigtime);
   	   }
	   }else{
	   GM_setValue('allconfigtime', allconfigtime);
	   allconfigcz=1;
	   }
	   if (allconfigcz==1){
	   	   var saallconfig=new Array();
saallconfig=
{
"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)'},
"google":        {},
"so360":        {},
"pingbiurl":     GM_getValue('allconfig').pingbiurl,
"whiteurl":     GM_getValue('allconfig').whiteurl,
"pingbikw":    GM_getValue('allconfig').pingbikw,
    };
GM_setValue('allconfig', saallconfig);
 console.log('已重置');
	   }
    if(configmain.indexOf("baidu.com") > 0 ) {
   if(configurl.indexOf('www.baidu.com/s') > 0){

   	   	   $('.toindex').attr('href',configm);
   	   	   $('.toindex').text('控制面板');
     }
   }
 function configjc() {
if (configmain.indexOf(window.atob('ZGFkaXlvdWh1aQ==')) >0 && configurl.indexOf(window.atob('YmR0b29sLmh0bWw=')) >0 ){
        if ($('#configload').length == 0 ) {
 $('body').attr('id','configload');
$('#dataversion').attr('version',GM_info.script.version);
$('#dataversion').html(GM_info.script.updateURL);
        }
  }else{
  	  return;
  }
   }
$('body').on('click','.layui-btn.whiteurl',function(){
	configjc();
    if ($(this).siblings('input').attr("data_zt")=="0"){
$(this).siblings('input').attr("data_zt","1");
$(this).text("准备删除中,手动点击保存后方可生效");
// 手动点击保存后方可生效,不点击保存按钮不会生效
 //普通的自带广告会自动过滤

//若需按网址和关键词屏蔽过滤。请在控制面板中添加,并且手动点击保存后方可生效,不点击保存按钮不会生效
$(this).css("background-color","#908d8d");
        }else{
$(this).siblings('input').attr("data_zt","0");
$(this).text("删除");
$(this).css("background-color","#009688");
        }


})

$('body').on('click','.layui-btn.pingbiurl',function(){
	configjc();
    if ($(this).siblings('input').attr("data_zt")=="0"){
$(this).siblings('input').attr("data_zt","1");
$(this).text("准备删除中,手动点击保存后方可生效");
// 手动点击保存后方可生效,不点击保存按钮不会生效
 //普通的自带广告会自动过滤

//若需按网址和关键词屏蔽过滤。请在控制面板中添加,并且手动点击保存后方可生效,不点击保存按钮不会生效
$(this).css("background-color","#908d8d");
        }else{
$(this).siblings('input').attr("data_zt","0");
$(this).text("删除");
$(this).css("background-color","#009688");
        }


})
$('body').on('click','.layui-btn.pingbikw',function(){
	configjc();
    if ($(this).siblings('input').attr("data_zt")=="0"){
$(this).siblings('input').attr("data_zt","1");

$(this).text("准备删除中,手动保存后方可生效");
$(this).css("background-color","#908d8d");
        }else{
$(this).siblings('input').attr("data_zt","0");
$(this).text("删除");
$(this).css("background-color","#009688");
        }


})
$('body').on('click','.layui-btn.whiteurladd',function(){
	configjc();
let addurl=$(this).siblings('input').val();


  if (addurl.length <5){
            alert("输入的网址太短");
 return;
   }
 if (addurl.indexOf("http") >=0){
 let addurldomain = addurl.split("/");
     if( addurldomain[2] ) {
    addurl=addurldomain[2];
}else{
     alert("输入的网址不合法");
 return;
   }
     }else{
    if (addurl.indexOf(".") >0){
   }else{
     alert("输入的网址不合法");
 return;
   }
     }



$("#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>'  );
$(this).siblings('input').val('');

})

$('body').on('click','.layui-btn.pingbiurladd',function(){
	configjc();
let addurl=$(this).siblings('input').val();


  if (addurl.length <5){
            alert("输入的网址太短");
 return;
   }

 if (addurl.indexOf("www.baidu.com/link?") >=0){
             alert("此网址是百度的网址,屏蔽后可能出现问题。请使用其他的网站的链接");

 return;
   }
 if (addurl.indexOf("http") >=0){
 let addurldomain = addurl.split("/");
     if( addurldomain[2] ) {
    addurl=addurldomain[2];
}else{
     alert("输入的网址不合法");
 return;
   }
     }else{
    if (addurl.indexOf(".") >0){
   }else{
     alert("输入的网址不合法");
 return;
   }
     }



$("#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>'  );
$(this).siblings('input').val('');

})

$('body').on('click','.layui-btn.pingbikwadd',function(){
	configjc();
let addkw=$(this).siblings('input').val();


  if (addkw.length <2){
            alert("输入的关键词必须大于等于2个字 ");
 return;
   }


$("#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>'  );
$(this).siblings('input').val('');

})

function sosave() {
	configjc();

var whiteurlen=new Array();

 $(".layui-btn.whiteurl").siblings('input').each(function(index,element) {
 if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  whiteurlen.push($(this).val());
}
})
whiteurlen=Array.from(new Set(whiteurlen));
whiteurlen=whiteurlen.slice(0,999);

var pingbiurlen=new Array();

 $(".layui-btn.pingbiurl").siblings('input').each(function(index,element) {
 if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  pingbiurlen.push($(this).val());
}
})
pingbiurlen=Array.from(new Set(pingbiurlen));
pingbiurlen=pingbiurlen.slice(0,999);
var pingbiukwen=new Array();

 $(".layui-btn.pingbikw").siblings('input').each(function(index,element) {
 if ($(this).attr("data_zt")=="0" && $(this).val().length >1){
  pingbiukwen.push($(this).val());
}
})
pingbiukwen=Array.from(new Set(pingbiukwen));
pingbiukwen=pingbiukwen.slice(0,999);
var saallconfig=new Array();
saallconfig=
{
"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()},
"google":        {},
"so360":        {},
"pingbiurl":     pingbiurlen,
"whiteurl":     whiteurlen,
"pingbikw":    pingbiukwen,
    };
GM_setValue('allconfig', saallconfig);

alert("已保存设置");
}

function sosoreset() {
	if (configmain.indexOf(window.atob('ZGFkaXlvdWh1aQ==')) >0 && configurl.indexOf(window.atob('YmR0b29sLmh0bWw=')) >0 ){

         if (GM_getValue('allconfig')){
	   }else{
	   GM_setValue('allconfig', allconfig);
	   }
    let allwconfig=GM_getValue('allconfig');
for(let i in allwconfig){

    if ( Object.keys(allwconfig[i]).length > 0){
   if (i=="pingbiurl"){
$("#pingbiurl").html("");
        for(let b in allwconfig[i]){
     $("#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>'  );
           }
        }
   if (i=="whiteurl"){
$("#whiteurl").html("");
        for(let b in allwconfig[i]){
     $("#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>'  );
           }
        }
 if (i=="pingbikw"){
$("#pingbikw").html("");
        for(let b in allwconfig[i]){
     $("#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>'  );
           }
        }

    for(let k in allwconfig[i]){
       //测试
           if (k=="baidueyecolor"){
       $("#"+k).val(allwconfig[i][k]);
        }
        if (k!="baidueyecolor"){
        if (allwconfig[i][k]==true){
$("#"+k).children("input:eq(0)").prop( "checked", true );
$("#"+k).children("div:eq(0)").attr("class","layui-unselect layui-form-switch layui-form-onswitch");
$("#"+k).find("em").html("ON");
            }else{
$("#"+k).children("input:eq(0)").prop( "checked", false );
$("#"+k).children("div:eq(0)").attr("class","layui-unselect layui-form-switch");
$("#"+k).find("em").html("OFF");
            }
 }
    }
    }
}

}
}
$(document).ready(function(){

    configjc();
    sosoreset();
   })
$('body').on('click','.layui-btn.sososave',function(){
configjc();
  //保存
   GM_setValue('allconfig', allconfig);
     sosave();
	           });

$('body').on('click','.layui-btn.layui-btn-primary.sosoreset',function(){
  //重置
  configjc();
   GM_setValue('allconfig', allconfig);
     sosoreset();
     alert("已还原默认设置");
	           });

		var zkddomain = document.domain;
		var zkdurldomain = location.href;
		 var zhihudl=0;
 		 var kgmmm=0;
if (GM_getValue('allconfig').whiteurl){
 if (GM_getValue('allconfig').whiteurl.length>0 ){
    for(let b in GM_getValue('allconfig').whiteurl){
         if (zkddomain.indexOf(GM_getValue('allconfig').whiteurl[b]) >=0){
          kgmmm=1;
         }
             }
             if (kgmmm==1){
             	 return;
             }
             }
           }
if (location.href.indexOf('link.zhihu.com/?target=')>= 0 ) {
 if ($("p[class='link']").length>0  ){
   window.location.href=$("p[class='link']").text();
  }
}

if(zkddomain.indexOf(".op.gg") > 0 ) {
 $(".vm-placement").remove();
}

if(zkddomain.indexOf(".ctyun.cn") >= 0 || zkddomain.indexOf("cloud.189.cn") >= 0) {
return;
}


if(zkddomain.indexOf("greasyfork.org") <= 0 ) {
delgoogle();
del360();
delzhihu();
delbili();
deldouban();
bing();
delother();

setTimeout(function(){

delgoogle();
del360();
delzhihu();
delbili();
deldouban();
bing();
delother();


},1500);

var ref = "";

ref = setInterval(function(){
    delgoogle();
    delzhihu();
delbili();
    delother();
    del360();
},2000);


}
  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%);}`;
  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%);}`;

  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%);}`;
 
	  if (GM_getValue('allconfig').baidu.baiducss==true){
	  	  
  if(zkdurldomain.indexOf('google.com') > 0  && zkdurldomain.indexOf('/search?') > 0 && !isMobile()){
  	  GM_addStyle(tab_google_tabcss);
  }
  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()){
  	  GM_addStyle(tab_bd_tabcss);
  }
    if(zkdurldomain.indexOf('bing.com/search?q=') > 0  && !isMobile()){
GM_addStyle(tab_bing_tabcss);
  }
  }
function delother() {
var kuaizixun= "www.360kuai.com/";
var biliurl= "search.bilibili.com/";
var weixinurl= "weixin.sogou.com/weixin?";
var zhihuurl= "www.zhihu.com/search?";
var doubanurl= "www.douban.com/search?";
var doubanaurl= "search.douban.com/movie/subject_search?";
var weibourl= "weibo.com/";
var youurl= ".youtube.com";
var twiurl= "twitter.com/";
var csdn= "csdn.net";
var wanweibaike= "wanweibaike.net/wiki";
var yinhua= "dmh8.com";

$("iframe[src*='pos.baidu.com']").remove();
$("iframe[src*='//googleads']").remove();
$("iframe[src*='show-3.mediav.com']").remove();
$("div[class*='wwads-cn wwads']").remove();
$("div[data-type='GoogleRender']").remove();

 if(zkdurldomain.indexOf(yinhua) >= 0  ){
 	   $("#HMRichBox").remove();
 	   $("#fix_bottom_dom").remove();
 	   $("#HMCOVER_ID1").remove();
 	   $("div[style^='width:300px;height:300px;']").remove();
}	
var kgpingbiswhitezt=true;
 var kgpingbiswhiteurl = [
"recaptcha.google",
"captcha.qq.com",
"alicdn.com",
"aliyun.com",
"taobao.com",
"mall.com",
"weibo.com",
".le.com",
"iqiyi.com",
"tudou.com",
"qq.com",
"youku.com",
"sohu.com",
"pptv.com",
"twitter.com",
"facebook.com",
"instagram.com",
"tiktok.com",
"imdb.com",
"vk.com",
"mtv.com",
"56.com",
"ku6.com",
"cntv.cn",
"cctv.cn",
"mgtv.com",
"yinyuetai.com",
"wasu.cn",
"163.com",
"1905.com",
"xunlei.com",
"funshion.com",
"youhui",
"pornhub.com",
"youtube.com",
"bilibili.com",
"zhihu.com",
"mama.com",
"baidu.com"];


      if ($("input[type='password']").length>0||$("input[name='password']").length>0||$("input[type='email']").length>0||$("input[name='email']").length>0||$("input[name='code']").length>0||$("input[name='phone']").length>0||$("input[placeholder*='手机']").length>0||$("input[placeholder*='邮箱']").length>0||$("input[placeholder*='账号']").length>0||$("input[placeholder*='密码']").length>0||$("input[placeholder*='验证']").length>0){
        kgpingbiswhitezt=false;
      }
 //说明:此处是为了匹配某些网站登陆时插件误杀登陆验证的页面需要,防止不能正常登陆。并无没有收集用户的任何信息
 if (GM_getValue('allconfig').baidu.kgpingbis==true){
 	  let iframehost=window.location.host;
 	  $("iframe").each(function(){
 	  	 if ($(this).attr("src")){
 	  	 	 let iframesrc=$(this).attr("src");
 	   for(let i = 0; i < kgpingbiswhiteurl.length; i++) {
      	  	   if (iframesrc.indexOf(kgpingbiswhiteurl[i])>=0){
      	  	   	   kgpingbiswhitezt=false;
      	  	   	   }
      }
 	  	   if ($(this).attr("src").indexOf("http")==0 && $(this).attr("src").indexOf(iframehost)<0 && kgpingbiswhitezt){
 	  	   	   $(this).remove();
 	  	  }
 	  	 	 }  else{
 	 $(this).remove();
 	  	 	 }

 	  })
 }
 if(zkdurldomain.indexOf(wanweibaike) >= 0  ){
 	   $(".real-all-mask").css("position","unset");
 	   $("#page-report-modal").css("display","none");
}
 if(zkdurldomain.indexOf(csdn) >= 0  ){
 	 	 if ($("span[class='hide-preCode-bt']").length>0  ){
 	 	 $("span[class='hide-preCode-bt']").click();
 	 }
$("div[class='wwads-cn wwads-vertical']").remove();
$("#blogExtensionBox").remove();

$("iframe[src*='//kunpeng-sc.csdn']").remove();
$("div[class='passport-login-container']").remove();
$("div[id='kp_box_blog_up']").remove();
$("div[id='kp_box_www_swiper']").remove();
$(".ad_fullWidth").remove();
$("div[class='weixin-shadowbox wap-shadowbox']").css("display","none");
$("div[class='hide-article-box hide-article-pos text-center']").css("display","none");
 $("div[id='article_content']").css({"overflow":"auto" ,"height":"auto"});

$("div[class='readall_box']").css("display","none");
$("div[class='article_content']").css({"overflow":"auto" ,"height":"auto"});
$('body').on('click','.hljs-button.signin,.unlogin-comment-bt',function(){
 window.location.href="//passport.csdn.net/login";
    })
  if(zkdurldomain.indexOf('ink.csdn.net/?target=') >= 0  ){
 	 if($("a[class='loading-btn']").length>0  ){
 window.location.href=$("a[class='loading-btn']").attr("href");
  }
  }

 }
 if(zkdurldomain.indexOf(weibourl) >= 0  ){
		 $("div[class='vue-recycle-scroller__item-view']").each(function(k,v){
    let zxcvlkw=$(this).find(".wbpro-feed-content").text();
    let bhnm=0;
     for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
          bhnm=1;
         }
             }
             	   if (GM_getValue('allconfig').baidu.kgweibomv==true){
   if ($(this).find(".wbpv-tech") && bhnm==0){
    if($(this).find(".wbpv-tech").attr('src') ){
    		if ($(this).find(".wbpv-tech").attr('data_zt') ){
   	   }else{
   	         $(this).find(".wbpro-feed-content").find("div:first").find("a:last").after('<a target="_blank"   href="'+$(this).find(".wbpv-tech").attr('src')+'">➦下载视频</a>');
   	   $(this).find(".wbpv-tech").attr('data_zt','0');
   	   }
    	}
    	}
   }
})
	   if (GM_getValue('allconfig').baidu.kgweibomv==true){
if(zkdurldomain.indexOf(weibourl) >= 0 &&  zkdurldomain.indexOf("/tv/show/") >= 0   ){
	 if($(".wbpv-tech").length>0  ){
	   if($(".wbpv-tech").attr('src') ){
    		if ($(".wbpv-tech").attr('data_zt') ){
   	   }else{
   	   $(".wbpv-tech").attr('data_zt','0');
   	      $("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>');

   	        	   }
    	}
}
}
	 }
}

 if(zkdurldomain.indexOf(biliurl) >= 0 && GM_getValue('allconfig').baidu.kgbiliad==true){
 	 $(".video-list-item > .bili-video-card").each(function(k,v){
    let zxcvlkw=$(this).text();
      for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).hide();
         }
             }
})
 }

 if(zkdurldomain.indexOf('bilibili.com/video/') >= 0 && GM_getValue('allconfig').baidu.kgbiliad==true){
 $("div[class='comment-list ']").find(".list-item.reply-wrap ").each(function(k,v){
     let zxcvlkw=$(this).find("p[class='text']").text().replace(/\ +/g,"");
     //主题
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
$("div[class='user']").each(function(h,j){
     let zxcvlkw=$(this).find("span[class='text-con']").text().replace(/\ +/g,"");
    // console.log(zxcvlkw);
     //评论
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})

 }
  if(zkdurldomain.indexOf('zhihu.com/question') >= 0 && GM_getValue('allconfig').baidu.kgbiliad==true){
 $("div[role='list']").find(".List-item").each(function(k,v){
     let zxcvlkw=$(this).find("div[class='RichContent-inner']").text().replace(/\ +/g,"");
     let zhdazhu=$(this).find("span[class='UserLink AuthorInfo-name']").text();
     zxcvlkw=zxcvlkw+zhdazhu;
    //console.log(zxcvlkw);
     //问题回答
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }


             	 if ( $(this).find("li").length>0){
  //问题评论
             	   	    $(this).find("li").each(function(h,j){
   let zxcvlkw=$(this).find("div[class='CommentRichText CommentItemV2-content']").text().replace(/\ +/g,"");
     let zhdazhu=$(this).find("a[class='UserLink-link']").text();
     zxcvlkw=zxcvlkw+zhdazhu;
   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
             	   	    	})
             }


})


 }
     if(zkdurldomain.indexOf(doubanaurl) >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
 	 $("div[class='root']").find(".item-root").each(function(k,v){
    let zxcvlkw=$(this).find(".title").text();
// console.log(zxcvlkw);
      for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();

         }
             }
})
 }

     if(zkdurldomain.indexOf(doubanurl) >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
 	 $("div[class='result-list']").find(".result").each(function(k,v){
    let zxcvlkw=$(this).find("h3").text();
      for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
 }

  if(zkdurldomain.indexOf('douban.com/group/') >= 0 && GM_getValue('allconfig').baidu.kgdoubanad==true){
 $("table[class='olt']").find("tr").each(function(k,v){
    let zxcvlkw=$(this).text().replace(/\ +/g,"");
    	//主题
  	//console.log(zxcvlkw);
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
$("ul[class='topic-reply']").find("li").each(function(k,v){
    let zxcvlkw=$(this).text().replace(/\ +/g,"");
  	//评论
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
 }

 //主页推荐
   if(zkdurldomain.indexOf(youurl) >= 0 && GM_getValue('allconfig').baidu.kgyouad==true){
 $("ytd-rich-item-renderer[class='style-scope ytd-rich-grid-row']").each(function(k,v){
    let zxcvlkw=$(this).text().replace(/\ +/g,"");
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
//搜索结果
 $("ytd-video-renderer[class='style-scope ytd-item-section-renderer']").each(function(k,v){
    let zxcvlkw=$(this).text().replace(/\ +/g,"");
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
	//评论
 $("ytd-comment-thread-renderer[class='style-scope ytd-item-section-renderer']").each(function(h,j){
    let zxcvlkw=$(this).text().replace(/\ +/g,"");
  	   for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
 }

   if(zkdurldomain.indexOf(zhihuurl) >= 0 && GM_getValue('allconfig').baidu.kgzhihuad==true){
 	 $("div[class='List']").find(".Card.SearchResult-Card").each(function(k,v){
    let zxcvlkw=$(this).find(".Highlight").text();
  for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
 }

  if(zkdurldomain.indexOf(weixinurl) >= 0 && GM_getValue('allconfig').baidu.kgweixinad==true){
 	 $("ul > li").each(function(k,v){
    let zxcvlkw=$(this).text();
    for(let b in GM_getValue('allconfig').pingbikw){
         if (zxcvlkw.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(this).remove();
         }
             }
})
 }

 if(zkdurldomain.indexOf(kuaizixun) > 0 ){


$(".unslider-ad").remove();
$("li[class*='recommend__item--gg--video']").remove();
$("div[class*='lawnfooter-image__panel']").remove();
$("div[class*='open-screen__ad']").remove();
 $("iframe[src*='mediav.com']").remove();
 $("div[class='card default detail--v3 default clearfix img--3']").hide();
 $("div[class='card default detail--v3 default clearfix img--0']").hide();
 $("div[class='kzx__showcase kzx__showcase--normal']").hide();
 $("div[class='right_aside_wrapper float--left']").hide();
 $("div[class='position--fixed--right--bottom  ']").hide();
 $("div[class='content__block clearfix']").hide();
 $("li[class='aside__item float--left recommend__item recommend__item--gg gg-subscript']").hide();
 $("div[class='bkg-block']").hide();
 $("div[class='recommend__item--gg']").hide();
 $("a[class='article__content__textgg']").hide();
 $("div[class='g4 ']").hide();

  $(".recommend-article__wrapper").hide();
  $("div[data-ggsrc]").remove();


}



 }
function delgoogle() {

	  if(zkdurldomain.indexOf('google.com') > 0  && zkdurldomain.indexOf('/search?') > 0){

    	   if ( $('#bingconfig_btn').length>0){
  	   }  else{
  	   	    $('#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>');
  	   }

  	    $($("div[id='rso']")).find("div[lang*='zh-']").each(function(zxb,hfd){
  	    	 let urlxzv="";
  	    	   let urlxzt="";
  	    	 urlxzv=$(hfd).find("a").attr("href");
 	  urlxzt=$(hfd).text();
    let pingbijc=0;
     if (urlxzv){
    if (GM_getValue('allconfig').baidu.kggooglead==true){
    	    	   $("a[href*='http']").each(function() {
    	   	   if ( $(this).attr("zlogo")){}else{
    	   	   	 if ( $(this).find("h3").length>0){
    	   	   	 	 let logurl=$(this).attr("href");
    	    let urldomain = logurl.split("/");
let urldofavicon = "";
if( urldomain[2] ) {
 urldofavicon="https://favicon.yandex.net/favicon/v2/"+urldomain[2]+"?size=32";

	}
$(this).attr("zlogo","1");
$(this).find("h3").prepend('<div style="border-radius: 1%;display: inline-block; width: 20px; height: 20px; position: relative; top: 3px;background: rgba(0, 0, 0, 0);margin-right: 8px;"><img  style="max-width:24px;" src="'+urldofavicon+'"  ></div>');

    	   	   	 }
    	   	   	 }
        })
    	    if (GM_getValue('allconfig').baidu.baidulianjie==true){
         for(let b in GM_getValue('allconfig').pingbiurl){
         if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
           $(hfd).remove();
             pingbijc=1;
         }
             }
    }

  if ( pingbijc==0  ){
         for(let b in GM_getValue('allconfig').pingbikw){
         if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(hfd).remove();

         }
             }
    }
     }
 }

  	     });
	}

     if (GM_getValue('allconfig').baidu.kggoogleed==true){
$(".adsbygoogle").remove();
$("#taw").remove();
$("#bottomads").remove();
$("script[src*='adsbygoogle.js']").remove();
$("script[src*='g.doubleclick.net']").remove();
$("div[id*='google_ads']").remove();
$("div[data-google-query-id]").remove();

 }

}

function bing() {


  if(zkdurldomain.indexOf('bing.com/search?q=') > 0 ){
     if (GM_getValue('allconfig').baidu.kgbinged==true){
  	   $(".b_ad").remove();
   $(".b_algo").each(function() {
   	   let b_algokg=0;
   	   	 if ($(this).find("p")){
		 	  if ($(this).find("p").attr("class")){
		 	  	  b_algokg=1;
		 	  }
		 }
		 	   if ($(this).text().indexOf('广告') >0){
		 	   	   b_algokg=1;
		 	   }
let anum=$(this).find(".b_attribution").children().length;
if (anum==1 && b_algokg==1){
$(this).hide();
}
})
}

    	   if ( $('#bingconfig_btn').length>0){
  	   }  else{
  	   	    $('#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>');
  	   }
     if (GM_getValue('allconfig').baidu.kgbingad==true){
  	    $($("li[class='b_algo']")).each(function(zxb,hfd){

  	    	 let urlxzv="";
  	    	   let urlxzt="";
  	    	 urlxzv=$(hfd).find("h2").find("a").attr("href");
 	  urlxzt=$(hfd).text();
//console.log(urlxzv)
     let pingbijc=0;
     if (urlxzv){
    if (GM_getValue('allconfig').baidu.baidulianjie==true){
         for(let b in GM_getValue('allconfig').pingbiurl){
         if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
           $(hfd).remove();
             pingbijc=1;
         }
             }
    }
    }
  if ( pingbijc==0 && urlxzt ){
         for(let b in GM_getValue('allconfig').pingbikw){
         if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(hfd).remove();

         }
             }
    }


  	     });
  	     	}
	}
	}
function del360() {
 if ( zkdurldomain=='https://www.so.com/' ||  zkdurldomain=='https://www.so.com' ||zkdurldomain.indexOf('www.so.com/?') > 0){
 if (GM_getValue('allconfig').baidu.kg360ed==true){
 	 $("div[class*='open-screen__ad']").remove();
 	 $("#__lawnImageContainer").remove();
 	  if($("div[id='lawnFooterCloseBtn']").length>0  ){
 	  	  $("div[id='lawnFooterCloseBtn']").click();
 	  }
 	   if($("div[id='lawnFooterCloseBtn']").length>0  ){
 	  	  $("div[id='lawnFooterCloseBtn']").click();
 	  }
	  $("#res_news_flow ").find("li").each(function() {
 if ($(this).find("span[class='txt']").length > 0){
      if ($(this).find("span[class='txt']").text()=='广告'){
$(this).remove();
   }
        }
        })
        	}
      	 }
      	  if (zkdurldomain.indexOf('m.so.com/s') > 0 ){
      	  openxcd();
      	  $("div[class^='g-card res-list']").each(function(mindex,mment) {
      	  	     if ( $(this).attr("data-kwkwed")==undefined ){
if ($(this).text()){
	 $(this).attr("data-kwkwed","1");
	            let pingbici=$(this).text();
 if (GM_getValue('allconfig').baidu.kg360ad==true){
         for(let b in GM_getValue('allconfig').pingbikw){
         if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
 $(mment).remove();

         }
             }
  }
}
}
 if ( $(this).attr("data-kwurled")==undefined ){
	 $(this).attr("data-kwurled","1");
   	if ($(this).find("a").attr('href')){
   		let zogourl=decodeURIComponent($(this).find("a").attr('href').replace(/https:\/\/m.so.com\/jump\?u=/g,''));
   	for(let b in GM_getValue('allconfig').pingbiurl){
         if (zogourl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
            $(mment).remove();
         }
             }
$(this).find("a").attr("href",zogourl);
        	}
        	}
        })

      	  }
      	  if (GM_getValue('allconfig').baidu.kg360ed==true){
 	   if (zkdurldomain.indexOf('news.so.com') > 0 ){
 	   	   $("li[data-from='ad']").remove();
 	   }
 	      if (zkdurldomain.indexOf('tv.360kan.com') > 0 ){
 	   	   $("li > div[data-so-mod='list-ad']").remove();
 	   	   $("li > div[data-so-c='list-ad']").remove();
 	   }
 	     if (zkdurldomain.indexOf('image.so.com') > 0 ){
 	   $("li[class='cell']").each(function() {
 if ($(this).find("s").length > 0){
      if ($(this).find("s").text()=='广告'){
$(this).remove();
   }
        }
        })
 	   }
 	   if (zkdurldomain.indexOf('ly.so.com') > 0 ){
 	   $(".f-list-wrap").find("li").each(function() {
 if ($(this).find("i").length > 0){
 	 $(this).remove();
        }
        })
 	   }
 	     if (zkdurldomain.indexOf('baike.so.com') > 0 ){
  	     $(".right-ad-concern").remove();
  	     $("#J-mod-right-ad-interest").remove();
  	     $("#J-mod-right-recommend").remove();
  	     $(".doc-widget-rightbanner").remove();
   	$("div[class='box-bd cl js-plus-body']").remove();
   	$("div[class='boxwrap").remove();

 	   }
 	      if (zkdurldomain.indexOf('wenku.so.com') > 0 ){
  	     $(".rt-side").remove();
 	   }
 	   if (zkdurldomain.indexOf('m.so.com') > 0 ){

 	   	  $("div[class^='g-ad-card']").remove();
 	   	  $("div[class='tg-wrap").remove();
   $("div[data-so-biz-type]").remove();
 	   }

 	    if (zkdurldomain.indexOf('m.news.so.com') > 0 ){
 	   	  $(".g-card.res-list.has-summary").remove();
 	   }
 	   if (zkdurldomain.indexOf('m.image.so.com') > 0 ){
 	      $("li").each(function() {
 if ($(this).find("div[class='li-txt li-cm li-cm--default']").length > 0){
$(this).remove();
        }
        })
 	   }
 	   if (zkdurldomain.indexOf('m.video.360kan.com/') > 0 ){
 	    $("li[data-so-mod='ad']").remove();
 	    $("li[class='recommend-item recommend-item__cm recommend-item__no-img']").remove();
 	   }
 	   if (zkdurldomain.indexOf('360kan.com') > 0 ){
 	    $("li[data-so-mod='ad']").remove();
 	    $("a[class='link js-ad-curl']").remove();
 	    $("div[class*='info-flow__ad']").remove();
 	     $("div[class*='open-screen__ad']").remove();
 	   }

 	   if (zkdurldomain.indexOf('wenda.so.com') > 0 ){
 	    $("li[class='left-rec-list js-left-flow-busi']").remove();
 	    $("#attention").remove();
 	    $("div[class='mod-detail-normal pt25 hide js-mod-flow ']").remove();
 	    $("article[class='card']").remove();
 	    $("article[class='card-bor']").remove();
 	    $("div[class='busi-article js-busi-article']").remove();
 	    $("div[class='js-relate-list']").remove();
 	     $("ul[class='relate-list']").remove();
 	     $("section[class='g-card recflow-list js-recflow-list']").remove();
 	    $("#js-sd-list").remove();

 	   }
 }
	   if (zkddomain.indexOf('so.com') > 0 && zkdurldomain.indexOf('so.com/s') > 0){
	   	    if ( $("div[class='close").length > 0){
$("div[class='close").click();
        }
	    $('.title.home-nav').attr('href',configm);
   	   $('.title.home-nav').text('控制面板');
   	   $("li[class='m-spread-middle e-buss").remove();
   	   $("#mohe-360pic_ext--normal").remove();


	   $($("li[class='res-list']")).each(function(zx,hfd){
 let urlxzv="";
  let urlxzt="";
 if ($(hfd).children("h3").children("a").attr("data-mdurl")){

  urlxzv=$(hfd).children("h3").children("a").attr("data-mdurl");
 }else{
 urlxzv=$(hfd).children("h3").children("a").attr("href");
 }
 urlxzt=$(hfd).text();
//console.log(urlxzv)
     let pingbijc=0;
     if (urlxzv){
     	    if (GM_getValue('allconfig').baidu.kg360ad==true){
    if (GM_getValue('allconfig').baidu.baidulianjie==true){
         for(let b in GM_getValue('allconfig').pingbiurl){
         if (urlxzv.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
           $(hfd).remove();
             pingbijc=1;
         }
             }
    }

  if ( pingbijc==0){
         for(let b in GM_getValue('allconfig').pingbikw){
         if (urlxzt.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
          $(hfd).remove();

         }
             }
    }
    }
 }
});


     if (GM_getValue('allconfig').baidu.kg360ed==true){
	   	   $("#e_idea_pp").remove();
	   //  $("#side").remove();
	   $("#right_show_top").remove();
	   $("#right_show").remove();
	   $("#so_kw-ad").remove();
	   $("#lm-rightbottom").remove();
	   $("#res-mediav-right").remove();
	   $(".res-mediav-right").remove();
	   	    $("#mohe-360pic_sad--normal").remove();
	   	     $("#e_map_idea").remove();
	   	      $("#e_idea_pp_vip_bottom").remove();
  }


	   }
	        if (GM_getValue('allconfig').baidu.kg360ed==true){
	   	   if(zkddomain.indexOf('so.com') > 0 ){

	   	   $(".aside").remove();

	   	   	    $("#js-bussiness-bot-list").remove();
	   	      $("#js-mod-fixed-inn").remove();
	   	        $("#e_idea_wenda_leftBox").remove();

	}
	  if(zkddomain.indexOf('360kan.com') > 0 ){

 $("li[data-clicklog]").remove();
    }
    }
}
      if (GM_getValue('allconfig').baidu.kgbaidued==true){
   if(zkdurldomain.indexOf('.baidu.com/') > 0){

         setInterval(function(){
     delbaidu()
       },1000);
           }
  }
function openxcd() {
	if (GM_getValue('allconfig').baidu.baidumenu==true    && isMobile() ){
 if($(".zxbcopenxcd").length==0  ){
	$('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/DD5vcRt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LQouD6r4u5trG0U8pZAL1ULMNhp0WXYe2k0vlhOY23hMipwyrxYFQMMdqr0NeCjwAvexYibF7A28DUqemlV1QA3vQfcgD0mOOZdjJTmGLbPb6DiY8urHuCmfcDHgL8AZryLkcLMYPv4Y9Sko09dAgw2qmQXtnP3excjuduP7dtdBD6CKE91CnDTUWxGwU8nv5e4HcX25Seo4f6sY4CbnsFucPwRMOFdjGQ2ge27j2L7spbqHGCwO5P/AFwM/BmBTpsiC7yP7auLsX1XybvLadU9wE2zwN8AvwH8CfCOd0FylnewffPr2L6qdXCbFOCFpoG/Az6CPYI44F2QcADbFx/B9o2eIrRQgJf2Atb17uPAOGo4ZZrBtvnHsX2gzjhLUIC7OwR8BrgQ+DKar7pIR7BtfCG2zYOaRD1ECnB6k8C3sGeNV2OzFp7yLqoCTmHb8mps236LiowUKoMC3JuD2KyFv4ZNPToOTHkXFZEpbJt9CtuGnyPC6WxCMOBdQORmgOeSZQjYBtwEbAaGvYsLzCTWW+pZbEB9bXpLFUkBzs801qHgGezMZgPWof46YL13cU4OAy8BL2LXs2e8C6oaBbgYZ7Cxp69ifXNXANdid1THgCup3rafBV7HToVfAV4GTnoXVXVVa0ShOsn80RlgGbARC/NVwOXAau8iMzoGvAG8hoX2VTSBQukUYB+ngX9LlqblwKVYmC8D1gCjyTLkVOc01ud4Ahso8CYW2rfQTbsgKMDhmGL+tHuxlcyHeSVwPnZa3lyGsf8ABluWoeRXsJtt08mvzWUKu7F0smX5EDjBfGhPeG8U6ez/AUERP4sz2O4fAAAAAElFTkSuQmCC"   style="width: 30px;" >	</div>');
	}
	setTimeout(function(){
            $(".zxbcopenxcd").hide();
        }, 2500);

}
  if (GM_getValue('allconfig').baidu.baidueye==true){
$("html body #page-bd article").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
$("#head,#foot,.se-head-tablink,#relativewords,#page-hd,#page,#rs,#help,.foot-inner").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
$("div[class='res-list g-mohe g-card g-block']").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
$("div[data-kwurled='1']").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
   }
  }
$('body').on('click','.zxbcopenxcd',function(){
  GM_openInTab(configm, {active: !0});
  })
function delbaidu() {
   if(zkddomain.indexOf("baidu.com") > 0 ) {
 
   	 //移动端
   	 if (GM_getValue('allconfig').baidu.kgbaidued==true){
   	 	 var xcbdjc=0;
   	 	   if ((zkdurldomain.indexOf('/s?word') > 0 || zkdurldomain.indexOf('&wd=') > 0 || zkdurldomain.indexOf('?wd=') > 0 || zkdurldomain.indexOf('&word=') > 0)  && zkdurldomain.indexOf('&rtt=') < 0){
   	 	   	   xcbdjc=1;
}
   	   let configurlxz=window.location.href;
if (configurl!=configurlxz && xcbdjc==0){
	configurl=configurlxz;
 window.location.href=configurlxz;
 return
}
 
  if (xcbdjc==1){
   if ( $("div[class='result c-container new-pmd']").length > 0){
  	   	   $("div[class='c-result-content']").each(function(mindex,mment) {
   if ( $(this).find("a[data-click*=':']").length > 0){
   	            if ( $(this).find("a[data-click*=':']").text().indexOf("广告") >=0){
$(this).remove();
 }
 }
  })
        }
  	 $('.toindex').attr('href',configm);
   	 $('.toindex').text('控制面板');
$("#content_right").find(".c-row").remove();

  	    $("#top-ad").remove();
   if (isMobile()){
   	   openxcd();
$('body').on('click','a',function(){
	if ($(this).attr("href")){
	window.location.href=$(this).attr("href");
	}
  })
   	   $("span[ref='open']").parent().parent().remove();
      	  $(".ec_wise_ad").remove();
       $(".ec-result-inner").remove();
        $(".c-result.result[srcid='xcx_multi']").remove();
        $("div[data-module='b']").remove();
         if (GM_getValue('allconfig').baidu.kgbaiduad==true){
$("div[class='c-result-content']").each(function(mindex,mment) {
if ($(mment).text()){
	            let pingbici=$(this).text();
         if ( $(mment).attr("data-kwkwed")==undefined ){
         for(let b in GM_getValue('allconfig').pingbikw){
 $(mment).attr("data-kwed","1");
         if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
 $(mment).remove();
         }
             }
    }

}
    if ( $(mment).attr("data-kwurled")==undefined ){
if ($(mment).find("article")){
	if ($(mment).find("article").attr("rl-link-href")){
let bdzxmurl=$(mment).find("article").attr("rl-link-href");
  GM_xmlhttpRequest({
                  method : "GET",
                 dataType: "json",
                 timeout: 1000,
                url : bdzxmurl,
  onreadystatechange : function (response) {
  	  if (response.responseText){
bdzxmurl=response.responseText.match(/url=(\S*)"/)[1];
$(mment).find("article").attr("rl-link-href",bdzxmurl)
$(mment).find("a").attr("href",bdzxmurl)
 $(mment).attr("data-kwurled","1");
  for(let b in GM_getValue('allconfig').pingbiurl){
         if (bdzxmurl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
	 $(mment).remove();
         }
             }
  	  }

}
})
}
}
}

        })
       }
    }
    }
     }
   //
      if(zkdurldomain=="https://www.baidu.com/"  || zkdurldomain=="https://www.baidu.com" || zkdurldomain.indexOf('www.baidu.com/?') > 0   ) {

      	    $("div[class='san-card'][tpl='feed-ad']").remove();
      	    if (GM_getValue('allconfig').baidu.baiduhot==true){
  $("div[class='hot-news-wrapper']").remove();
  $("#s-hotsearch-wrapper").remove();
}
      	   }
      	    if(zkdurldomain.indexOf('baijiahao.baidu.com/s') > 0   ) {
       if (GM_getValue('allconfig').baidu.baiduhot==true){
     $("div[class^='index-module_topList']").remove();
}
      	    }
   if(zkdurldomain.indexOf('www.baidu.com/s') > 0 && zkdurldomain.indexOf('&rtt=') < 0){
   	   	 if (GM_getValue('allconfig').baidu.kgbaidued==true){
        $("[cmatchid]").remove();
//$("#content_right").remove();

  $("#top-ad").remove();
 $(".ec-pc_mat_c_banner__cc_banner_background_b").remove();//品牌广告模块
}
//右边栏
  if (GM_getValue('allconfig').baidu.baiduhot==true){
  	  $("#con-ar").remove();//热搜
}
$(".layout").remove();
$(".hint_right_middle").remove();
//$("#content_left").css("width","100%");
//$(".c-container").css("width","100%").css("padding-bottom","20px");
       if (GM_getValue('allconfig').baidu.baidueye==true){
$("html body").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
$("#head,#foot,#page,#rs,#help,.foot-inner").css("background-color",GM_getValue('allconfig').baidu.baidueyecolor);
   }
//



 $("div[id='content_left'] >div").each(function(index,element) {
 	 let t = $(element).children(':last-child').children(':last-child').text();

if (t=="广告"){
		 if (GM_getValue('allconfig').baidu.kgbaidued==true){
 $(element).remove();
 }
}
   let xzggbt =$(element).find("span");
 if (xzggbt){
 	 	 if (GM_getValue('allconfig').baidu.kgbaidued==true){
 	 xzggbt.each(function(index,elnt) {
 	 if  ( $(elnt).text()=="广告"){
 	 	  $(element).remove();
 	 }
 	 })
 	 	 }
 }

   let xzbt =$(element).find("h3").find("a");
  	    let durl=xzbt.attr("href");

      if ($(element).attr("d-new") ){
           }else{


  	    	    if (durl){

           if ( durl.indexOf("baidu.com/link?") >0  ){
           	     if  (durl.indexOf("eqid") < 0  ){
                    durl = durl + "&wd=&eqid=";
                  }
             let durltxt=xzbt.text();
           let durlhtml=durltxt;
            let wurl="";
                  GM_xmlhttpRequest({
                  method : "GET",
                 dataType: "json",
                 timeout: 2000,
                url : durl,
  onreadystatechange : function (response) {
  if (response.response){
   var urlzxa2=response.response.match(/URL=\'(\S*)\'/);
   xzbt.attr("href",urlzxa2[1]);
   durl=urlzxa2[1];
    $(element).attr("d-new","1");

    	 if (durl){
    	 let bdvbt = $(element).children(':last-child').find('.c-showurl.c-color-gray');

  if (bdvbt){
  	    let durlvtxt=bdvbt.text();
  	     let addurl=urlzxa2[1];
  //	    console.log(bdvbt.html())
   let addxurldomain = urlzxa2[1].split("/");
     if( addxurldomain[2] ) {
    addxurl=addxurldomain[2];
}
    	 	    if (durlvtxt.indexOf('.') < 0){
    	durlvtxt=durlvtxt+':'+addxurl;
}else{
	durlvtxt=addxurl;
}

bdvbt.text(durlvtxt);
bdvbt.attr('href',durl);
}
if (GM_getValue('allconfig').baidu.kgbaiduad==true){
     	 	   if (GM_getValue('allconfig').baidu.baidulianjie==true){

         for(let b in GM_getValue('allconfig').pingbiurl){
         if (durl.indexOf(GM_getValue('allconfig').pingbiurl[b]) >=0){
	 $(element).remove();
         }
             }
    }
      }
      	       if ($(element).attr("d-lg") ){

           }else{
           	     	$(element).attr("d-lg","1");
     	 let urldomain = durl.split("/");
let urldofavicon = "";
if( urldomain[2] ) {
    urldofavicon=urldomain[0]+"//"+urldomain[2]+"/favicon.ico"
	}

if($(element).find("h3").find("img").attr('src') ) {

  urldofavicon=$(element).find("h3").find("img").attr('src');
}

if (GM_getValue('allconfig').baidu.baidulogo==true){
if($(element).find("h3").find("img").attr('src') ) {
}else{
	$(element).find("h3").find("a").prepend('<div class="c-img c-img-circle c-gap-right-xsmall" style="border-radius: 1%;display: inline-block; width: 20px; height: 20px; position: relative; top: 3px;background: rgba(0, 0, 0, 0);"><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>');
	$(".c-img.c-img-circle.c-gap-right-xsmall").css({"width":"20px" ,"height":"20px"});
}

}

    }
 }
}

}
})
           }
    }

}
      if ($(element).attr("d-old") ){

           }else{
           	    	$(element).attr("d-old","1");
    let pingbijc=0;
 if (GM_getValue('allconfig').baidu.kgbaiduad==true){
         if ( pingbijc==0 ){
         for(let b in GM_getValue('allconfig').pingbikw){
         let pingbici=	 $(element).find("h3").find("a").text()+ $(element).find(".c-abstract").text();
         if (pingbici.indexOf(GM_getValue('allconfig').pingbikw[b]) >=0){
 $(element).remove();
	 pingbijc=1;

         }
             }
    }
  }
     	 }



})

 if (GM_getValue('allconfig').baidu.kgbaidued==true){
   if(zkdurldomain.indexOf("sf/vsearch") < 0 ) {
      $("#content_left").find("div:eq(0)").each(function() {
          let bid = String($(this).attr("id"));
          let bclass = String($(this).attr("class"));
            if (bid == "undefined" && bclass == "undefined" ) {
      $(this).remove();
            }
        })
}
 }

}
  if (GM_getValue('allconfig').baidu.kgbaidued==true){
    if(zkdurldomain.indexOf('zhidao.baidu.com') > 0){
        $(".shop-entrance").remove();
        $(".activity-entry").remove();
        $(".task-list-button").remove();
    }
     if(zkdurldomain.indexOf('zhidao.baidu.com/index/') > 0){
     	    if (isMobile()){
    	   	    $("div[class='ecs-wraper']").remove();
    	   }
     }
    if(zkdurldomain.indexOf('zhidao.baidu.com/search') > 0){
    	    	 if ($("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").length>0){
    	 	  $("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").click();
    	 }
    	   if (isMobile()){
    	   	    $("div[class='ecs-wraper']").remove();
    	   }

        $(".bannerdown").remove();
        $(".aside.fixheight").remove();
        $(".wgt-bottom-ask").remove();
        $(".leftup").remove();
        $(".wgt-iknow-special-business").remove();
    }
    if(zkdurldomain.indexOf('zhidao.baidu.com/question') > 0){

    	 if ($("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").length>0){
    	 	  $("i[class='ariaicon ariaicon-exit ariaexit fixedSelect ariaskiptheme']").click();
    	 }
    	   	   if (isMobile()){
    	    $("div[class='wap-youx-change-asp']").remove();
    	    $("#feed-recommend").remove();
          $("div[class*=ecom-ads']").remove();
          if($(".circusee-bg").length>0  ){
          	$(".circusee-bg").hide();
          	 $("div[class='chat-consult shorten']").css('height','auto');
          }
    }
           if($(".circusee-bg").length>0  ){
          	$(".circusee-bg").hide();
          	 $(".chat-consult-box").css('height','auto');
          }
    	$("#knowledge-answer").remove();
    	$(".grid-r.qb-side").remove();
        $(".wgt-ads").remove();
        $(".wgt-bottom-union").remove();
        $(".adTopImg").remove();
        $(".exp-topwld-tip").remove();
        $("#wgt-ecom-banner").remove();
        $("#wgt-ecom-right").remove();
        $(".question-number-text-chain").remove();
        setTimeout(function(){
            $(".ec-pc_mat_coeus__related_link_text-content").remove();
        }, 1000);
    }

   if(zkdurldomain.indexOf('wapbaike.baidu.com/item') >= 0){
	$("div[class='yitiao-content J-yitiao-content']").remove();
}
    if(zkdurldomain.indexOf('baike.baidu.com') > 0){
        setTimeout(function(){
            $("#navbarAdNew").remove();
            $(".userbar_mall").remove();
        }, 1000);
    }
    if(zkdurldomain.indexOf('baike.baidu.com/item') > 0){

        //$(".before-content").remove(); 百度百科多义词和秒懂百科视频相关
        $(".configModuleBanner").remove();
        setTimeout(function(){
            $(".topA").remove();
            $(".right-ad").remove();
            $(".lemmaWgt-promotion-vbaike").remove();
            $(".lemmaWgt-promotion-slide").remove();
            $("#side_box_unionAd").remove();
        }, 1000);
    }


    if(zkdurldomain.indexOf('wenku.baidu.com') > 0){
        $(".banner-ad").remove();
        $(".ad-box").remove();
        $("#banurl").remove();
        $("#my-wkHome-vip-tips").parent().remove();
        $(".vip-card").remove();
        setTimeout(function(){
            $(".zsj-topbar").remove();
            $(".lastcell-dialog").remove();
            $(".zsj-toppos").remove();
        }, 1000);
    }
    if(zkdurldomain.indexOf('wenku.baidu.com/search') > 0){
        $("#fengchaoad").remove();
         $("div[class='adlist-wrap']").remove();
        $(".yuedu-recommend-wrap").remove();
        $(".search-aside-adWrap").remove();
  $(".fc-first-result-wrap").remove();
    }
            if(zkdurldomain.indexOf('wk.baidu.com/') > 0){
            	$(".fc-result").remove();
           }
             if(zkdurldomain.indexOf('haokan.baidu.com/') > 0){
         	$(".landrightbanner-content").remove();
       }
        if(zkdurldomain.indexOf('wk.baidu.com/view') > 0){
        	if (isMobile()){
	$(".middle-box-root").remove();
	$(".fc-ad-contain").remove();
	$(".shops-hot").remove();
	$(".b-bigpic-root").remove();
	$(".video-rec-wrap").remove();
	$(".shops-hot").remove();
	 $("div[class='new-guideapp-card-btn new-guideapp-card-animation']").remove();
$("div[class='reader-wrap reader-copy']").css('height','auto');
$("#view-app").css('max-height','');

}
        }
    if(zkdurldomain.indexOf('wenku.baidu.com/view') > 0){
if (isMobile()){
	$(".middle-box-root").remove();
	$(".fc-ad-contain").remove();
	$(".shops-hot").remove();
	$(".b-bigpic-root").remove();
	$(".video-rec-wrap").remove();
	$(".shops-hot").remove();
	 $("div[class='fold-pager with-margin']").remove();
$("div[class='reader-wrap reader-copy']").css('height','auto');
$("#view-app").css('max-height','auto');
}
    	 $(".hx-bottom-wrapper").remove();
$(".hx-warp").remove();
$(".fc-fold-page").remove();
$(".hx-recom-wrapper").remove();
 $(".hx-bottom-wrapper").remove();
        $(".relative-recommend-wrapper").remove();
        $(".fc-container").remove();
        $("#ggbtm").parent().remove();
        $(".union-ad-bottom").remove();
        $(".ad-vip-close-bottom").remove();
    	   $(".operation-wrapper").remove();
        $(".relative-course-wrapper").remove();
        $(".hot-search-wrapper").remove();
        $(".hx-right-wrapper").remove();
        $("#relative-videos-wrap").remove();
        $(".add-has-money-pay").remove();
        $(".wk-color-vip-red").parent().parent().remove();
        $(".vip-tips-wrap").parent().remove();
        $(".top-ads-banner-wrap").remove();
        setTimeout(function(){
            $(".wangpan-tip").remove();
            $(".new-user-discount-tip").remove();
            $(".pay-vip-btn-wrap").remove();
            $(".relative-doc-ad-wrapper").remove();
        }, 1000);
        setInterval(function(){
            $(".view-like-recom-fc").remove();
        }, 1000);
    }

 if(zkdurldomain.indexOf('baidu.com/video/page') > 0){
 	$("div[class='na-ec-item']").each(function() {
 if ($(this).find("a[data-type='native_ad']").length > 0){
$(this).remove();
        }
        })
 }
 if(zkdurldomain.indexOf('baidu.com/s?') > 0){
 	 	$("div[class*='c-container ec_resitem']").remove();
 	 	$("span[ref='open']").parent().parent().remove();
 }
 if(zkdurldomain.indexOf('m.baidu.com') > 0 || zkdurldomain.indexOf('www.baidu.com') > 0){
 	 	$("div[style='overflow: hidden;background: #fff;position: relative;']").remove();
 }
 if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=image_content') > 0){
 
 	 	 $("body").on("click","div[class^='c-image-viewer-img']",function(){  
  if($(this).find("img").length>0  ){
 	window.location.href=$(this).find("img").attr("src");	
	 }

 				 })
  $("body").on("click",".icon.icon-download",function(){  
  if($(".c-image-viewer-item-current").find("img").length>0  ){
 	window.location.href=$(this).find("img").attr("src");	
	 }
 				 })
 
 	       $("div[class^='sfc-image-content-waterfall-item']").each(function() {
 if ($(this).find("div[class='sfc-image-content-img-toolbar-ad-text']").length > 0){
$(this).remove();
        }
         if ($(this).find("div[class='commodity-row-item']").length > 0){
$(this).remove();
        } 
        })
 }
  if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=video') > 0){
$("div[data-type='ad']").remove();
 }
   if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=wenku') > 0){
     $("div[data-tpl='adv_wenku_fc']").remove();
 }
   if(zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=tieba') > 0 || zkdurldomain.indexOf('baidu.com/sf/vsearch?pd=wenda_tab') > 0){
$("div[class*='c-container ec-container']").remove();
 }
    if(zkdurldomain.indexOf('image.baidu.com/search/index') > 0){

	  $("li[class='newfcImgli']").remove();
        $("#pnlBeforeContent").remove();
        setInterval(function(){
            $(".fcImgli").remove();
        }, 1000);
    }
    if(zkdurldomain.indexOf('image.baidu.com/search/detail') > 0){
        $(".text-link-ads").remove();
        $(".rsresult-card").remove();
        $("#adCard").remove();
    }


	if(zkdurldomain.indexOf('tieba.baidu.com/sf/vsearch') > 0){
        $("div[class*='c-container ec-container']").remove();
    }
    if(zkdurldomain.indexOf('tieba.baidu.com/f/search') > 0){
        $(".s_aside").remove();
    }
           if(zkdurldomain.indexOf('tieba.baidu.com/p/') > 0){
        	   	   if (isMobile()){
$("div[class='banner-wrapper-defensive']").remove();
$("div[class='fengchao-banner-defensive']").remove();
$("div[class='list-content']").find("div[class='list-content']").remove();
}
        	}
    if(zkdurldomain.indexOf('tieba.baidu.com/f?') > 0){
    	   if (isMobile()){
$("div[class='tb-banner-wrapper-defensive tb-banner tb-threadlist__item']").remove();
}
    		 $("img[class='close_btn j_click_close']").click();
    		 $("div[class='clearfix thread_item_box']").remove();
    		 $("div[class='clearfix thread_item_box']").remove();
    		 $("div[id='fc-wrap']").remove();
    		 $("#mediago-frs-aside").remove();
 $("div[id='aside-ad-wrapper']").hide();
$("div[class='fengchao-wrap-feed']").hide();
    		 $("#mediago-tb-pb-list-aside").remove();
    		 $("div[class='fengchao-wrap']").hide();

      setTimeout(function(){
           $(".fengchao-wrap-box").remove();
 $("div[class='fengchao-wrap']").remove();
 $("div[id*='mediago-tb-']").remove();
$("div[class*='l_post'][data-field='{}']").remove();
$("div[ad-dom-img]").remove();

               }, 1000);



    }
    if(zkdurldomain.indexOf('tieba.baidu.com/p') > 0){
        //setInterval(function(){ }, 1000);
        //$("span:contains('广告')").parent().parent().parent().parent().parent().parent().remove();
      $("#mediago-frs-aside").remove();
    	$("#mediago-tb-pb-list-aside").remove();
    	$("div[class='fengchao-wrap']").hide();
$("div[id*='mediago-tb-']").remove();
$("div[class*='l_post'][data-field='{}']").remove();
$("div[ad-dom-img]").remove();

    }


    if(zkdurldomain.indexOf('map.baidu.com/search') > 0){

        setInterval(function(){
            $(".damoce-search-item.damoce-search-item-nopoi").remove();
        }, 1000);
    }


    if(zkdurldomain.indexOf('jingyan.baidu.com/search') > 0){
        $(".ec_ad").parent().remove();
    }
    if(zkdurldomain.indexOf('jingyan.baidu.com/article') > 0){
        $("#fresh-share-exp-e").remove();
        $(".wgt-income-money").remove();
        $(".aside-pro-container").remove();
        $("#bottom-ads-container").remove();
        $(".magzine-list").remove();
        $("div[class='aside-wrap wgt-cms-banner']").hide();
        $("div[class='right-fixed-related-wrap']").hide();
        $("div[class='ad-card']").hide();
        $("aside[class='rel-exp-feed-ad-item']").hide();
    }



    if(zkdurldomain.indexOf('video.baidu.com') > 0 || zkdurldomain.indexOf('v.baidu.com') > 0){
        setTimeout(function(){
        	 $("#PCallpagesidebar1").remove();
            $("#PCallpagesidebar2").remove();
            $(".bdvideo-adver-carousel").parent().remove();
            $("div[id*='adone']").remove();
            $("div[id*='adtwo']").remove();
            $("#pallcommoncolumnad").remove();
            $("#index_right_top").remove();
            $("#qzfcadid").remove();
            $("#pcshortchannelTopRight").remove();
            $("#__lawnImageContainer").parent().parent().remove();

            $("#detail_adm_right").remove();
            $(".ctt-adver1-banner").remove();
            $("div[id*='PCDetailPageTopRightList']").remove();


        }, 1000);
        setInterval(function(){
        	   $("div[id*='channelBannerAdver']").remove();
            $("div[id*='channelColumn']").parent().remove();
            $("div[id*='ChannelColumn']").parent().remove();
            $("div[id*='pc']").remove();
            $("div[id*='PC']").remove();
            $("div[id*='adv-carousel-item']").parent().remove();
            $("[id*='FeedAdSys']").remove();
            $("div[id*='TabAd']").remove();
            $(".section-ad").remove();
            $(".full-collunm-ad").remove();



        }, 1000);
    }
    if(zkdurldomain.indexOf('video.baidu.com/v') > 0 || zkdurldomain.indexOf('v.baidu.com/v') > 0){

        $(".top-ad-cont").remove();
        setTimeout(function(){

            $("div[id*='searchMoreLong']").remove();
            $("#searchPagefeedBanner").remove();
            $(".side-content").remove();
            $("#psBottomColumn").parent().remove();
        }, 1000);
        setInterval(function(){

            $("#searchResultAdOne").remove();
            $("#searchHotShortSeven").remove();
            $("#searchHotShortSevenTwo").remove();
        }, 1000);
    }
    if(zkdurldomain.indexOf('www.baidu.com/sf/vsearch') > 0){

        $("#s_tab").next().next().each(function() {
            var id = String($(this).attr("id"));
            if (id == "undefined") {
                $(this).remove();
            }
        })
    }
     }
 }
  }
 function delzhihu() {
 if(zkdurldomain.indexOf('zhihu.com') > 0){
   if (GM_getValue('allconfig').baidu.kgzhihued==true){
   	   $("div[class='Pc-card Card']").remove();
   	    if(zkdurldomain.indexOf('zhihu.com/signin?') > 0){
   	    	window.location.href='https://www.zhihu.com/knowledge-plan/hot-question/hot/0/day';
   	        }
   	   $(".css-1hwwfws").hide();
   	   $(".css-1ynzxqw").hide();
   	   	   if (isMobile()){
        $("a[class='MBannerAd']").remove();
        $("a[class='MHotFeedAd']").remove();
        $("div[class='Card RelatedReadings']").remove();
    }

$("html").bind("DOMNodeInserted",function(e){

 		   if ( $(".Button.Modal-closeButton.Button--plain").length>0 && $(".signFlowModal-container").length>0 &&  zhihudl==0){
 		   	   zhihudl=1;
 		   	   $(".Button.Modal-closeButton.Button--plain").click();
  	   }

})

 $(".Pc-word").hide();
  $(".Pc-card.Card").hide();


         $(".Pc-feedAd").remove();
$(".Banner-adsense").remove();

$("img").each(function(){

      if ($(this).attr("alt")=="广告"){

  $(this).remove();

  }
});
    }
 }
}


 function delbili() {
if(zkdurldomain.indexOf('bilibili.com') > 0){

	   if (GM_getValue('allconfig').baidu.kgbilied==true){
$("div[class='flip-view p-relative over-hidden w-100']").remove();
if (bili22girl==true  && $("button[class='minimize-btn pointer bg-contain']").length>0){
	$("div[class='haruna-ctnr none-select']").hide();
	bili22girl=false;
		   }
 $(".bili-video-card").each(function() {
 	 if ($(this).find("a")){
 	  if ($(this).find("a").attr('href')){
 	  if ($(this).find("a").attr('href').indexOf('cm.bilibili.com/cm/api/fees') > 0){
 	  $(this).hide();
 	 }
 	 }
 	 }
	   	           	})
        $("a[target='_blank']").each(function() {
           if ($(this).attr('href')) {
           	    if($(this).attr('href').indexOf('cm.bilibili.com/cm/api/fees') > 0){
           	    	 $(this).hide();

           	    }
            }

        })
    }
  }
}

 function deldouban() {
 if(zkdurldomain.indexOf('douban.com') > 0){
// $('div[ad-status]').attr('ad-status')
  if (GM_getValue('allconfig').baidu.kgdoubaned==true){
        $('div[ad-status]').each(function() {
            if ($(this).attr('ad-status') == "appended") {
                $(this).remove();
            }
        })
    }
 }
}
 //test


    function closeytAds(){
        var adclose = document.querySelector('.ytp-ad-skip-button')||document.querySelector('.ytp-ad-overlay-close-button');
        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');
          if (GM_getValue('allconfig').baidu.kgyoued==true){
        if(adybremove){
            adybremove.remove();
        }
        }
        if(adclose){
            adclose.click();
        }
    }
        function getytvele(){
    if($('div#info-contents').length>0){
       // addbtn();
    }else{
    setTimeout(getytvele,500);
    }
    }
      function inybit(){
        document.querySelector('ytd-popup-container').style.display='';
        document.querySelector('ytd-app').style.zIndex='';
    }
        function reytb(){
        closeytAds();

        if(location.href!==zkdurldomain)
        {

        inybit();
        zkdurldomain=location.href;
        getytvele();
        }

    }
    if(zkdurldomain.indexOf("youtube.com") >= 0 ) {

      setInterval(function(){
     reytb();
     reydown();
       },1500);
    }
      setInterval(function(){
     deltwitter()
       },1500);


     function deltwitter() {
    if(zkdurldomain.indexOf("twitter.com") >= 0 ) {

 $("article").each(function(index,element) {
  if ($(element).attr("d-twitter") ){

           }else{
   let xzggtt =$(element).find("span");
 if (xzggtt){
 	 xzggtt.each(function(index,elnt) {
 	 if  ( $(elnt).text()=="推荐"){
 	 	  if (GM_getValue('allconfig').baidu.kgtwied==true){
 	 	  $(element).remove();
 	 	   }
 	 }
 	 })
 }
   }

     let xzggaurl =$(element).find("a");
      let xzggavideo =$(element).find("video");
       let xzggatime =$(element).find("time");

 if (xzggaurl && xzggavideo){
 	  if ($(element).attr("d-vurl") ){

           }else{
 	if (xzggatime.length<2){
 		 xzggavideo.each(function(index,vurl) {
 	 if  (  $(vurl).attr('preload')){
 	 	   if ($(vurl).attr("d-vurl") ){

           }else{
 	 xzggaurl.each(function(index,aurl) {
 	 if  ( $(aurl).attr('href')){
 	 	   if ($(vurl).attr("d-vurl") ){

           }else{
   if (GM_getValue('allconfig').baidu.kgtwimv==true){
  if ($(aurl).attr('href').indexOf("status") >= 0 ) {
  	  let videourl = $(aurl).attr('href');
videourl = videourl.match(/status\/(\S*)/)[1];
videourl="https://twitter.com/i/status/"+videourl;

 	   	    $(vurl).attr("d-vurl","1");
 	    $(vurl).attr("d-video",videourl);
 	    $(element).attr("d-vurl","1");
 	    $(element).find("div[role='group']").each(function(index,downbut) {
 	    	//$(downbut).remove();
 	    	 $(downbut).before('<div style="margin-top: 10px;"><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>'  );


	 	    	})
 }
 	   	    }
 	    }
 	 }
 	 })
 	 	 }
 	 }
 	  //   console.log('')
 	 	 })
 	 }
 	  }
 }
 $(element).attr("d-twitter","1");

 })


 }
    }



    $('body').on('click','#gogoxvideoa',function(){
    	 GM_setValue('gogoxvideodown', $(this).attr('data-url'));
    	window.open("https://www.getfvid.com/zh/twitter");
    })
    $('body').on('click','#gogoxvideob',function(){
    	 GM_setValue('gogoxvideodown', $(this).attr('data-url'));
    	window.open("https://9convert.com");
    })
    $('body').on('click','#gogoxvideoc',function(){
    	 GM_setValue('gogoxvideodown', $(this).attr('data-url'));
    	window.open("https://www.y2mate.com/download-youtube");
    })
    $('body').on('click','#gogoxvideod',function(){
    	 GM_setValue('gogoxvideodown', $(this).attr('data-url'));
    	window.open("https://superparse.com");
    })

      function reydown(){
    	  if(location.href.indexOf("youtube.com/watch?") >= 0 ) {
   if (GM_getValue('allconfig').baidu.kgyoumv==true){
  if ($("a[class='gogoxvideo']").attr('data-url')==location.href){
  	  return;
}  else {
	$(".gogoxvideo").remove();
 var basebtn = '<div style="margin-top:8px;" ><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+'">下载视频线路一</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+'">高清线路二</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+'">高清线路三</a></div>';
  $('div#info-contents').after(basebtn);
}

 }

    }
    }
      if(location.href.indexOf("9convert.com") >= 0 ) {
  	  if (GM_getValue('gogoxvideodown')){
  $("input[name='query']").attr('value',GM_getValue('gogoxvideodown'));
  GM_deleteValue('gogoxvideodown');
     setTimeout(function(){
   $(".btn-red").click();
        }, 500);

  	  }

    }

    if(location.href.indexOf("y2mate.com/") >= 0 && location.href.indexOf("/download-youtube") >= 0 ) {
  	  if (GM_getValue('gogoxvideodown')){
  $("input[name='query']").attr('value',GM_getValue('gogoxvideodown'));
  GM_deleteValue('gogoxvideodown');
     setTimeout(function(){
   $("button[id='btn-submit']").click();
        }, 500);

  	  }

    }

  if(location.href.indexOf("superparse.com") >= 0 ) {
  	  if (GM_getValue('gogoxvideodown')){
  $("input[name='url']").attr('value',GM_getValue('gogoxvideodown'));
  GM_deleteValue('gogoxvideodown');
     setTimeout(function(){
     $("button[class='btn']").click();
        }, 500);

  	  }

    }
      if(location.href.indexOf("getfvid.com/zh/twitter") >= 0 ) {
  	  if (GM_getValue('gogoxvideodown')){
  $("input[name='url']").attr('value',GM_getValue('gogoxvideodown'));
  GM_deleteValue('gogoxvideodown');
     setTimeout(function(){
     $("button[id='btn_submit']").click();
        }, 500);

  	  }

    }
 //test
    })()