【看片神器】全网VIP视频免费解析,可配置自动解析,选择自动解析,自动去除广告

爱奇艺、腾讯、优酷、芒果等全网VIP视频免费破解去广告;B站大会员,番剧解锁;B站、A站视频解析下载;

// ==UserScript==
// @name              【看片神器】全网VIP视频免费解析,可配置自动解析,选择自动解析,自动去除广告
// @namespace         https://www.zbhui.cn
// @version           1.1.6
// @description       爱奇艺、腾讯、优酷、芒果等全网VIP视频免费破解去广告;B站大会员,番剧解锁;B站、A站视频解析下载;
// @author            zbhui.cn
// @match           *://xbeibeix.com/api/bilibili/biliplayer/*
// @match           *://xbeibeix.com/api/bilibili/*
// @match           *://*.youku.com/v_*
// @match           *://*.iqiyi.com/v_*
// @match           *://*.iqiyi.com/w_*
// @match           *://*.iqiyi.com/a_*
// @match           *://*.le.com/ptv/vplay/*
// @match           *://v.qq.com/x/cover/*
// @match           *://v.qq.com/x/page/*
// @match           *://v.qq.com/tv/*
// @match           *://*.tudou.com/listplay/*
// @match           *://*.tudou.com/albumplay/*
// @match           *://*.tudou.com/programs/view/*
// @match           *://*.mgtv.com/b/*
// @match           *://film.sohu.com/album/*
// @match           *://tv.sohu.com/v/*
// @match           *://*.acfun.cn/v/*
// @match           *://*.bilibili.com/video/*
// @match           *://*.bilibili.com/bangumi/play/*
// @match           *://*.baofeng.com/play/*
// @match           *://vip.pptv.com/show/*
// @match           *://v.pptv.com/show/*
// @match           *://www.le.com/ptv/vplay/*
// @match           *://vip.1905.com/play/*
// @match           *://www.wasu.cn/Play/show/*
// @match           *://www.acfun.cn/v/*
// @match           *://m.v.qq.com/x/cover/*
// @match           *://m.v.qq.com/x/page/*
// @match           *://m.v.qq.com/*
// @match           *://m.iqiyi.com/*
// @match           *://m.iqiyi.com/kszt/*
// @match           *://m.youku.com/alipay_video/*
// @match           *://m.mgtv.com/b/*
// @match           *://m.tv.sohu.com/v/*
// @match           *://m.film.sohu.com/album/*
// @match           *://m.le.com/ptv/vplay/*
// @match           *://m.pptv.com/show/*
// @match           *://m.acfun.cn/v/*
// @match           *://m.bilibili.com/video/*
// @match           *://m.bilibili.com/anime/*
// @match           *://m.bilibili.com/bangumi/play/*
// @match           *://m.wasu.cn/Play/show/*
// @match        *://*.jd.com/*
// @match        *://*.jd.hk/*
// @match      *://*.jkcsjd.com/*
// @match        *://*.taobao.com/*
// @match        *://*.taobao.hk/*
// @match        *://*.tmall.com/*
// @match        *://*.tmall.hk/*
// @match             *://chaoshi.detail.tmall.com/*
// @match             *://*.liangxinyao.com/*
// @match             *://*.yiyaojd.com/*
// @exclude       *://login.taobao.com/*
// @exclude       *://pages.tmall.com/*
// @exclude       *://uland.taobao.com/*
// @require           https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
// @require      https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js
// @require https://greasyfork.org/scripts/451606-%E7%BA%A2%E5%8C%85%E5%BA%93/code/%E7%BA%A2%E5%8C%85%E5%BA%93.js
// @grant             unsafeWindow
// @grant             GM_openInTab
// @grant             GM.openInTab
// @grant             GM_getValue
// @grant             GM.getValue
// @grant             GM_setValue
// @grant             GM.setValue
// @grant        GM_addStyle
// @grant             GM.xmlHttpRequest
// @grant             GM_registerMenuCommand
// @license           GPL License
// ==/UserScript==
(function() {
	'use strict';

	var index_num = 0,item = [],urls = [],
	playerList=[
            {"name":"诺诺","type": "1-2","url":"https://www.ckmov.com/?url="},
            {"name": "虾米", "type": "1-2", "url": "https://jx.xmflv.com/?url="},
            {"name": "M3U8TV", "type": "1-2", "url": "https://jx.m3u8.tv/jiexi/?url="},
           // {"name": "m1907", "type": "1-2-3", "url": "https://z1.m1907.cn/?jx="},
            {"name": "Player-JY", "type": "1-2-3", "url": "https://jx.playerjy.com/?url="},
            {"name": "OK", "type": "3", "url": "https://api.okjx.cc:3389/jx.php?url="},
            {"name": "OKJX", "type": "3", "url": "https://okjx.cc/?url="},
            {"name": "MAO", "type": "1", "url": "https://www.mtosz.com/m3u8.php?url="},
            {"name": "爱豆", "type": "3", "url": "https://jx.aidouer.net/?url="},
            {"name": "夜幕", "type": "1-2-3", "url": "https://www.yemu.xyz/?url="},
            {"name": "4kdv", "type": "1-2-3", "url": "https://jx.4kdv.com/?url="},
            {"name": "1717", "type": "1-3", "url": "https://ckmov.ccyjjd.com/ckmov/?url="},
            {"name": "qianqi", "type": "1-2-3", "url": "https://api.qianqi.net/vip/?url="},
            {"name": "laobandq", "type": "1-2", "url": "https://vip.laobandq.com/jiexi.php?url="},
            {"name": "CK", "type": "1-2", "url": "https://www.ckplayer.vip/jiexi/?url="},
            {"name": "盘古", "type": "1-2", "url": "https://go.yh0523.cn/y.cy?url="},
            {"name": "解析la", "type": "1-2-3", "url": "https://api.jiexi.la/?url="},
            {"name": "H8", "type": "1-2", "url": "https://www.h8jx.com/jiexi.php?url="},
            {"name": "17云", "type": "1-2", "url": "https://www.1717yun.com/jx/ty.php?url="},
			{"name": "pangu", "type": "1-2", "url": "https://www.pangujiexi.cc/jiexi.php?url="},
            {"name": "七彩", "type": "1-2-3", "url": "https://www.xymav.com/?url="},
			{"name":"七哥", "type": "1-2-3","url":"https://jx.mmkv.cn/tv.php?url="},
			{"name":"ckmov","type": "1-2","url":"https://www.ckmov.vip/api.php?url="},
			{"name":"playerjy/B站","type": "1-2-3","url":"https://jx.playerjy.com/?url="},
			{"name":"BL","type": "1-2","url":"https://vip.bljiex.com/?v="},
			{"name":"盖世","type": "1-2-3","url":"https://www.gai4.com/?url="},
			{"name":"8090","type": "1-2","url":"https://www.8090g.cn/?url="},
			{"name":"诺讯","type": "1-2","url":"https://www.nxflv.com/?url="},
			{"name": "Blbo", "type": "1-3", "url": "https://jx.blbo.cc:4433/?url="},
            {"name": "无名小站", "type": "1-2-3", "url": "https://www.administratorw.com/video.php?url="},
			{"name": "综合/B站", "type": "1", "url": "https://jx.bozrc.com:4433/player/?url="},

        ],
		node=[
			{"url":"w.mgtv.com","type": "1","node":"#mgtv-player-wrap"},
			{"url":"www.mgtv.com","type": "1","node":"#mgtv-player-wrap"},
			{"url":"m.mgtv.com","type": "2","node":".mg-video"},
			{"url": "www.iqiyi.com","type": "1","node": "#flashbox"},
			{"url":"www.iq.com","type": "1","node":".intl-video-wrap"},
			{"url": "m.iqiyi.com","type": "2","node": ".m-video-player"},
			{"url":"v.youku.com","type": "1","node":"#player"},
			{"url":"m.youku.com","type": "2","node":".ykplayer"},
			{"url":"v-wb.youku.com","type": "1","node":"#player"},
			{"url":"vku.youku.com","type": "1","node":"#player"},
			{"url":"video.tudou.com","type": "1","node":".td-playbox"},
			{"url":"v.qq.com","type": "1","node" :"#player-container|#mod_player|.container-player"},//"node": "#mod_player"
			{"url":"m.v.qq.com","type": "2","node": "#player"},
			{"url":"3g.v.qq.com","type": "2","node": "#mod_player"},
			{"url":"tv.sohu.com","type": "1","node":"#player"},
			{"url":"pad.tv.sohu.com","type": "2","node":"#player"},
			{"url":"m.tv.sohu.com","type": "2","node":".x-player"},
			{"url":"film.sohu.com","type": "1","node":"#playerWrap"},
			{"url":"www.acfun.cn","type": "1","node": "#player"},
			{"url":"m.fun.tv","type": "2","node": "#j-player-layout"},
			{"url":"fun.tv","type": "1","node": "#html-video-player-layout"},
			{"url":"www.le.com","type": "1","node":"#le_playbox"},
			{"url":"m.le.com","type": "2","node":"#j-player"},
			{"url":"vip.1905.com","type": "1","node":"#player"},
			{"url":"v.pptv.com","type": "1","node":"#pptv_playpage_box"},
			{"url":"vip.pptv.com","type": "1","node":".w-video"},
			{"url":"m.pptv.com","type": "2","node":".p-video"},
			{"url":"www.wasu.cn","type": "1","node":"#flashContent"},
			{"url":"www.bilibili.com","type": "1","node":"#player_module|#bilibiliPlayer"},
			{"url":"m.bilibili.com","type": "2","node":".player-wrapper"},

		];

	const tools={
		sleep:(time)=>{
			return new Promise((resolve) => setTimeout(resolve, time));
		},
		trim:(str)=>{
			return str.replace(/(^\s*)|(\s*$)/g, "");
		},
		GetQueryString:(name)=>{
			let reg = eval("/" + name + "/g");
			let r = window.location.search.substr(1);
			let flag = reg.test(r);
			if (flag) {
				return true;
			} else {
				return false;
			}
		}
	};
	const video={
		isAuto:false,
		isAutoPlayer:'',
        isMobile:false,
		adVideoList:[],
        videoList:[],
		tm:null,
		adtm:null,
        flag:false,
		cur:{
			x: 0,
			y: 0
		},
		nx:0,
        ny:0,
        dx:0,
        dy:0,
        x:0,
        y:0,
        div2:0,
		playerParse:$("<div id='iframe-play-div' style='width:100%;height:100%;z-index:1000;'><iframe id='iframe-player' frameborder='0' allowfullscreen='true' width='100%' height='100%'></iframe></div>"),
		player:'',
		host:window.location.host,
		href:window.location.href,
		isVip:false,
		currentVideo:null,
		initCss:()=>{
			GM_addStyle(`
			#vbox {cursor:pointer; position:fixed; top:10px; left:5px; width:0px; z-index:2147483647; font-size:16px; text-align:left;}
			#vip_movie_box .item_text {}
			#vbox .item_text .img_box{width:26px; height:35px;line-height:35px;text-align:center;background-color:#E5212E;}
			#vbox .item_text .img_box >img {width:20px; display:inline-block; vertical-align:middle;}
			#vbox .vip_mod_box_action {display:none; position:absolute; left:26px; top:0; text-align:center; background-color:#272930; border:1px solid gray;}
			#vbox .vip_mod_box_action li{border-radius:2px; font-size:12px; color:#DCDCDC; text-align:center; width:58px; line-height:21px; float:left; border:1px solid gray; padding:0 4px; margin:4px 2px;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;}
			#vbox .vip_mod_box_action li:hover{color:#E5212E; border:1px solid #E5212E;}
			#vbox li.selected{color:#E5212E; border:1px solid #E5212E;}
			#vbox .selected_text {margin-top:5px;}
			#vbox .selected_text .img_box{width:26px; height:35px;line-height:35px;text-align:center;background-color:#E5212E;}
			#vbox .selected_text .img_box >img {width:20px; height:20px;display:inline-block; vertical-align:middle;}
			#vbox .vip_mod_box_selected {display:none;position:absolute; left:26px; top:0; text-align:center; background-color:#F5F6CE; border:1px solid gray;}
			#vbox .vip_mod_box_selected ul{overflow-y: auto;}
			#vbox .vip_mod_box_selected li{border-radius:2px; font-size:12px; color:#393AE6; text-align:center; width:95px; line-height:27px; float:left; border:1px dashed gray; padding:0 4px; margin:4px 2px;display:block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
			#vbox .vip_mod_box_selected li:hover{color:#E5212E; border:1px solid #E5212E;}
			#vbox .default-scrollbar-55678::-webkit-scrollbar{width:5px; height:1px;}
			#vbox .default-scrollbar-55678::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#A8A8A8;}
			#vbox .default-scrollbar-55678::-webkit-scrollbar-track{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#F1F1F1;}
            .close { opacity: 0.3;}
            .close:hover {opacity: 1;}
            .close:before, .close:after {float: right;position: relative;right: 8%;top: 5px;content: ' ';height: 20px;width: 1px;background-color: white;}
            .close:before {transform: rotate(45deg);}
            .close:after {transform: rotate(-45deg);}
			`);
		},
        mvDown:()=>{
            video.flag = true;
            var touch;
            if (event.touches) {
                touch = event.touches[0];
            } else {
                touch = event;
            }
            video.cur.x = touch.clientX;
            video.cur.y = touch.clientY;
            video.dx = video.div2.offsetLeft;
            video.dy = video.div2.offsetTop;
        },
        mvMove:()=>{
            if (video.flag) {
                var touch;
                if (event.touches) {
                    touch = event.touches[0];
                } else {
                    touch = event;
                }
                video.nx = touch.clientX - video.cur.x;
                video.ny = touch.clientY - video.cur.y;
                video.x = video.dx + video.nx;
                video.y = video.dy + video.ny;
                video.div2.style.left = video.x + "px";
                video.div2.style.top = video.y + "px";
                GM_setValue('GM_IX', video.x);
                GM_setValue('GM_IY', video.y);
                //阻止页面的滑动默认事件
                document.addEventListener("touchmove", function() {
                    event.preventDefault();
                }, false);
            }
        },
        mvEnd:()=>{
           video.flag = false;
        },
		rvVideoAD:()=>{
			let i=0,setTm=setInterval(()=>{i>500?clearInterval(setTm):video.adVideoList.forEach((e,t)=>{e.duration!=e.currentTime&&e.setAttribute("src","")})},100);
		},
        rmVideo:()=>{
           try{let t=0,e=setInterval(()=>{t>500?clearInterval(e):video.videoList.forEach((t,e)=>{t.setAttribute("src",""),t.pause()})},100)}catch(t){}

        },
		autoSelect:()=>{
			setInterval(()=>{try{$(".panel-overlay").hide()}catch(e){}let e=location.href;if(e!=video.href){video.href=e;let r=video.isAutoPlayer+video.href;null==document.getElementById("iframe-player")?window.location.href=video.href:(video.rvVideoAD(),video.rmVideo(),$("#iframe-player").attr("src",""),video.player.empty(),video.player.append(video.playerParse),$("#iframe-player").attr("src",r),clearInterval(video.adtm))}},1e3);
		},
		autoPlayer:()=>{
			1==video.isAuto&&""!=video.isAutoPlayer&&null!=video.isAutoPlayer&&(setTimeout(()=>{for(let e of document.getElementsByTagName("video"))video.videoList.push(e)},1200),video.rvVideoAD(),video.rmVideo(),setTimeout(()=>{let e=video.isAutoPlayer+video.href;null==document.getElementById("iframe-player")&&(video.rvVideoAD(),video.player.empty(),video.player.append(video.playerParse)),$("#iframe-player").attr("src",e),clearInterval(video.adtm)},1800));


		},
		initHtml:()=>{
			let img =			`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC9klEQVRoQ+2ZPWgVQRDH/7/CWqOIYOFHFbRSjJhGMGDpByoIago70cqvUtQgdipWFqawMWghGIidhcHKQAJqEURBRfED1CCCjc3IPu4em31775J7d3m8cAtX3O7szP7nPzszx6EeH/T4+VUD6DaDTQbMbE+3D7MY+8Ckkw8BPFuMki7KDtUAuuh9Z3oZMtBljxY2X9eBwq4raWPNQEmOLKxm+TBgZqsknQ1dAVzNco+ZhWsm6ZakHZLC1mQyrZ5OX2RvzMxnSa8lzQJ/YwLzGDCze5JOeoI/gbVtAMxJ6vPW7wKnkr4qbEuaxccDcGWBsfNV0mjMmSGAg5LGA6XbgFehITPbLel5MN84ZAUAUjMPgWO+zZY7YGbvJW0OvRoB8EjSEW9+BhhIvOvCp0wGfPPbgZfpRAzATUnn56GEmJyLd39cBNxeF99FADTa42BskuQef4wDh9oB2CXpRbDpMPA4nTOz05LuBDLrgW+dAACGIkxfkHTDm/8DrMwEkBxgOskkqdwEcMAD4GLf3YF0PACOe+uFGMgA4Bj4EAAbAGbcXLQOmNklSdeCTRuBT2bWL+lNsLYfeFIRgH2SJgJ7GwCXYjMBrJb0K9jUiHEzG5F02VubA9b4skXvQMiAmW2VdFSSn24/As0kk1mJzeyppL3ewaaBnWY2K2mLNz8S5ueCAMLwz3q/DZxreweSe3BC0v1Ai7tkYXrsB96WwMBCAfQBv3MBJCD+SVrhaXaZ54z3PgUMhpYrZKCF7bbNnJk5BhwT6fghyW8thoGxigE4my6tXwemQlt5AGI1oamDSIFLmCuURiW5BOGPL8C7drGV206b2XdJ6yJKxoDhmPKCIeS61ZZClncxFgLAtcyxrnEwRmknDFQFIFYTWnJ/CVmoGgYSj7Z81OR86Lg7sOgPmnY6s0IpN4TyYrDb6zWAmoEOPVCHUIcO7Hh7/YemYxcWU7AMf3BkNGDF/FP9rkwGqjddkoWWv5Ql6V1yNXUdWHKXBwZ7noH/dP+HQNqheToAAAAASUVORK5CYII=`;
			let html1="", html2 = "",option="",checkbox="",selectoption="";
			let gmisauto=GM_getValue('ISAUTO');
			let gmisautoplayer=GM_getValue('ISAUTOPLAYER');
			if(gmisauto==1 && gmisauto !=undefined){
				checkbox="checked";
				video.isAuto=true;
			}
			if(gmisautoplayer && gmisautoplayer !=undefined){
				selectoption="selected";
				video.isAutoPlayer=gmisautoplayer;
			}


			playerList.forEach((v, k) => {
				let type_arr=v.type.split('-');
				type_arr.forEach((d,i)=>{
					if(video.isMobile){
						if(d==3){
							html1 += "<li title='" + v.name + "' data-k='" + k + "' data-t='1'>" + v.name + "</li>";
							if(v.url==gmisautoplayer){
								option+="<option value ='"+v.url+"' "+selectoption+">"+v.name+"</option>"
							}else{
								option+="<option value ='"+v.url+"' >"+v.name+"</option>"
							}
						}
					}else{
						if(d==1){
							html1 += "<li title='" + v.name + "' data-k='" + k + "' data-t='1'>" + v.name + "</li>";
							if(v.url==gmisautoplayer){
								option+="<option value ='"+v.url+"' "+selectoption+">"+v.name+"</option>"
							}else{
								option+="<option value ='"+v.url+"' >"+v.name+"</option>"
							}
						}
						if(d==2){
							html2 += "<li title='" + v.name + "' data-k='" + k + "' data-t='2'>" + v.name + "</li>";
						}
					}




				})

			});
            let iX = GM_getValue('GM_IX') ? GM_getValue('GM_IX') : (video.isMobile ? 35 : 10);
            let iY = GM_getValue('GM_IY') ? GM_getValue('GM_IY') : (video.isMobile ? 70 : 120);
           // let iW = t == 1 ? 150 : 300;

			let html = `<div id='vbox'  style="top:` + iY + `px; left:` + iX + `px;">
									<div class='item_text'>
										<div class="img_box" id="img_box_6667897iio"><img src='` + img + `' title='点击跳转到综合解析页面,线路随意选!'/></div>
											<div class='vip_mod_box_action' >
												<div style='display:flex;'>
													<div style='padding:10px 0px; min-width:320px; max-height:550px; overflow-y:auto;'  class="default-scrollbar-55678">
														<div>
															<div style='font-size:16px; text-align:center; color:#E5212E; padding:5px 0px;'><b>视频解析[内嵌播放]</b><a href="#" class="close"/></div>
															<ul>
																` + html1 + `
																<div style='clear:both;'></div>
															</ul>
														</div>
														<div>
															<div style='font-size:16px; text-align:center; color:#E5212E; padding:5px 0px;'><b>视频解析[弹窗播放]</b></div>
															<ul>
															` + html2 + `
															<div style='clear:both;'></div>
															</ul>
														</div>
														<div>
															<div style='font-size:16px; text-align:center; color:#E5212E; padding:5px 0px;'><b>解析配置</b></div>
															<div ><span style='color:white' >自动解析:</span><input id='Isauto' type='checkbox' ` + checkbox + ` style='border: 1px solid #ccc;width: 15px;height: 15px;-webkit-appearance:auto'/></div>
															<div><span style='color:white' >选择解析地址:</span><select id='Isautoplayer' style=' color: white;border:1px solid #ccc;background:#ccc'>
																	 ` + option + `
																	</select>
																	</div>
															</ul>
														</div>
													</div>
												<div>
											</div>
										</div>
									</div>
								</div>
								`;


			$("body").append(html);
            video.div2 = document.getElementById("vbox");
		},
		closeAD:()=>{
            console.log(video.adVideoList);
			if (video.host == 'v.qq.com') {
				video.adtm=setInterval(() => {
					try {
						let advs = $('.txp_ad').find('txpdiv').find('video');
						advs.each(function(index, vobj) {
                            video.adVideoList.push(vobj);
							if (vobj.duration !== vobj.currentTime) {
								vobj.setAttribute('src', '');
							}
						})
					} catch (e) {}
				}, 10);

			} else if (video.host == 'm.v.qq.com' || video.host=='3g.v.qq.com') {
				video.adtm=setInterval(() => {
					try {
						$("#vipPosterContent").remove();//移除VIP电影收费弹窗
						if($('.txp_ad')[0] && !$('.txp_ad').hasClass("txp_none")){
							 $('video').each(function (i,vobj) {
							   vobj.setAttribute('src', null)
							 });

					   }
					   href = window.location.href
					} catch (e) {}
				}, 150);
			} else if (video.host == 'www.iqiyi.com') {
				try {
					unsafeWindow.rate = 0;
					unsafeWindow.Date.now = () => {
						return new unsafeWindow.Date().getTime() + (unsafeWindow.rate += 1000);
					}
					setInterval(() => {
						unsafeWindow.rate = 0;
					}, 600000);
				} catch (e) {}
				video.adtm=setInterval(() => {
					try {
						if (document.getElementsByClassName("cupid-public-time")[0] != null) {
							$(".skippable-after").css("display", "block");
							document.getElementsByClassName("skippable-after")[0].click();
						}
						$(".qy-player-vippay-popup").css("display", "none");
						$(".black-screen").css("display", "none");
					} catch (e) {}
				}, 500);


			}else if (video.host == 'm.iqiyi.com') {
					video.adtm=setInterval(() => {
					try {
						if(!$('.normal-public-time').is(":hidden")){
							 $('video').each(function (i,vobj) {
								 vobj.currentTime=888;
							 });
					   }
					   href = window.location.href
					} catch (e) {}
				}, 100);

			} else if (video.host == 'v.youku.com' || video.host == 'v-wb.youku.com' || video.host=='vku.youku.com') {
				window.onload = function() {
					try {
						if (!document.querySelectorAll('video')[0]) {
							setInterval(function() {
								document.querySelectorAll('video')[1].playbackRate = 16;
							}, 100)
						}
					} catch (e) {}
				}
				video.adtm=setInterval(() => {
					try {
						var H5 = $(".h5-ext-layer").find("div")
						if (H5.length != 0) {
							$(".h5-ext-layer div").remove();
							var btn = $(".control-left-grid .control-play-icon");
							if (btn.attr("data-tip") === "播放") {
								$(".h5player-dashboard").css("display", "block");
								btn.click();
								$(".h5player-dashboard").css("display", "none");
							}
						}
						var adv=$('.advertise-layer').find('div').find('video');
						if(adv.length>0){
							adv.each(function(index,vobj){
								if (vobj.duration !== vobj.currentTime) {
									vobj.currentTime = 500;
								}
							})
						}

						if ($(".kui-abortlayer-play-btn").html() === "播 放") {
							$(".kui-abortlayer-play-btn").click();
						}
						$(".information-tips").css("display", "none");
					} catch (e) {}
				}, 50);

			}else if(video.host=='m.youku.com'){
				video.adtm=setInterval(() => {
					try {
						 if(!$('.x-advert').is(":hidden")){
							$('video').each(function (i,vobj) {
								 vobj.setAttribute('src', null)
							 });
						}
						$(".x-noticeshow").remove();
					} catch (e) {}
				}, 550);
			}else if (video.host == 'tv.sohu.com') {
				video.adtm=setInterval(() => {
					try {
						let vobject=$(".x-video-adv").find('video');
						vobject.each(function(index,vobj){
							 if (vobj.duration !=vobj.currentTime) {
								 vobj.currentTime = 500;
							 }
						})
						$(".x-video-adv").css("display", "none");
						$(".x-player-mask").css("display", "none");
						$("#player_vipTips").css("display", "none");
					} catch (e) {}
				}, 550);
			}else if (video.host == 'm.tv.sohu.com' || video.host=='pad.tv.sohu.com') {
				video.adtm=setInterval(() => {
					try {
						if(!$('.x-ad-panel').is(":hidden")){
							 $('video').each(function (i,vobj) {
								 vobj.playbackRate=5.5
							 });

					   }
					} catch (e) {}
				},550);
				video.adtm=setInterval(function() {
					$(document).on('click', '.list_juji li a', function(e) {
						e.preventDefault()
						window.location.href = $(this).attr('href');
					})
				}, 1000)
			}else if(video.host=='www.mgtv.com' || video.host=='w.mgtv.com'){
				video.adtm=setInterval(() => {
					try {
						if($('.as_fill_player')[0]){

												   $('video').each(function (i,vobj) {
													   vobj.currentTime = 1000;
												   });
											   }
						 $('.as-pause_container').css('display', 'none');
											$('.as_stages-wrapper').css('display', 'none');
											$('.m-agreement').remove();
					} catch (e) {}
				}, 550);
			}else if(video.host=='m.mgtv.com'){
				video.adtm=setInterval(() => {
					try {
						if(!$('.ad-time-area2').is(":hidden")){
							 $('video').each(function (i,vobj) {
								 vobj.setAttribute('src', null)
							 });

					   }
					} catch (e) {}
				}, 550);
			}else if(video.host=='www.le.com'){
				video.adtm=setInterval(() => {
					try {
						if($(".vdo_post_time")[0]){
							 $('video').each(function (i,vobj) {
								 vobj.setAttribute('src', null)
							 });
						}
					} catch (e) {}
				}, 550);
			}else if(video.host=='www.bilibili.com'){

            }
		},
		initEvent:()=>{
            video.div2.addEventListener("mousedown", function() {
                video.mvDown();

            }, false);
            video.div2.addEventListener("touchstart", function() {
                video.mvDown();
            }, false)
            video.div2.addEventListener("mousemove", function() {
                video.mvMove();
            }, false);
            video.div2.addEventListener("touchmove", function() {
               video.mvMove();
            }, false)
            document.body.addEventListener("mouseup", function() {
               video.mvEnd();
            }, false);
            video.div2.addEventListener("touchend", function() {
                video.mvEnd();
            }, false);
			$(".item_text").on("mouseover", () => {
				$(".vip_mod_box_action").show();
			});
			$(".item_text").on("mouseout", () => {
				$(".vip_mod_box_action").hide();

			});
            $(".close").on("click",()=>{
                $(".vip_mod_box_action").hide();
            })
			$("#Isauto").change(function(){
				if($(this).is(":checked")) {
					GM_setValue('ISAUTO',1);
					video.isAuto=true;
				}else{
					GM_setValue('ISAUTO',2);
					video.isAuto=false;
				}
			});
			$("#Isautoplayer").change(function(){
				 GM_setValue("ISAUTOPLAYER",$(this).val());
				 video.isAutoPlayer=$(this).val();
                if(video.isAuto){
                      setTimeout(() => {
                          window.location.reload();
                      },200)

                }
			});
			$(".vip_mod_box_action li").click(function(){
				let k=$(this).attr('data-k');
				let type=$(this).attr('data-t');
				let link=playerList[k].url + video.href;
				if(type==1){
					if (document.getElementById("iframe-player") == null) {
						video.player.empty();
						video.player.append(video.playerParse);
					}
					$("#iframe-player").attr("src", link);
				}else{
					GM_openInTab(link, false);
				}
			})
		},
		initEnv:()=>{
			node.forEach((e,v)=>{
				if (e.url ==video.host) {
                    if(e.type==2){
                        video.isMobile=true;
                    }
					let node_arr=e.node.split('|');
					for(let i=0;i<node_arr.length;i++){
						if($(node_arr[i]).length){
							video.player=$(node_arr[i]);
							break;

						}
					}
					video.initHtml();
					video.initEvent();

				}
			})
		},
	};


	if(coupon.isRun()){
		coupon.show();

	}else{
		tools.sleep(200).then(() => {
			video.initCss();
			video.initEnv();
			video.closeAD();
			video.autoPlayer();
			video.autoSelect();



		})
	}

})();