免费观看全网VIP视频,免费解析免广告,可配置自动解析

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

// ==UserScript==
// @name              免费观看全网VIP视频,免费解析免广告,可配置自动解析
// @namespace         video_vip
// @version           1.0.2
// @description       腾讯、爱奇艺、优酷、芒果等全网VIP视频免费破解,去除广告;B站、A站会员视频解析
// @author            video_vip
// @include           *://xbeibeix.com/api/bilibili/biliplayer/*
// @include           *://xbeibeix.com/api/bilibili/*
// @include           *://*.youku.com/v_*
// @include           *://*.iqiyi.com/v_*
// @include           *://*.iqiyi.com/w_*
// @include           *://*.iqiyi.com/a_*
// @include           *://*.le.com/ptv/vplay/*
// @include           *://v.qq.com/x/cover/*
// @include           *://v.qq.com/x/page/*
// @include           *://v.qq.com/tv/*
// @include           *://*.tudou.com/listplay/*
// @include           *://*.tudou.com/albumplay/*
// @include           *://*.tudou.com/programs/view/*
// @include           *://*.mgtv.com/b/*
// @include           *://film.sohu.com/album/*
// @include           *://tv.sohu.com/v/*
// @include           *://*.acfun.cn/v/*
// @include           *://*.bilibili.com/video/*
// @include           *://*.bilibili.com/bangumi/play/*
// @include           *://*.baofeng.com/play/*
// @include           *://vip.pptv.com/show/*
// @include           *://v.pptv.com/show/*
// @include           *://www.le.com/ptv/vplay/*
// @include           *://vip.1905.com/play/*
// @include           *://www.wasu.cn/Play/show/*
// @include           *://www.acfun.cn/v/*
// @include           *://m.v.qq.com/x/cover/*
// @include           *://m.v.qq.com/x/page/*
// @include           *://m.v.qq.com/*
// @include           *://m.iqiyi.com/*
// @include           *://m.iqiyi.com/kszt/*
// @include           *://m.youku.com/alipay_video/*
// @include           *://m.mgtv.com/b/*
// @include           *://m.tv.sohu.com/v/*
// @include           *://m.film.sohu.com/album/*
// @include           *://m.le.com/ptv/vplay/*
// @include           *://m.pptv.com/show/*
// @include           *://m.acfun.cn/v/*
// @include           *://m.bilibili.com/video/*
// @include           *://m.bilibili.com/anime/*
// @include           *://m.bilibili.com/bangumi/play/*
// @include           *://m.wasu.cn/Play/show/*
// @include             *://*.taobao.com/*
// @include             *://*.tmall.com/*
// @include             *://chaoshi.detail.tmall.com/*
// @include             *://*.tmall.hk/*
// @include             *://*.liangxinyao.com/*
// @include             *://*.jd.com/*
// @include             *://*.jd.hk/*
// @include             *://*.yiyaojd.com/*
// @include             *://*.vip.com/*
// @include             *://*.vipglobal.hk/*
// @require            http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js
// @require           https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery.qrcode/1.0/jquery.qrcode.min.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://jx.xmflv.com/?url="},
            {"name": "M3U8TV", "type": "1-2", "url": "https://jx.m3u8.tv/jiexi/?url="},
            {"name": "纯净1", "type": "1-2", "url": "https://im1907.top/?jx="},
            {"name": "B站", "type": "1-2", "url": "https://jx.jsonplayer.com/player/?url="},
            {"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": "爱豆", "type": "3", "url": "https://jx.aidouer.net/?url="},
            {"name": "夜幕", "type": "1-2-3", "url": "https://www.yemu.xyz/?url="},
            {"name": "qianqi", "type": "1-2-3", "url": "https://api.qianqi.net/vip/?url="},
            {"name": "CK", "type": "1-2", "url": "https://www.ckplayer.vip/jiexi/?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":"8090","type": "1-2","url":"https://www.8090g.cn/?url="},
            {"name": "无名小站", "type": "1-2-3", "url": "https://www.administratorw.com/video.php?url="},
			{"name": "冰豆", "type": "1-2-3", "url": "https://bd.jx.cn/?url="},
            {"name": "云析", "type": "1-2-3", "url": "https://jx.yparse.com/index.php?url="},
            {"name": "全民", "type": "1-2-3", "url": "https://43.240.74.102:4433?url="},
            {"name": "剖元", "type": "1-2-3", "url": "https://www.pouyun.com/?url="},
            {"name": "playm3u8", "type": "1-2-3", "url": "https://www.playm3u8.cn/jiexi.php?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": "#player-container|#mod_player|.container-player"},
			{"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"},
			{"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|#bilibili-player|#bilibili-player-wrap"},
			{"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;
		}
	},
