🔥糖心Vlog(各种福利姬仙女萝莉资源)

🔥免费看站内所有付费视频,解锁尤物圈,下载视频,复制播放链接,去广告

// ==UserScript==
// @name              🔥糖心Vlog(各种福利姬仙女萝莉资源)
// @homepage          https://jsxl.pro
// @version           1.0.2
// @updateDesc        修复ios部分视频无法下载问题
// @description       🔥免费看站内所有付费视频,解锁尤物圈,下载视频,复制播放链接,去广告
// @icon              https://cdn.jsxl.pro/image/tangxin.png
// @namespace         糖心Vlog
// @author            jsxl
// @include           *://txh049.com/*
// @include           *://*.txh049.com/*
// @include           *://tx*.com/*
// @include           *://*.tx*.com/*
// @include			  *://blog.luckly-mjw.cn/*
// @include		      *://tools.thatwind.com/*
// @include			  *://tools.bugscaner.com/*
// @require           https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @require 		  https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.8/hls.min.js
// @run-at 			  document-start
// @grant             unsafeWindow
// @grant             GM_addStyle
// @grant             GM_getValue
// @grant             GM_setValue
// @grant 			  GM_getResourceText
// @grant             GM_xmlhttpRequest
// @charset		      UTF-8
// @antifeature       payment
// @license           MIT
// ==/UserScript==