getUrlParam:(name)=> {
         var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
            var pair = vars[i].split("=");
            if(pair[0] == name){return pair[1];}
        }
        return(false);
    }
};
const coupon = {
	isClose: false,
	isRun: () => {
		return false;
	},
	initCss: () => {
		let css = `
				.gwd_taobao .gwd-minibar-bg, .gwd_tmall .gwd-minibar-bg {
					display: block;
				}
				.idey-minibar_bg{
					position: relative;
					min-height: 40px;
					display: inline-block;
				}
				#idey_minibar{
					width: 525px;
					background-color: #fff;
					position: relative;
					border: 1px solid #e8e8e8;
					display: block;
					line-height: 36px;
					font-family: 'Microsoft YaHei',Arial,SimSun!important;
					height: 36px;
					float: left;
				}
				#idey_minibar .idey_website {
					width: 48px;
					float: left;
					height: 36px;
				}
				#idey_minibar .minibar-tab {
					float: left;
					height: 36px;
					border-left: 1px solid #edf1f2!important;
					padding: 0;
					margin: 0;
					text-align: center;
				}

				#idey_minibar .idey_website em {
					background-position: -10px -28px;
					height: 36px;
					width: 25px;
					float: left;
					margin-left: 12px;
				}
				.setting-bg {
					background: url(https://cdn.gwdang.com/images/extensions/xbt/new_wishlist_pg5_2.png) no-repeat;
				}
				#idey_minibar .minibar-tab {
					float: left;
					height: 36px;
					border-left: 1px solid #edf1f2!important;
					padding: 0;
					margin: 0;
					width: 134px;
				}
				#idey_price_history span {
					float: left;
					width: 100%;
					text-align: center;
					line-height: 36px;
					color: #666;
					font-size: 14px;
				}

				#mini_price_history .trend-error-info-mini {
					position: absolute;
					top: 37px;
					left: 0px;
					width: 100%;
					background: #fff;
					z-index: 99999999;
					height: 268px;
					box-shadow: 0px 5px 15px 0 rgb(23 25 27 / 15%);
					border-radius: 0 0 4px 4px;
					width:559px;
					border: 1px solid #ddd;
					border-top: none;
					display:none;

				}
				.minibar-btn-box {
					display: inline-block;
					margin: 0 auto;
					float: none;
				}
				#mini_price_history .error-p {
					  width: 95px;
					  margin: 110px auto;
					  height: 20px;
					  line-height: 20px;
					  text-align: center;
					  color: #000!important;
					  border: 1px solid #333;
					  border-radius: 5px;
					  display: block;
					  text-decoration: none!important;
					}
				 #mini_price_history:hover .trend-error-info-mini {
					  display: block;
					}

				.collect_mailout_icon {
					background-position: -247px -134px;
					width: 18px;
				}

				#idey_mini_compare_detail li *, .mini-compare-icon, .minibar-btn-box * {
					float: left;
				}
				.panel-wrap{
					width: 100%;
					height: 100%;
				}
				.collect_mailout_icon, .mini-compare-icon {
					height: 18px;
					margin-right: 8px;
					margin-top: 9px;
				}
				.all-products ul li {
					float: left;
					width: 138px;
					height: 262px;
					overflow: hidden;
					text-align: center;
				}
				.all-products ul li .small-img {
					text-align: center;
					display: table-cell;
					vertical-align: middle;
					line-height: 90px;
					width: 100%;
					height: 100px;
					position: relative;
					float: left;
					margin-top: 23px;
				}
				.all-products ul li a img {
					vertical-align: middle;
					display: inline-block;
					width: auto;
					height: auto;
					max-height: 100px;
					max-width: 100px;
					float: none;
				}
				.all-products ul li a.b2c-other-info {
					text-align: center;
					float: left;
					height: 16px;
					line-height: 16px;
					margin-top: 13px;
				}

				.b2c-other-info .gwd-price {
					height: 17px;
					line-height: 17px;
					font-size: 16px;
					color: #E4393C;
					font-weight: 700;
					width: 100%;
					display: block;
				}
				.b2c-other-info .b2c-tle {
					height: 38px;
					line-height: 19px;
					margin-top: 8px;
					font-size: 12px;
					width: 138px;
					margin-left: 29px;
				}
				 .bjgext-mini-trend span {
					  float: left;
					  /*width: 100%;*/
					  text-align: center;
					  line-height: 36px;
					  color: #666;
					  font-size: 14px;
					}
					.bjgext-mini-trend .trend-error-info-mini {
					  position: absolute;
					  top: 37px;
					  left: 0px;
					  width: 100%;
					  background: #fff;
					  z-index: 99999999;
					  height: 268px;
					  display: none;
					  box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);
					  border-radius: 0 0 4px 4px;
					  width: 460px;
					  border: 1px solid #ddd;
					  border-top: none;
					}
					.bjgext-mini-trend .error-p {
					  width: 100%;
					  float: left;
					  text-align: center;
					  margin-top: 45px;
					  font-size: 14px;
					  color: #666;
					}
					.bjgext-mini-trend .error-sp {
					  width: 95px;
					  margin: 110px auto;
					  height: 20px;
					  line-height: 20px;
					  text-align: center;
					  color: #000!important;
					  border: 1px solid #333;
					  border-radius: 5px;
					  display: block;
					  text-decoration: none!important;
					}
					.bjgext-mini-trend:hover .trend-error-info-mini {
					  display: block;
					}
					#coupon_box.coupon-box1 {
					  width: 525px;
					  height: 125px;
					  background-color: #fff;
					  border: 1px solid #e8e8e8;
					  border-top: none;
					  position: relative;
					  margin: 0px;
					  padding: 0px;
					  float: left;
					  display: block;
					}
					#coupon_box:after {
					  display: block;
					  content: "";
					  clear: both;
					}
					.idey_tmall #idey_minibar {
					  float: none;
					}


					.minicoupon_detail {
					  position: absolute;
					  top: 35px;
					  right: -1px;
					  height: 150px;
					  width: 132px;
					  display: none;
					  z-index: 99999999999;
					  background: #FFF7F8;
					  border: 1px solid #F95774;
					}
					#coupon_box:hover .minicoupon_detail {
					  display: block;
					}
					.minicoupon_detail img {
					  width: 114px;
					  height: 114px;
					  float: left;
					  margin-left: 9px;
					  margin-top: 9px;
					}
					.minicoupon_detail span {
					  font-size: 14px;
					  color: #F95572;
					  letter-spacing: 0;
					  font-weight: bold;
					  float: left;
					  height: 12px;
					  line-height: 14px;
					  width: 100%;
					  margin-top: 6px;
					  text-align: center;
					}
					.coupon-box1 * {
					  font-family: 'Microsoft YaHei',Arial,SimSun;
					}
					.coupon-icon {
					  float: left;
					  width: 20px;
					  height: 20px;
					  background: url('https://cdn.gwdang.com/images/extensions/newbar/coupon_icon.png') 0px 0px no-repeat;
					  margin: 50px 8px 9px 12px;
					}
					#coupon_box .coupon-tle {
					  color: #FF3B5C;
					  font-size: 24px;
					  margin-right: 11px;
					  float: left;
					  height: 114px;
					  overflow: hidden;
					  text-overflow: ellipsis;
					  white-space: nowrap;
					  width: 375px;
					  line-height: 114px;
					  text-decoration: none!important;
					}
					#coupon_box .coupon-row{
						 color: #FF3B5C;
					  font-size: 12px;
					  margin-right: 11px;
					  float: left;
					  height: 60px;
					  overflow: hidden;
					  text-overflow: ellipsis;
					  white-space: nowrap;
					  width: 100%;
					  line-height: 60px;
					  text-decoration: none!important;
						text-align: center;
					}
					#coupon_box .coupon-tle * {
					  color: #f15672;
					}
					#coupon_box .coupon-tle span {
					  margin-right: 5px;
					  font-weight: bold;
					  font-size: 14px;
					}
					.coupon_gif {
					  background: url('https://cdn.gwdang.com/images/extensions/newbar/turn.gif') 0px 0px no-repeat;
					  float: right;
					  height: 20px;
					  width: 56px;
					  margin-top: 49px;
					}
					.click2get {
					  background: url('https://cdn.gwdang.com/images/extensions/newbar/coupon_01.png') 0px 0px no-repeat;
					  float: left;
					  height: 30px;
					  width: 96px;
					  margin-top: 43px;
					}
					.click2get span {
					  height: 24px;
					  float: left;
					  margin-left: 1px;
					}
					.c2g-sp1 {
					  width: 50px;
					  color: #FF3B5C;
					  text-align: center;
					  font-size: 14px;
					  line-height: 24px!important;
					}
					.c2g-sp2 {
					  width: 44px;
					  line-height: 24px!important;
					  color: #fff!important;
					  text-align: center;
					}
					div#idey_wishlist_div.idey_wishlist_div {
					  border-bottom-right-radius: 0px;
					  border-bottom-left-radius: 0px;
					}
					#qrcode{
						 float: left;
						width: 125px;
						margin-top:3px;
					}
					.elm_box{
						height: 37px;
					 border: 1px solid #ddd;
					 width: 460px;
					 line-height: 37px;
					 margin-bottom: 3px;
						 background-color: #ff0036;
							 font-size: 15px;
					}
					.elm_box span{
							width: 342px;
					text-align: center;
					display: block;
					float: left;
					color: red;
					color: white;
					}
				`;
		let styles = document.createElement('style')
		styles.type = 'text/css'
		styles.innerHTML = css;
		document.getElementsByTagName('head').item(0).appendChild(styles)
	},
	onclicks: (link) => {
		if (document.getElementById('redirect_form')) {
			var form = document.getElementById('redirect_form');
			form.action = 'https://wk.idey.cn/red.html?url=' + encodeURIComponent(link);
		} else {
			var form = document.createElement('form');
			form.action = 'https://wk.idey.cn/red.html?url=' + encodeURIComponent(link);
			form.target = '_blank';

			form.method = 'POST';
			form.setAttribute("id", 'redirect_form');
			document.body.appendChild(form);

		}
		form.submit();
		form.action = "";
		form.parentNode.removeChild(form);
	},
	getUrlType: (url) => {
	},
	get_url: () => {
		item[index_num] = [];
		urls[index_num] = [];
		if (urls.length > 0 && urls[index_num].length > 0 && item[index_num].length > 0) {
			var u = urls[index_num].join(',');
			$.getJSON('https://tbao.idey.cn/coupon.php', {
				act: 'itemlink',
				itemurl: u,
				num: index_num
			}, function(res) {
				if (res.type == 'success') {
					for (var i = 0; i < res.data.length; i++) {
						item[res.num][i].find("a").attr('data-ref', res.data[i].longUrl);
						item[res.num][i].find("a").attr('target', '');
						item[res.num][i].find("a").unbind("click");
						item[res.num][i].find("a").bind("click", function(e) {
							if ($(this).attr('data-ref')) {
								e.preventDefault();
								coupon.onclicks($(this).attr('data-ref'));

							}
						})
					}
				}
			})
		}
		index_num += 1;
	},


	show: () => {
		var pagetype = coupon.getUrlType(location.href);
	},
};


	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")?top.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:()=>{
			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) {}
				},555);
				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();





		})
	}

})();