function init($){
	'use strict';
	if(unsafeWindow.wt_tangxin_script){
		return;
	}
	unsafeWindow.wt_tangxin_script = true;

	if (location.href.includes('tools.bugscaner.com')) {
		util.findTargetElement('.input-group input').then(res => {
			const url = location.search.replace('?m3u8=', '').replace(/\s*/g, "")
			if (url && url.startsWith('http')) {
				$(res).val(url)
			}
		})
		return
	}
	if (location.href.includes('tools.thatwind.com')) {
		GM_addStyle(`.top-ad{display: none !important;}`)
		util.findTargetElement('.bx--text-input__field-outer-wrapper input', 10).then(res => {
			$(res).val(Date.now())
			res.dispatchEvent(new Event("input"))
		})
		return
	}
	if (location.href.includes('blog.luckly-mjw.cn')) {
		GM_addStyle(`
			#m-app a,.m-p-temp-url,.m-p-cross,.m-p-input-container div:nth-of-type(1){display: none !important;}
			.m-p-input-container{ display: block;}
			.m-p-input-container input{ width: 100%;font-size: 12px;margin-bottom: 5px;}
			.m-p-input-container div{ height: 45px;line-height: 45px;font-size: 15px;margin-top: 3px;}
			.m-p-stream{line-height: normal;font-size: 12px;}
		`)
		return
	}
	
	const loadScript = function(url) {
	  const script = document.createElement('script');
	  script.type = 'text/javascript';
	  script.src = url;
	  document.head.appendChild(script);
	}
	
	if(typeof Hls === "undefined"){
		loadScript('https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.8/hls.min.js')
	}

	const checkLogin = function(){
		try{
			if (superVip._CONFIG_.user.login_date != new Date().setHours(0, 0, 0,0) || md5x(superVip._CONFIG_.user.ver, 'de').code != md5x(md5x(), 'de').code) {
				superVip._CONFIG_.user = ''
				GM_setValue('jsxl_user', '')
				util.logouted('登录已失效,请重新登录')
				$("#wt-my").click()
				return false
			}
			return true
		}catch(e){
			superVip._CONFIG_.user = ''
			GM_setValue('jsxl_user', '')
			util.logouted(e.message || '登录已失效,请重新登录')
			$("#wt-my").click()
			return false
		}
	}

	const initPlayerUrl = async function(that, url, params){
		if (superVip._CONFIG_.user && superVip._CONFIG_.user.token) {		
			if(!checkLogin()){
				return;
			}
			if(!params || params.length < 1){
				superVip._CONFIG_.videoUrl.requestErrMsg = '参数错误'
				util.showTips({ title: '参数错误'})
				return
			}
			try{
				let res = await util.asyncHttp('https://api.jsxl.pro/scriptService' + (Math.floor(Math.random() * 3) + 1) +'00/tangxinSign?code=' + encodeURIComponent(params[0]))
				if(res.errMsg != 'success' || !res.responseText){
					throw new Error('asyncHttp request fail')
				}
				const result = JSON.parse(res.responseText)
				if(result.errCode != 0){
					throw new Error(result.errMsg)
				}
				params[0] = result.data
				if(result.newToken || result.newRole){
					if(result.newToken) superVip._CONFIG_.user.token = result.newToken;
					if(result.newRole && result.newRole.expired_date) superVip._CONFIG_.user.role.expired_date = result.newRole.expired_date;
					GM_setValue('jsxl_user', superVip._CONFIG_.user)
				}
			}catch(e){
				superVip._CONFIG_.videoUrl.requestErrMsg = e.message || '请求api失败'
				util.showTips({ title: e.message || '请求api失败'})
			}
		}
	}

	const md5x = function(s, type) {
		try {
			if (!type) {
				const date = new Date().setHours(0, 0, 0, 0) + '';
				const day = new Date().getDate();
				const code = date.substring(4, 8) * new Date().getDate() + '';
				return ec.swaqbt(JSON.stringify({
					date: date,
					code: code,
					day: day
				}));
			} else {
				if(type == 'decode'){
					s = ec.cskuecede(s)
				}
				const token = JSON.parse(ec.sfweccat(s));
				if ((new Date(Number(token.date)).getTime() + 86400000) < Date.now()) {
					throw Error('md5x expire');
				}
				if (token.day != new Date(Number(token.date)).getDate()) {
					throw Error('md5x err');
				}
				const code = (new Date(Number(token.date)).setHours(0, 0, 0, 0) + '').substring(4, 8) * token.day;
				if (code != token.code) {
					throw Error('md5x err2');
				}
				return token;
			}
		} catch (e) {
			return '';
		}
	}

	const ec = {
		b64: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
		b64re: /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,
		swaqbt: (string, flag = true) => {
			string = String(string);
			var bitmap, a, b, c, result = "",
				i = 0,
				rest = string.length % 3;
			for (; i < string.length;) {
				if ((a = string.charCodeAt(i++)) > 255 || (b = string.charCodeAt(i++)) > 255 || (c = string
						.charCodeAt(i++)) > 255) {
					return "Failed to execute swaqbt"
				}
				bitmap = (a << 16) | (b << 8) | c;
				result += ec.b64.charAt(bitmap >> 18 & 63) + ec.b64.charAt(bitmap >> 12 & 63) +
					ec.b64.charAt(bitmap >> 6 & 63) + ec.b64.charAt(bitmap & 63);
			}
			if (flag) return ec.swaqbt(rest ? result.slice(0, rest - 3) + "===".substring(rest) : result,
				false)
			else return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result;
		},

		sfweccat: (string, flag = true) => {
			string = String(string).replace(/[\t\n\f\r ]+/g, "");
			if (!ec.b64re.test(string)) {
				return 'Failed to execute sfweccat'
			}
			string += "==".slice(2 - (string.length & 3));
			var bitmap, result = "",
				r1, r2, i = 0;
			for (; i < string.length;) {
				bitmap = ec.b64.indexOf(string.charAt(i++)) << 18 | ec.b64.indexOf(string.charAt(i++)) <<
					12 |
					(r1 = ec.b64.indexOf(string.charAt(i++))) << 6 | (r2 = ec.b64.indexOf(string.charAt(
						i++)));
				result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
					r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
					String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
			}
			if (flag) return ec.sfweccat(result, false)
			else return result
		},

		knxkbxen: (s) => {
			s = ec.swaqbt(encodeURIComponent(JSON.stringify(s)), false);
			const n = Math.round(Math.random() * (s.length > 11 ? 8 : 1) + 1);
			const l = s.split('');
			const f = l.filter(i => {
				i == '=';
			})
			for (let i = 0; i < l.length; i++) {
				if (i == n) l[i] = l[i] + 'JS';
				if (l[i] == '=') l[i] = '';
			}
			return ec.b64[Math.floor(Math.random() * 62)] + (l.join('') + n) + f.length;
		},

		cskuecede: (s) => {
			if (s.startsWith('JSXL')) s = s.replace('JSXL', '');
			s = s.substring(ec.sfweccat('TVE9PQ=='));
			const n = s.substring(s.length - 2, s.length - 1);
			const d = s.substring(s.length - 1);
			const l = s.substring(0, s.length - 2).split('');
			for (let i = 0; i < l.length; i++) {
				if (i == (Number(n) + 1)) {
					l[i] = '';
					l[i + 1] = '';
					break;
				}
			}
			for (let i = 0; i < Number(d); i++) {
				l.plus('=')
			}
			return JSON.parse(decodeURIComponent((ec.sfweccat(l.join(''), false))))
		}
	}

	const util = {
		copyText: (text) => {
			if (navigator.clipboard && window.isSecureContext) {
					return navigator.clipboard.writeText(text);
			} else if (document.execCommand) {
				const textArea = document.createElement('textarea');
				textArea.style.position = 'fixed';
				textArea.style.top = textArea.style.left = '-100vh';
				textArea.style.opacity = '0';
				textArea.value = text;
				document.body.appendChild(textArea);
				textArea.focus();
				textArea.select();
				try {
					const success = document.execCommand('copy');
					return success ? Promise.resolve() : Promise.reject();
				} catch (err) {
					return Promise.reject(err);
				} finally {
					textArea.remove();
				}
			} else {
				return Promise.reject(new Error('Clipboard API not supported and execCommand not available.'));
			}
		},

		logined: () => {
			$("#wt-my img").addClass('margin-left')
			$('#wt-my img').attr('src', superVip._CONFIG_.user.avatar)
			$('#wt-set-box .user-box-container .user-info').css('display', 'flex')
			$('#wt-set-box .user-box-container .user-info img').attr('src', superVip._CONFIG_.user.avatar)
			$('#wt-set-box .user-box-container .user-info .nickname').html(superVip._CONFIG_.user.nickname)
			$('#wt-set-box .user-box-container .user-info .username').html(superVip._CONFIG_.user.username)
		},

		logouted: (msg) => {
			superVip._CONFIG_.user = '';
			$("#wt-my img").removeClass('margin-left')
			$('#wt-my img').attr('src',
				'https://cdn.jsxl.pro/image/null_square.png')
			$('#wt-set-box .user-box-container .user-info').css('display', 'none')
			GM_setValue('jsxl_user', '')
			if(msg){
				util.showTips({
					title: '请重新登录,errMsg:' + msg
				})
			}
		},

		showAndHidTips: (name, op = 'set', val = true) => {
			let tips = GM_getValue('wt_tips', {})
			if (!tips) tips = {}
			if (op == 'set') {
				tips[name] = val
				GM_setValue('wt_tips', tips)
				if (val) $('.' + name).addClass('tips-yuan')
				else $('.' + name).removeClass('tips-yuan')
				return true
			} else {
				return tips[name] ? true : false
			}
		},

		addLogin: () => {
			if ($('#wt-login-box').length > 0) {
				$("#wt-login-box input").val('');
				return;
			}
			$('body').append(`
				<div id="wt-login-mask"></div>
				<div id="wt-login-box">
					<div class="logo">
						<p>@https://jsxl.pro</p>
						<p>v ${superVip._CONFIG_.version}</p>
					</div>
					<div class="close"></div>
					<div class="title">登录脚本账号</div>
					<div class="input-box">
						<input type="number" placeholder="输入jsxl.pro的登录账号"/>
					</div>
					<div class="input-box" style="margin-top:10px;">
						<input placeholder="输入jsxl.pro的登录密码" maxLength="8"/>
					</div>
					<div class="j-login-btn">
						<button >登录</button>
					</div>
					<div class="to-index" style="display: flex;justify-content: space-between;color: #e91e63; height: 40px;line-height: 40px;font-size: 11px;font-weight: 500;">
						<div class="wt-register">注册账号</div>
						<div class="wt-index">去发电获取权限?</div>
					</div>
				</div>
			`)
			GM_addStyle(`
				#wt-login-mask{ display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11000;background-color: #0000004d;}
				#wt-login-box{position: fixed;margin-top: 3%;top: 50%;left: 50%;transform: translate(-50%,-50%) scale(0);overflow: hidden;background-color: white;padding: 30px;padding-bottom: 0;border-radius: 10px;z-index: 11010;}
				#wt-login-box::before{content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #E91E63;z-index: -1;opacity: 0.7;bottom: 110px;right: 100px;}
				#wt-login-box::after{content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #2196F3;z-index: -1;opacity: 0.7;top: 115px;right: -112px;}
				#wt-login-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
				#wt-login-box .close::before,#wt-login-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 16px;height: 2px;border-radius: 1px;background-color: #222;transform: translate(-50%,-50%) rotate(45deg);}
				#wt-login-box .close::after,#wt-set-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
				#wt-login-box .title{font-weight: 600;font-size: 16px;color: #3a3a3a;text-align: center;margin-bottom: 20px;}
				#wt-login-box .input-box{display: flex;background-color: #f5f5f5;width: 160px;height: 35px;border-radius: 30px;overflow: hidden;font-size: 12px;}
				#wt-login-box .input-box input{width: 100%;height: 100%;padding-left: 15px;box-sizing: border-box;outline: none;border: none;background-color: #f5f5f5;font-size: 11px;color: black;letter-spacing: 1px;}
				#wt-login-box input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none !important; }
				#wt-login-box .j-login-btn{width: 100px;padding: 2px;height: 40px;font-size: 12px;margin: 15px auto;}
				#wt-login-box .j-login-btn button{width: 100%;height: 100%;border-radius: 30px;border: none;color: white;transition: all 0.3s ease;background-color: #ec407a;}
				#wt-login-box .logo{position: absolute;top: 5%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;z-index: 10;}
			`)
			$("#wt-login-mask").on("click", () => {
				$('#wt-login-mask').css('display', 'none')
				$("#wt-login-box").removeClass('show-set-box')
				$("#wt-login-box").addClass('hid-set-box')
			})
			$("#wt-login-box .close").on("click", () => {
				$('#wt-login-mask').css('display', 'none')
				$("#wt-login-box").removeClass('show-set-box')
				$("#wt-login-box").addClass('hid-set-box')
			})
			$("#wt-login-box .to-index .wt-register").on("click", () => {
				window.open('https://jsxl.pro/#/pages/login/login')
			})
			$("#wt-login-box .to-index .wt-index").on("click", () => {
				window.open('https://jsxl.pro/#/')
			})
			$("#wt-login-box .j-login-btn button").on("click", async () => {

				try{
					$('#wt-loading-box').css('display', 'block')
					await util.sleep(300);
					$("#wt-login-box .j-login-btn button").addClass('btn-anima')
					setTimeout(() => {
						$("#wt-login-box .j-login-btn button").removeClass('btn-anima')
					}, 500)

					const username = $("#wt-login-box input")[0].value;
					let pwd = $("#wt-login-box input")[1].value;
					if (!/^[0-9]{1,11}/.test(username) || !/.{6,8}$/.test(pwd)) {
						setTimeout(() => {
							$('#wt-loading-box').css('display', 'none')
							util.showTips({
								title: '账号或密码错误,请使用https://jsxl.pro网站的登录账号和登录密码登入脚本(如账号或密码忘记可登录/邮箱登录https://jsxl.pro网站后点头像进入修改信息页面,可看到账号及修改密码)'
							})
						}, 2500)
						return
					}
					$.ajax({
						url: "https://api.jsxl.pro/openHttp" + (Math.floor(Math.random() * 2) + 1) + "00/loginScript_v2?code=" + encodeURIComponent(username + '+' + pwd) + '&ap=' +
							'JTkwJJUU3JUIzJTk2JUU1JUJGJTgzVmxvZwJTk2J&version=' + superVip._CONFIG_.version,
						type: "GET",
						timeout: 12000,
						async: true,
						success: function(response) {
							if (response.errCode != 0) {
								$('#wt-loading-box').css('display', 'none');
								util.showTips({
									title: response.errMsg
								})
							} else {
								const res = {
									avatar: response.data.avatar,
									username: response.data.username,
									nickname: response.data.nickname,
									login_date: new Date().setHours(0,0,0,0),
									login_type: response.data.login_type,
									token: response.newToken,
									role: response.newRole,
									scripts: response.data.scripts
								}
								superVip._CONFIG_.user = res
								superVip._CONFIG_.user.ver = md5x(superVip)
								util.logined()
								GM_setValue('jsxl_user', res)
								GM_setValue('jsxl_login_pwd', username + '+' + pwd)

								$('#wt-loading-box').css('display', 'none')
								$('#wt-login-mask').css('display','none')
								$("#wt-login-box").removeClass('show-set-box')
								$("#wt-login-box").addClass('hid-set-box')
								util.showTips({
									title: response.errMsg,
									success: (e) => {
										window.location.reload()
									}
								})
							}
						},
						error: function(e) {
							$('#wt-loading-box').css('display', 'none')
							console.log(e)
							util.showTips({
								title: '登录失败,请关掉梯子(vpn)再试或梯子尝试换港台地区节点再试,或联系jsxl.pro网站管理员'
							})
						}
					});
				}catch(e){
					$('#wt-loading-box').css('display', 'block')
					alert(e)
					util.showTips({
						title: e.message
					})
				}
			})
		},

		asyncHttp: async (url, timeout = 6000, isHeader = true) => {
			return new Promise((resolve, reject) => {
				var request = new XMLHttpRequest();
				request.open('GET', url, true);
				if(isHeader){
					request.setRequestHeader('JsxlToken', superVip._CONFIG_.user.token);
				}
				request.timeout = timeout;
				request.onload = function() {
					if (request.readyState == 4) {
						if (request.status === 200) {
							resolve({
								errMsg: 'success',
								responseText: request.responseText
							});
						} else {
							reject({
								errMsg: 'err1',
								responseText: ''
							});
						}
					}
				};
				request.onerror = function() {
					reject({
						errMsg: 'err2',
						responseText: ''
					});
				};
				request.ontimeout = function() {
					reject({
						errMsg: 'timeout',
						responseText: ''
					});
				};
				request.send();
			});
		},

		findTargetElement: (targetContainer, maxTryTime = 30) => {
			const body = window.document;
			let tabContainer;
			let tryTime = 0;
			let startTimestamp;
			return new Promise((resolve, reject) => {
				function tryFindElement(timestamp) {
					if (!startTimestamp) {
						startTimestamp = timestamp;
					}
					const elapsedTime = timestamp - startTimestamp;
					if (elapsedTime >= 500) {
						console.log("find element:" + targetContainer + ",this" + tryTime + "num")
						tabContainer = body.querySelector(targetContainer)
						if (tabContainer) {
							resolve(tabContainer)
						} else if (++tryTime === maxTryTime) {
							reject()
						} else {
							startTimestamp = timestamp
						}
					}
					if (!tabContainer && tryTime < maxTryTime) {
						requestAnimationFrame(tryFindElement);
					}
				}
				requestAnimationFrame(tryFindElement);
			});
		},
		
		findTargetElementByVideoSrc: (maxTryTime = 60) => {
			const body = window.document;
			let videoSrc;
			let tryTime = 0;
			let startTimestamp;
			return new Promise((resolve, reject) => {
				function tryFindElement(timestamp) {
					if (!startTimestamp) {
						startTimestamp = timestamp;
					}
					const elapsedTime = timestamp - startTimestamp;
					if (elapsedTime >= 500) {
						const video = document.querySelector('video')
						if(video && video.src) videoSrc = video.src
						if (videoSrc) {
							resolve(videoSrc)
						} else if (++tryTime === maxTryTime) {
							reject()
						} else {
							startTimestamp = timestamp
						}
					}
					if (!videoSrc && tryTime < maxTryTime) {
						requestAnimationFrame(tryFindElement);
					}
				}
				requestAnimationFrame(tryFindElement);
			});
		},

		sleep: (time) => {
			return new Promise((res, rej) => {
				setTimeout(() => {
					res()
				}, time)
			})
		},

		showTips: (item = {}) => {
			$('#wt-maxindex-mask').css('display', 'block');
			$("#wt-tips-box").removeClass('hid-set-box');
			$("#wt-tips-box").addClass('show-set-box');
			$('#wt-tips-box .btn-box').empty()
			$('#wt-tips-box .btn-box').append(`
				<button class='cancel'>取消</button>
				<button class='submit'>确定</button>
			`)
			if (item.title) $('#wt-tips-box .content').html(item.title);
			if (item.doubt) $('#wt-tips-box .btn-box .cancel').css('display', 'block');
			if (item.confirm) $('#wt-tips-box .btn-box .submit').html(item.confirm);
			if (item.hidConfirm) {
				$('#wt-tips-box .submit').css('display', 'none');
			} else {
				$('#wt-tips-box .submit').css('display', 'block');
			}
			$('#wt-tips-box .btn-box .submit').on('click', () => {
				$('#wt-maxindex-mask').css('display', 'none');
				$("#wt-tips-box").removeClass('show-set-box');
				$("#wt-tips-box").addClass('hid-set-box');
				if (item.success) item.success(true);
			})
			$('#wt-tips-box .btn-box .cancel').on('click', () => {
				$('#wt-maxindex-mask').css('display', 'none');
				$("#wt-tips-box").removeClass('show-set-box');
				$("#wt-tips-box").addClass('hid-set-box');
				if (item.success) item.success(false);
			})
		},

		showDownLoadWindow: (show = true, msg) => {
			if (!show) {
				$('#wt-mask-box').css('display', 'none');
				$("#wt-download-box").removeClass('show-set-box');
				$("#wt-download-box").addClass('hid-set-box');
				return
			}
			$('#wt-mask-box').css('display', 'block');
			const downloadUrl = superVip._CONFIG_.videoUrl.downloadUrlSign;
			if (!document.querySelector('#wt-download-box')) {
				let items = `<li class="item" data-url="${downloadUrl}" data-type="copy" style="background-color: #fc4884;color:#e0e0e0;">复制链接</li>`
				superVip._CONFIG_.downUtils.forEach((item, index) => {
					items += `
						<li class="item" data-url="${item.url + (item.isAppend?'':'?m3u8=') + downloadUrl}">${item.title}</li>
					`
				})
				$('body').append(`
					<div id="wt-download-box">
						<div class="close"></div>
						<div class="tips">* ${msg?msg + '(刷新页面或打开其它帖子链接将丢失,链接有效期60分钟)': '视频链接有效期60分钟,请尽快使用。'}</div>
						<ul>${items}</ul>
					</div>
				`)
			} else {
				$('#wt-download-box').empty()
				let items = `<li class="item" data-url="${downloadUrl}" data-type="copy" style="background-color: #fc4884;color:#e0e0e0;">复制链接</li>`
				superVip._CONFIG_.downUtils.forEach((item, index) => {
					items += `
						<li class="item" data-url="${item.url + (item.isAppend?'':'?m3u8=') + downloadUrl}">${item.title}</li>
					`
				})
				$('#wt-download-box').append(`<view class="close"></view><div class="tips">* ${msg?msg + '(刷新页面或打开其它帖子链接将丢失,链接有效期60分钟)': '刷新页面或打开其它帖子链接将丢失,链接有效期60分钟'}</div><ul>${items}</ul>`)
			}
			if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'iPhone'){
				$('#wt-download-box ul')[0].innerHTML += `<li class="item" data-open="1" data-url="https://apps.apple.com/cn/app/m3u8-mpjex/id6449724938">苹果视频下载软件</li>`
			}
			if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'Android'){
				$('#wt-download-box ul')[0].innerHTML += `<li class="item" data-open="1" data-url="https://wwjf.lanzoul.com/isifQ18id4fa">安卓视频下载软件(密3y3a)</li>`
			}

			$("#wt-download-box").removeClass('hid-set-box');
			$("#wt-download-box").addClass('show-set-box');
			$("#wt-download-box .item").on('click', function(e) {
				const url = e.target.dataset.url
				if(e.target.dataset.type == 'copy'){
					if(url){
						util.copyText(url).then(res => {
							util.showTips({
								title: '视频地址复制成功,请尽快使用'
							})
						}).catch(err =>{
							util.showTips({
								title: '复制失败,请通过下面在线下载再复制输入框内的视频地址'
							})
						})
					}else{
						util.showTips({
							title: '抱歉,未检测到视频'
						})
					}
					return;
				}
				if (!url || !url.includes('.m3u8') && e.target.dataset.open != 1) {
					util.showTips({
						title: '抱歉,未检测到视频,还继续前往吗?',
						doubt: true,
						success: (res) => {
							if (res) {
								window.open(url)
							}
						}
					})
				} else {
					window.open(url);
				}
			})
			$("#wt-download-box .close").on('click', function() {
				$("#wt-mask-box").click()
			})
		},

		checkUpdate: async (check) => {
			const autoUpdatedVersionDate = GM_getValue('auto_updated_date', 0)
			if (autoUpdatedVersionDate > Date.now() && !check) return {
				errCode: 100,
				errMsg: '检测更新频率限制'
			}
			if (check && GM_getValue('updated_next_date', 0) > Date.now()) return {
				errCode: 200,
				errMsg: '请在 ' + new Date(GM_getValue('updated_next_date', 0)).toLocaleString() + ' 后再检查更新'
			}
			GM_setValue('updated_next_date', Date.now() + 600000)
			const result = await util.asyncHttp('https://api.jsxl.pro/openHttp' + (Math.floor(Math.random() * 2) + 1) + '00/updateCheck?name=tangxin&version=' + superVip._CONFIG_.version)
			if (result.errMsg == 'success') {
				GM_setValue('auto_updated_date', Date.now() + 18000000)
				const res = JSON.parse(result.responseText)
				if ((res.update_msg && res.is_update) || res.errMsg || res.notify_all) {
					let msgInfo = ''
					if (res.notify_all) msgInfo += '<p>-  ' + res.notify_all + '<p/>'
					if (res.errMsg) msgInfo += '<p>-  ' + res.errMsg + '<p/>'
					if (res.is_update && res.update_msg) msgInfo += res.update_msg
					const historyNotify = GM_getValue('notify')
					if (check || !historyNotify || historyNotify.msgInfo.replace(/id\=\d+/, '') != msgInfo
						.replace(/id\=\d+/, '')) {
						util.showNotify({
							title: msgInfo,
							success: () => {
								if (res) {
									superVip._CONFIG_.showNotify = false
								}
							}
						})
						util.showAndHidTips('wt_my_notify')
					}

					if (msgInfo && msgInfo.replace(/\s*/g, "").length > 0){
						GM_setValue('notify', {
							date: new Date().setHours(0, 0, 0, 0),
							msgInfo
						})
					}
				}

				if (!res.is_update){
					return { errCode: 200, errMsg: '当前版本 ' + superVip._CONFIG_.version + ' 已经是最新版本'}
				}else{
					return { errCode: 0, errMsg: 'ok'}
				}
			}else{
				return { errCode: 100, errMsg: '检测更新失败'}
			}
		},

		showNotify: (item = {}) => {
			$("#wt-notify-box").removeClass('hid-notify-box')
			$("#wt-notify-box").addClass('show-notify-box')
			let version = superVip._CONFIG_.version
			const v = /当前脚本版本 (\d\.\d\.\d\.{0,1}\d{0,2})/.exec(item.title)
			if (v) item.title = item.title.replace(v[1], version)
			if (item.title) $('#wt-notify-box .content').html(item.title + (version ?
				'<div style="text-align: right;color: #ccc;font-size: 10px;margin-top: 10px;">v ' +
				version + '</div>' : ''))
			superVip._CONFIG_.showNotify = true
			$('#wt-notify-box a').on('click', (e) => {
				e.stopPropagation()
			})
			$('#wt-notify-box').on('click', () => {
				$("#wt-notify-box").removeClass('show-notify-box')
				$("#wt-notify-box").addClass('hid-notify-box')
				superVip._CONFIG_.showNotify = false
				if (item.success) item.success(true)
			})
		}
	}
	const superVip = (function() {
		const _CONFIG_ = {
			isMobile: navigator.userAgent.match(
				/(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini)/i),
			vipBoxId: 'wt-vip-jx-box' + Math.ceil(Math.random() * 100000000),
			version: '1.0.2',
			videoUrl: {},
			downUtils: [
				{
					title: '在线下载1(适合电脑)',
					url: 'http://tools.bugscaner.com/m3u8.html',
					isAppend: false
				},
				{
					title: '在线下载2(适合电脑)',
					url: 'https://tools.thatwind.com/tool/m3u8downloader#m3u8=',
					isAppend: true
				},
				{
					title: '在线下载3(适合电脑)',
					url: 'https://blog.luckly-mjw.cn/tool-show/m3u8-downloader/index.html?source=',
					isAppend: true
				}
			]
		}
		class BaseConsumer {
			constructor(body) {
				this.parse = () => {
					setTimeout(() => {
						util.checkUpdate()
					}, 1500)
					this.interceptHttp()
					util.findTargetElement('body').then(container => {
						this.generateElement(container).then(
							container => this.bindEvent(container))
					})
				}
			}

			interceptHttp() {
				const originOpen = XMLHttpRequest.prototype.open;
				XMLHttpRequest.prototype.open = function(method, url) {
					if(url.endsWith('movie/detail') || url.endsWith('album/search') || url.endsWith('album/photoList') || url.endsWith('post/search')){
						this.requestUrl = url
						_CONFIG_.videoUrl = {}
						util.showAndHidTips('wt_player_haijiao', 'set', false);
						if (_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone') {
							const xhr = this;
							const getter = Object.getOwnPropertyDescriptor(
								XMLHttpRequest.prototype,
								"response"
							).get;
							Object.defineProperty(xhr, "responseText", {
								get: () => {
									let result = getter.call(xhr);
									try {
										_CONFIG_.videoUrl.aes = result
										return result;
									} catch (e) {
										console.log('发生异常! 解析失败!');;
										return result;
									}
								},
							});
							
							util.findTargetElementByVideoSrc().then(res =>{
								if(!_CONFIG_.videoUrl.playerUrl || !_CONFIG_.videoUrl.playerUrl.startsWith('http')){
									_CONFIG_.videoUrl.playerUrl = res
									util.showAndHidTips('wt_player_haijiao');
								}
							})
						}
					}
					if(url.endsWith('.m3u8')){
						if(!superVip._CONFIG_.videoUrl.requestErrMsg){
							superVip._CONFIG_.videoUrl = {
								playerUrl: url,
								downloadUrl: url
							}
							util.showAndHidTips('wt_player_haijiao');
						}
					}
					if(url.endsWith('movie/block')){
						util.findTargetElement('.van-dialog').then(res =>{
							if(res.__vue__){
								if(res.__vue__.touchMove){
									res.__vue__.touchMove = null
								}else{
									res.__vue__.$parent.touchMove = null
								}
							}
						})
					}
					return originOpen.call(this, method, url);
				}
				
				const oldSend = XMLHttpRequest.prototype.send;
				XMLHttpRequest.prototype.send = async function (...args) {
					if(this.requestUrl){
						await initPlayerUrl(this, this.requestUrl, args)
					}
					return oldSend.call(this, ...args)
				};
			}

			generateElement(container) {
				GM_addStyle(`
					@font-face {
					  font-family: 'iconfont';  /* Project id 3913561 */
					  src: url('//at.alicdn.com/t/c/font_3913561_cpe13fwca8.woff2?t=1696210493672') format('woff2'),
						   url('//at.alicdn.com/t/c/font_3913561_cpe13fwca8.woff?t=1696210493672') format('woff'),
						   url('//at.alicdn.com/t/c/font_3913561_cpe13fwca8.ttf?t=1696210493672') format('truetype');
					}
					.iconfont {
						font-family: "iconfont" !important;
						font-size: 16px;
						font-style: normal;
						font-weight: 400 !important;
						-webkit-font-smoothing: antialiased;
						-moz-osx-font-smoothing: grayscale;
					}
					@keyframes showSetBox {
						0% {
							transform: translate(-50%,-50%) scale(0);
						}
						80% {
							transform: translate(-50%,-50%) scale(1.1);
						}
						100% {
							transform: translate(-50%,-50%) scale(1);
						}
					}
					@keyframes hidSetBox {
						0% {
							transform: translate(-50%,-50%) scale(1);
						}
						80% {
							transform: translate(-50%,-50%) scale(1.1);
						}
						100% {
							transform: translate(-50%,-50%) scale(0);
						}
					}
					@keyframes colorAnima {
						0%{
							background-color: #f0f0f0;
							color: #5d5d5d;
							transform: scale(1);
						}
						50%{
							transform: scale(1.1);
						}
						100%{
							background-color: #ff6022;;
							color: white;
							transform: scale(1);
						}
					}
					@keyframes showNotifyBox {
						0% {
							transform: translate(-50%,-100%) scale(0);
						}
						80% {
							transform: translate(-50%,35px) scale(1.1);
						}
						100% {
							transform: translate(-50%,35px) scale(1);
						}
					}
					@keyframes hidNotifyBox {
						0% {
							transform: translate(-50%,35px) scale(1.1);
						}
						80% {
							transform: translate(-50%,35px) scale(1);
						}
						100% {
							transform: translate(-50%,-100%) scale(0);
						}
					}
					@keyframes scale {
						0%{
							transform: scale(1);
						}
						50%{
							transform: scale(1.1);
						}
						100%{
							transform: scale(1);
						}
					}
					@keyframes circletokLeft {
						0%,100% {
							left: 0px;
							width: 12px;
							height: 12px;
							z-index: 0;
						}
						25% {
							height: 15px;
							width: 15px;
							z-index: 1;
							left: 8px;
							transform: scale(1)
						}
						50% {
							width: 12px;
							height: 12px;
							left: 22px;
						}
						75% {
							width: 10px;
							height: 10px;
							left: 8px;
							transform: scale(1)
						}
					}
					@keyframes circletokRight {
						0%,100% {
							top: 3px;
							left: 22px;
							width: 12px;
							height: 12px;
							z-index: 0
						}
						25% {
							height: 15px;
							width: 15px;
							z-index: 1;
							left: 24px;
							transform: scale(1)
						}
						50% {
							width: 12px;
							height: 12px;
							left: 0px;
						}
						75% {
							width: 10px;
							height: 10px;
							left: 24px;
							transform: scale(1)
						}
					}
					.color-anima{
						animation: colorAnima .3s ease 1 forwards;
					}
					.btn-anima{
						animation: scale .3s ease 1 forwards;
					}

					html .van-overflow-hidden, body{ overflow: auto !important;}
					.bg-page .main.blur{ filter: blur(0px) !important;}
					.my-swipe, .van-dialog, .van-overlay, .android-ad, .van-swipe__track, .ad-section, .app-ad{display:none !important;z-index:-99999 !important;opacity: 0!important;width :0 !important;}

					#wt-resources-box{position: relative; border: 1px dashed #ec8181;background: #fff4f4;}
					.sell-btn{border:none !important;margin-top:20px;}
					.margin-left{ margin-left: 0 !important;}
					.show-set-box{ animation: showSetBox 0.3s ease 1 forwards;}
					.hid-set-box{ animation: hidSetBox 0.3s ease 1 forwards;}
					.show-notify-box{ animation: showNotifyBox 0.3s ease 1 forwards;}
					.hid-notify-box{ animation: hidNotifyBox 0.3s ease 1 forwards;}
					#wt-loading-box{display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 100000;background-color: #0000004d;}
					#wt-loading-box .loading{position: absolute;width: 35px;height: 17px;top: 50%;left: 50%;transform: translate(-50%,-50%);}
					#wt-loading-box .loading::before,
					#wt-loading-box .loading::after{position: absolute;content: "";top: 3px;background-color: #ffe60f;width: 14px;height: 14px;border-radius: 20px;mix-blend-mode: multiply;animation: circletokLeft 1.2s linear infinite;}
					#wt-loading-box .loading::after{animation: circletokRight 1.2s linear infinite;background-color: #4de8f4;}
					#wt-left-show{ position: fixed;left: 20px;top: 50%;transform: translateY(-50%);z-index: 99999;transition: all 0.3s ease;}
					#wt-left-show i {color: #5f5b5b;font-size: 24px;color: #E91E63;text-shadow: #E91E63 2px 2px 12px;font-size: 25px;margin-left: -1px;}
					#wt-${_CONFIG_.vipBoxId}{
						position: fixed;
						top: 50%;
						transform: translate(0, -50%);
						right: 10px;
						width: 46px;
						border-radius: 30px;
						background: rgb(64 64 64 / 81%);
						box-shadow: 1px 1px 8px 1px rgb(98 99 99 / 34%);
						z-index: 99999;
						transition: all 0.3s ease;
					}
					#wt-${_CONFIG_.vipBoxId} .item{position: relative;height: 60px;}
					.tips-yuan::before{ position: absolute; content: '';top: 12px; right: 6px;width: 8px;height: 8px; border-radius: 10px; background-color: #5ef464;}
					.tips-yuan-err::before{ position: absolute; content: '';top: 12px; right: 6px;width: 8px;height: 8px; border-radius: 10px; background-color: #f83f32;}
					#wt-${_CONFIG_.vipBoxId} .item:not(:last-child)::after{position: absolute;bottom: 0;left: 22.5%;content: '';width: 55%;height: 2px;background-color: #fff;}
					#wt-${_CONFIG_.vipBoxId} .item .iconfont,#wt-${_CONFIG_.vipBoxId} .item img{position: absolute;top:50%;left:50%;transform: translate(-50%,-50%)}
					#wt-login-box .close,#wt-set-box .close,#wt-notify-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
					#wt-login-box .close::before,#wt-login-box .close::after,#wt-set-box .close::before,#wt-set-box .close::after,#wt-notify-box .close::before,#wt-notify-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 12px;height: 2px;border-radius: 1px;background-color: #6a6a6a;transform: translate(-50%,-50%) rotate(45deg);visibility: visible;}
					#wt-login-box .close::after,#wt-set-box .close::after,#wt-notify-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
					#wt-${_CONFIG_.vipBoxId} .absolute-center{ position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);}
					#wt-${_CONFIG_.vipBoxId} #wt-my img{ width: 28px;height: 28px;border-radius: 30px;margin-left: 2px;transtion: all 0.3s ease;}
					#wt-${_CONFIG_.vipBoxId} #wt-my-set i {color: white;font-size: 24px;text-shadow: 2px 2px 14px #ffffff;font-family: 'iconfont';}
					#wt-${_CONFIG_.vipBoxId} #wt-my-down i {color: white;font-size: 24px;text-shadow: 2px 2px 15px #ffffff;font-family: 'iconfont';}
					#wt-${_CONFIG_.vipBoxId} #wt-my-notify i {color: white;font-size: 23px;padding: 10px 1px;text-shadow: 2px 2px 12px #ffffff;}
					#wt-${_CONFIG_.vipBoxId} #wt-hid-box i {color: white;font-size: 24px;text-shadow: 2px 2px 12px #ffffff;font-size: 25px;margin-left: -1px;}
					.wt-player-btn-box .player-btn{ position:absolute;top:42%;left:50%;transform:translate(-50%,-50%);width: 20%}
					.wt-player-btn-box .tips{ position: absolute;bottom: 20px;left:50%;transform: translateX(-50%);color: #FFC107;width: 80%;text-align: center;font-size: 15px;font-weight: 500;}
					#wt-mask-box,#wt-maxindex-mask{display:none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; background-color: #00000057;}
					#wt-maxindex-mask{z-index: 90000;display:none;}
					#wt-set-box{ position:fixed; top:50%;left:50%; transform: translate(-50%,-50%) scale(0);overflow: hidden;background-color: white;box-shadow: 0 15px 30px rgba(0, 0, 0, .15);border-radius: 12px;z-index: 10010;padding: 10px 15px;padding-right: 5px;box-sizing: border-box;}
					#wt-set-box::before{content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #2196F3;z-index: -1;opacity: 0.7;bottom: 0;transform: translate(-40%,58%);}
					#wt-set-box::after{content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #FFC107;z-index: -1;opacity: 0.7;top: 0;right: 0;transform: translate(22%,-53%);}
					#wt-set-box .selected-box .selected{ background-color: #ff6022;color: white;}
					#wt-set-box .user-box-container{display: none;letter-spacing: 1px;}
					#wt-set-box .user-box-container .update{display: inline-block; padding: 0 10px; height: 28px;line-height: 28px;background-color: #f1f1f1;color: #545454; border-radius: 30px;border: none;font-size: 10px;float: right;margin-right: 5px;}
					#wt-set-box .info-box{display:flex;height: 50px;align-items: center;}
					#wt-set-box .info-box .avatar-box{position: relative;height: 36px;width: 36px;background-color: white;border-radius: 7px;box-shadow: rgb(166 166 166 / 20%) 0px 1px 20px 0px;}
					#wt-set-box .user-box .title{text-align: center;font-weight: 600;font-size: 16px;color: #3a3a3a;}
					#wt-set-box .user-box .desc{flex: 8;font-size: 10px;color: #5d5d5d;margin: 0 10px;}
					#wt-set-box .user-box .avatar{position: absolute; width: 36px;height:36px;border-radius: 30px;border-radius: 7px;font-size: 0;}
					#wt-set-box .user-box .user-info{ position: relative; left: -5px; display: flex;align-items: center;margin-bottom: 4px;background-color: #f1f1f1;border-radius: 11px;padding: 7px;}
					#wt-set-box .user-box .user-info .info{margin-left: 10px;}
					#wt-set-box .user-box .user-info .info .nickname{color: #676767;font-size: 12px;}
					#wt-set-box .user-box .user-info .info .username{color: #b9b9b9;font-size: 10px;margin-top: 2px;}
					#wt-set-box .user-box .user-info .logout{position: absolute;font-size: 0;right: 12px;}
					#wt-set-box .user-box .user-info .logout button{padding: 0 10px;height: 28px;background-color: #615b5b;border-radius: 30px;color: white;border: none;font-size: 10px;}
					#wt-set-box .user-box .apps-container{ height: 330px; overflow: auto; margin-bottom: 10px;}
					#wt-tips-box,#wt-download-box{ position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);overflow: hidden;width: 240px;min-height:130px;background-color: white;border-radius:12px;z-index: 95000;padding:10px 15px;}
					#wt-tips-box,#wt-download-box .tips{ font-size: 10px;margin-top: 30px;color: #E91E63;letter-spacing: 1px;}
					#wt-tips-box .title{font-size: 16px;text-align: center;font-weight: 600;}
					#wt-tips-box .content{text-align: center;margin: 14px 0;font-size: 12px;color: #2a2a2a;font-weight: 500;word-break: break-word;}
					#wt-tips-box .content p{color: #ff4757;text-align: left;}
					#wt-tips-box .btn-box{display:flex;justify-content: space-around;}
					#wt-tips-box .btn-box button{min-width: 60px;height: 28px;background-color: #ec407a;border-radius: 30px;color: white;border: none;font-size: 12px;}
					#wt-tips-box .btn-box .cancel{display: none;background-color: #eee;color:#2a2a2a}
					#wt-tips-box .logo{position: absolute;top: 9%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;}
					#wt-tips-box .version{position: absolute;top: 5%; right: 10%;transform: rotate(-15deg);color: #dbdbdb;}
					#wt-notify-box {position: fixed;top: 2%;left: 50%;transform:translate(-50%,-100%) scale(0);overflow: hidden;width: 80%;min-height: 75px;letter-spacing: 1px;background-color: white;color:#2a2a2a;border-radius: 15px;box-shadow: 0 15px 30px rgba(0, 0, 0, .15);z-index: 95000;}
					#wt-notify-box::after{ content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #03A9F4;z-index: -1;opacity: 0.7;bottom: 0;left: 0;transform: translate(-50%,85%);}
					#wt-notify-box .title{ text-align: center;height: 35px; line-height: 35px;font-size: 15px;font-weight: 600; color: #E91E63;}
					#wt-notify-box .content{ color: #3a3a3a;padding: 10px 15px;font-size: 12px;}
					#wt-notify-box .content a{color: #1E88E5;text-decoration: underline;}
					#wt-notify-box .content p{margin-bottom: 5px;}
					.wt-player-btn-box{ position:absolute;top:0;left:0;right:0;bottom:0;z-index: 99998;background-color: #0000004d;}
					#wt-video-container{display: none; position:fixed;top: 0;left: 0;right: 0;bottom: 0; z-index: 99998;background-color: black;}
					#wt-video-container .wt-video{ position:absolute;top:50%;width:100%;transform: translateY(-50%);height: 240px; z-index: 99999;}
					#wt-video-container .wt-video video{width:100%;height: 100%;}
					.dplayer-controller{bottom: 30px !important;}
					.main-player{height: 300px;}
					.dplayer.dplayer-hide-controller .dplayer-controller{ opacity: 0 !important;transform: translateY(200%) !important;}
					.wt-close-btn{ font-size: 15px;position: absolute;top: 40px;left: 25px;color: white;}
					#wt-download-box{ z-index: 10010;}
					#wt-download-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
					#wt-download-box .close::before,#wt-download-box .close::after{position: absolute;left: 50%;top: 50%;content: '';width: 14px;height: 2px;border-radius: 1px;background-color: #adadad;transform: translate(-50%,-50%) rotate(45deg);}
					#wt-download-box .close::after,#wt-download-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
					#wt-download-box::before{content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #e91e63;z-index: -1;opacity: 0.7;top: 0;left: 0;transform: translate(-38%,-40%);}
					#wt-download-box::after{content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #FFC107;z-index: -1;opacity: 0.7;bottom: 0;right: 0;transform: translate(62%,30%);}
					#wt-download-box ul li{ height: 38px;line-height: 38px;font-size: 11px;text-align: center;color:#909090;font-weight: 500;background-color: white;box-shadow: rgb(166 166 166 / 20%) 0px 1px 5px 1px;margin: 18px 30px;border-radius: 40px;}
					`)
				if (_CONFIG_.isMobile) {
					GM_addStyle(`
						#wt-set-box {width:72%;}
					`);
				}
				let scripts = '';
				if(_CONFIG_.user && _CONFIG_.user.scripts){
					_CONFIG_.user.scripts.forEach((item, index) => {
						scripts += `
							<div class="info-box" data-index="${index}">
								<div class="avatar-box">
									<img class="avatar" src="${item.icon}"/>
								</div>
								<div class="desc">
									<text>${item.desc}</text>
								</div>
							</div>
						`;
					})
				}
				$(container).append(`
					<div id="wt-${_CONFIG_.vipBoxId}">
						<div id="wt-my" class="item wt_my_haijiao">
							<img src="https://cdn.jsxl.pro/image/null_square.png"></img>
						</div>
						<div id="wt-my-set" class="item wt_player_haijiao">
							<i class="iconfont">&#xec05;</i>
						</div>
						<div id="wt-my-down" class="item wt_my_down_haijiao">
							<i class="iconfont">&#xec09;</i>
						</div>
						<div id="wt-my-notify" class="item wt_my_notify" style="padding: 0 11px;">
							<i class="iconfont">&#xec08;</i>
						</div>
						<div id="wt-hid-box" class="item">
							<i class="iconfont">&#xec06;</i>
						</div>
					</div>
					<div id="wt-left-show" style="transform: translate(-60px,-50%);padding: 10px;">
						<i class="iconfont">&#xe704;</i>
					</div>
					<div id="wt-mask-box"></div>
					<div id="wt-set-box">
						<div class="close"></div>
						<div class="line-box" style="display:none">
						</div>
						<div class="user-box-container">
							<div class="user-box">
								<div class="title" style="margin-bottom: 10px">及时行乐插件库</div>
								<div class="user-info">
									<div class="avatar" style="position: relative;">
										<img src="https://cdn.jsxl.pro/image/null_square.png" style="width: 100%;height: 100%;border-radius: 8px;"></img>
									</div>
									<div class="info">
										<div class="nickname">请登录</div>
										<div class="username">xxxxxxxxxx</div>
									</div>
									<div class="logout">
										<button>退出登录</button>
									</div>
								</div>
								<div class="apps-container"> ${scripts}</div>
								<boutton class="update">检查更新</boutton>
							</div>
						</div>
					</div>
					<div id="wt-loading-box">
						<div class="loading"></div>
					</div>
					<div id="wt-maxindex-mask"></div>
					<div id="wt-tips-box">
						<div class="title">提示</div>
						<div class="content"></div>
						<div class="btn-box">
							<button class='cancel'>取消</button>
							<button class='submit'>确定</button>
						</div>
						<div class="logo"><p>@https://jsxl.pro</p></div>
						<div class="version"><p>v ${superVip._CONFIG_.version}</p></div>
					</div>
					<div id="wt-notify-box">
						<div class="close"></div>
						<div class="title">通知</div>
						<div class="content"></div>
					</div>
					<div id="wt-video-container">
						<div class="wt-close-btn">
							<i class="van-icon van-icon-close"></i>
							<span style="margin-left: 5px;">退出播放</span>
						</div>
						<div class="wt-video">
							<video id="wt-video" controls></video>
						</div>
					</div>
				`)
				if (_CONFIG_.user && _CONFIG_.user.avatar) {
					util.logined()
				}
				return new Promise((resolve, reject) => resolve(container));
			}

			bindEvent(container) {
				const vipBox = $(`#wt-${_CONFIG_.vipBoxId}`)
				if (GM_getValue('haijiao_hid_controller', null)) {
					vipBox.css("transform", "translate(125%, -50%)")
					$('#wt-left-show').css("transform", "translate(0, -50%)")
				}

				vipBox.find("#wt-my").on("click", () => {
					if (_CONFIG_.user) {
						$('#wt-mask-box').css('display', 'block')
						$("#wt-set-box .user-box-container").css('display', 'block')
						$("#wt-set-box").removeClass('hid-set-box')
						$("#wt-set-box").addClass('show-set-box')
						$('#wt-set-box .user-box-container .nickname').html(_CONFIG_.user.nickname)
					} else {
						util.addLogin()
						$('#wt-login-mask').css('display','block')
						$("#wt-login-box").removeClass('hid-set-box')
						$("#wt-login-box").addClass('show-set-box')
						const jsxl_login_pwd = GM_getValue('jsxl_login_pwd','')
						if(jsxl_login_pwd){
							const username = jsxl_login_pwd.substring(0,jsxl_login_pwd.indexOf('+'));
							let pwd = jsxl_login_pwd.substring(jsxl_login_pwd.indexOf('+') + 1, jsxl_login_pwd.length).substring(0,8);
							$("#wt-login-box input")[0].value = username;
							$("#wt-login-box input")[1].value = pwd;
						}
					}
				})

				vipBox.find("#wt-my-set").on("click", async () => {
					//asdfghj
					if (!_CONFIG_.user) {
						$("#wt-my").click()
						return
					}
					if(_CONFIG_.videoUrl.requestErrMsg){
						util.showTips({ title: _CONFIG_.videoUrl.requestErrMsg})
						return
					}
					if (!_CONFIG_.videoUrl.playerUrl) {
						$('#wt-loading-box').css('display', 'block')
						for (let i = 0; i < 3; i++) {
							await util.sleep(1000)
							if (_CONFIG_.videoUrl.playerUrl) {
								$('#wt-loading-box').css('display', 'none')
								break
							}
						}
						$('#wt-loading-box').css('display', 'none')
					}
					if (_CONFIG_.videoUrl.playerUrl) {
						$('#wt-video-container').css('display', 'block')
						$("#wt-hid-box").click()
						if (_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone') {
							$('.wt-video').empty()
							$('.wt-video').append(`
								<video controls width="100%" height="100%">
								    <source src="${_CONFIG_.videoUrl.playerUrl}" type="application/x-mpegURL">
								</video>
							`)
						} else {
							const video = document.querySelector('.wt-video #wt-video')
							_CONFIG_.hls_dp = new Hls()
							_CONFIG_.hls_dp.loadSource(_CONFIG_.videoUrl.playerUrl)
							_CONFIG_.hls_dp.attachMedia(video)
							_CONFIG_.hls_dp.on(Hls.Events.MANIFEST_PARSED, function() {
								video.play()
							})
						}
					}
					if (!_CONFIG_.videoUrl.playerUrl) {
						util.showTips({
							title: '</br>抱歉未检测到帖子视频,请关掉其它脚本再试,或苹果用Focus浏览器,安卓用Via浏览器再试'
						})
					}
				})

				$('#wt-video-container div').on('click', function(e) {
					e.stopPropagation()
				})

				$('.wt-close-btn').on('click', function() {
					$('#wt-video-container').css('display', 'none')
					var videos = document.querySelectorAll('video');
					videos.forEach(function(video) {
						// video.volume = 0.0
						video.pause();
					});
					if (_CONFIG_.hls_dp) _CONFIG_.hls_dp.destroy()
					$("#wt-left-show").click();
				})

				vipBox.find("#wt-my-down").on("click", () => {
					if (!_CONFIG_.user) {
						$("#wt-my").click()
						return
					}
					if(_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone' && (!_CONFIG_.videoUrl.aes || !_CONFIG_.videoUrl.playerUrl)){
						util.showTips({ title: '抱歉,未检测到视频'})
						return
					}
					if(_CONFIG_.videoUrl.requestErrMsg){
						util.showTips({ title: _CONFIG_.videoUrl.requestErrMsg})
						return
					}
					if(_CONFIG_.user.login_type != 'username_pwd'){
						util.showTips({
							title: '抱歉,登录码登入没有下载权限,请在jsxl.pro网站发电后使用账号+密码登入'
						})
						return;
					}
					if(_CONFIG_.videoUrl.downloadUrlSign){
						util.showDownLoadWindow();
						return;
					}
					if (_CONFIG_.videoUrl.downloadUrl || _CONFIG_.videoUrl.aes) {
						if(_CONFIG_.user && _CONFIG_.user.stopDownload || (_CONFIG_.user.role.useDownloadNum == _CONFIG_.user.role.maxDownloadNum) ){
							util.showTips({
								title: '抱歉,今日下载次数' + _CONFIG_.user.role.maxDownloadNum + '次已经用完,请明日再下载</br>(该jsxl账号其它登录码共享次数)'
							})
							return;
						}
						util.showTips({
							title: '为了脚本的稳定现已日限下载</br>(当前账号日限' + _CONFIG_.user.role.maxDownloadNum +'次,已使用' + _CONFIG_.user.role.useDownloadNum +'次,永久会员比非永久次数多),</br>您确定要消耗一次次数来获取视频链接吗(如失败不计数)?',
							doubt: true,
							success: async (confirm) => {
								if (confirm) {
									try {
										$('#wt-loading-box').css('display', 'block')
										await util.sleep(300);
										let obj = ''
										if(_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone'){
											obj = {
												code: encodeURIComponent(_CONFIG_.videoUrl.aes),
												isAes: true,
												origin: location.origin
											}
										}else{
											obj = {
												code: ec.knxkbxen(_CONFIG_.videoUrl.downloadUrl.startsWith('http')?_CONFIG_.videoUrl.downloadUrl: location.origin + _CONFIG_.videoUrl.downloadUrl)
											}
										}
										
										$.ajax({
											url: 'https://api.jsxl.pro/openDownload' + (Math.floor(Math.random() * 3) + 1) +'00/downloadTangxin',
											method: 'POST',
											headers: { 'JsxlToken': superVip._CONFIG_.user.token},
											contentType: 'application/json',
											data: JSON.stringify(obj),
											dataType: 'json',
											success: function(response) {
												$('#wt-loading-box').css('display', 'none')
												if (response.errCode != 0) {
													throw new Error(response.errMsg)
												}
												if(response.newToken) _CONFIG_.user.token = response.newToken;
												if(response.newRole && response.newRole.expired_date) _CONFIG_.user.role.expired_date = response.newRole.expired_date;
												_CONFIG_.user.role.useDownloadNum = response.useDownloadNum
												_CONFIG_.videoUrl.downloadUrlSign = response.data
												util.showDownLoadWindow(true, response.errMsg);
												GM_setValue('jsxl_user', _CONFIG_.user);
											},
											error: function(error) {
												$('#wt-loading-box').css('display', 'none')
												util.showTips({
													title: '请求jsxl失败'
												})
											}
										})
									} catch (e) {
										console.log(e)
										$('#wt-loading-box').css('display', 'none')
										util.showTips({
											title: e.message +
												'</br>获取下载链接失败,可能此版块视频不支持下载'
										})
										if(e.message?.includes('明日再下载')){
											_CONFIG_.user.stopDownload = true
											_CONFIG_.user.role.useDownloadNum = _CONFIG_.user.role.maxDownloadNum
											GM_setValue('jsxl_user', _CONFIG_.user);
										}
									}
								}
							}
						})
						return;
					}

					util.showTips({
						title: '需要播放按钮有小绿点或暂不支持下载'
					})
				})

				vipBox.find("#wt-hid-box").on("click", () => {
					vipBox.css("transform", "translate(125%, -50%)");
					$('#wt-left-show').css("transform", "translate(0, -50%)")
					GM_setValue('haijiao_hid_controller', 1)
				})

				$('#wt-left-show').on('click', () => {
					$('#wt-left-show').css("transform", "translate(-60px, -50%)");
					vipBox.css("transform", "translate(0, -50%)")
					GM_setValue('haijiao_hid_controller', '')
				})

				$('#wt-mask-box').on('click', () => {
					$('#wt-mask-box').css('display', 'none')
					$("#wt-set-box").removeClass('show-set-box');
					$("#wt-set-box").addClass('hid-set-box')
					$("#wt-download-box").removeClass('show-set-box');
					$("#wt-download-box").addClass('hid-set-box')
					setTimeout(() => {
						$("#wt-set-box .line-box").css('display', 'none');
						$("#wt-set-box .user-box-container").css('display', 'none')
					}, 500)
				})

				$('#wt-set-box .user-box-container .user-box .info-box').on('click', function(e) {
					let index = ''
					try {
						index = Number(e.currentTarget.attributes['data-index'].value)
					} catch (e) {
						index  = _CONFIG_.user.scripts.length - 1
					}
					window.location.href = atob(atob(atob(_CONFIG_.user.scripts[index].url)))
				})

				$(".user-box-container .update").on("click", async() => {
					$('#wt-loading-box').css('display', 'block')
					await util.sleep(300);
					const res = await util.checkUpdate(true)
					$('#wt-loading-box').css('display', 'none')
					if (res.errCode != 0) {
						util.showTips({ title: res.errMsg})
					}
				})

				$("#wt-set-box .close").on("click", () => {
					$('#wt-mask-box').click()
				})

				vipBox.find("#wt-my-notify").on("click", () => {
					if (_CONFIG_.showNotify) {
						$('#wt-notify-box').click()
					} else {
						const notify = GM_getValue('notify', '');
						if (notify && (notify.date == new Date().setHours(0, 0, 0, 0))) {
							util.showNotify({
								title: notify.msgInfo
							})
						} else {
							util.showNotify({
								title: '还没有通知信息'
							})
						};
						util.showAndHidTips('wt_my_notify', 'set', false)
					}
				})

				$("#wt-set-box .user-box .user-info").on('click', function() {
					util.showTips({
						title: '后面会做优化显示权限等信息'
					})
				})

				$('#wt-set-box .logout').on('click', function(e) {
					util.showTips({
						title: '您确定要退出登录吗?',
						doubt: true,
						success: (res) => {
							if (res) {
								util.logouted()
								$('#wt-mask-box').click()
							}
						}
					})
					e.stopPropagation()
				})

				if (!_CONFIG_.user) {
					util.addLogin()
					util.findTargetElement('#wt-my').then(res => {
						setTimeout(() => {
							res.click()
						}, 2500)
					})
				}
			}
		}

		return {
			start: () => {
				_CONFIG_.user = GM_getValue('jsxl_user', '')
				if (_CONFIG_.user) {
					if (_CONFIG_.user.login_date && (_CONFIG_.user.login_date != new Date().setHours(0, 0, 0,
							0))) {
						_CONFIG_.user = ''
						GM_setValue('jsxl_user', '')
					}
				}
				new BaseConsumer().parse()
			},
			_CONFIG_
		}
	})();
	superVip.start();
}


if(!window.jQuery){
	const script = document.createElement('script');
	script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';
	script.onload = function() {
		init(window.jQuery)
	};
	script.onerror = function(e) {
		alert('jquery初始化失败')
	};
	document.head.appendChild(script);
}else{
	init(window.jQuery)
}