Sleazy Fork is available in English.

汤头条

🔥免费无限制看所有可预览付费视频,下载视频(日限),复制播放链接,屏蔽广告

  1. // ==UserScript==
  2. // @name 汤头条
  3. // @version 1.0.0
  4. // @updateDesc
  5. // @description 🔥免费无限制看所有可预览付费视频,下载视频(日限),复制播放链接,屏蔽广告
  6. // @icon https://cdn.luckychajian.com/image/boy.jpeg
  7. // @namespace 汤头条
  8. // @author lucky
  9. // @include */pages/hjsq*
  10. // @include *://*.ttt*.*/*
  11. // @include *://p*.za*.*/*
  12. // @include *://blog.luckly-mjw.cn/*
  13. // @include *://tools.thatwind.com/*
  14. // @include *://tools.bugscaner.com/*
  15. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
  16. // @require https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.8/hls.min.js
  17. // @require https://cdnjs.cloudflare.com/ajax/libs/dplayer/1.27.1/DPlayer.min.js
  18. // @run-at document-idle
  19. // @connect trvvnhycr.com
  20. // @grant unsafeWindow
  21. // @grant GM_xmlhttpRequest
  22. // @grant GM_addStyle
  23. // @grant GM_getValue
  24. // @grant GM_setValue
  25. // @charset UTF-8
  26. // @antifeature payment
  27. // @license MIT
  28. // ==/UserScript==
  29.  
  30. function init($){
  31. 'use strict';
  32. if (location.href.includes('tools.bugscaner.com')) {
  33. util.findTargetElement('.input-group input').then(res => {
  34. const url = location.search.replace('?m3u8=', '').replace(/\s*/g, "")
  35. if (url && url.startsWith('http')) {
  36. $(res).val(url)
  37. }
  38. })
  39. return
  40. }
  41. if (location.href.includes('tools.thatwind.com')) {
  42. GM_addStyle(`.top-ad{display: none !important;}`)
  43. util.findTargetElement('.bx--text-input__field-outer-wrapper input', 10).then(res => {
  44. $(res).val(Date.now())
  45. res.dispatchEvent(new Event("input"))
  46. })
  47. return
  48. }
  49. if (location.href.includes('blog.luckly-mjw.cn')) {
  50. GM_addStyle(`
  51. #m-app a,.m-p-temp-url,.m-p-cross,.m-p-input-container div:nth-of-type(1){display: none !important;}
  52. .m-p-input-container{ display: block;}
  53. .m-p-input-container input{ width: 100%;font-size: 12px;margin-bottom: 5px;}
  54. .m-p-input-container div{ height: 45px;line-height: 45px;font-size: 15px;margin-top: 3px;}
  55. .m-p-stream{line-height: normal;font-size: 12px;}
  56. `)
  57. return
  58. }
  59. const checkLogin = function(){
  60. try{
  61. if (superVip._CONFIG_.user.login_date != new Date().setHours(0, 0, 0,0) || md5x(superVip._CONFIG_.user.ver, 'de').code != md5x(md5x(), 'de').code) {
  62. superVip._CONFIG_.user = ''
  63. GM_setValue('jsxl_user', '')
  64. util.logouted('登录已失效,请重新登录')
  65. $("#wt-my").click()
  66. return false
  67. }
  68. return true
  69. }catch(e){
  70. superVip._CONFIG_.user = ''
  71. GM_setValue('jsxl_user', '')
  72. util.logouted(e.message || '登录已失效,请重新登录')
  73. $("#wt-my").click()
  74. return false
  75. }
  76. }
  77.  
  78. const asyncXmlhttpRequest = function (url, method, params = {}){
  79. return new Promise((res, rej) =>{
  80. const request = {
  81. method: method,
  82. url: url,
  83. onload: function(response) {
  84. if(response.responseText){
  85. let result = ''
  86. try{
  87. result = JSON.parse(response.responseText)
  88. }catch(e){
  89. result = response.responseText
  90. }
  91. res(result)
  92. }else{
  93. rej('请求失败_null')
  94. }
  95. },
  96. onerror: function(e){
  97. rej('请求失败_err')
  98. },
  99. ontimeout: function(e){
  100. rej('请求超时')
  101. }
  102. }
  103. if(params.data) request.data = params.data;
  104. if(params.headers) request.headers = params.headers;
  105. GM_xmlhttpRequest(request);
  106. })
  107. }
  108. const md5x = function(s, type) {
  109. try {
  110. if (!type) {
  111. const date = new Date().setHours(0, 0, 0, 0) + '';
  112. const day = new Date().getDate();
  113. const code = date.substring(4, 8) * new Date().getDate() + '';
  114. return ec.swaqbt(JSON.stringify({
  115. date: date,
  116. code: code,
  117. day: day
  118. }));
  119. } else {
  120. const token = JSON.parse(ec.sfweccat(s));
  121. if ((new Date(Number(token.date)).getTime() + 86400000) < Date.now()) {
  122. throw Error('md5x expire');
  123. }
  124. if (token.day != new Date(Number(token.date)).getDate()) {
  125. throw Error('md5x err');
  126. }
  127. const code = (new Date(Number(token.date)).setHours(0, 0, 0, 0) + '').substring(4, 8) * token.day;
  128. if (code != token.code) {
  129. throw Error('md5x err2');
  130. }
  131. return token;
  132. }
  133. } catch (e) {
  134. return '';
  135. }
  136. }
  137. const initPlayer = function(aes, requestUrl){
  138. if(superVip._CONFIG_.hls_dpp) superVip._CONFIG_.hls_dpp.destroy()
  139. if (superVip._CONFIG_.user && superVip._CONFIG_.user.token){
  140. if(!checkLogin()){
  141. return;
  142. }
  143. }
  144. superVip._CONFIG_.video = {
  145. aes: aes,
  146. playerUrl: '',
  147. downLoadUrl: ''
  148. }
  149. try{
  150. $.ajax({
  151. url: superVip._CONFIG_.apiBaseUrl + '/s' + (Math.floor(Math.random() * 3) + 1) + '00/cktoTangTouTiao',
  152. type: 'POST',
  153. data: {
  154. aes: aes,
  155. version: superVip._CONFIG_.version
  156. },
  157. headers: {
  158. 'luckyToken': superVip._CONFIG_.user.token
  159. },
  160. dataType: 'json',
  161. success: async function(response) {
  162. if(response.errCode == 0){
  163. if(response.newToken){
  164. superVip._CONFIG_.user.token = response.newToken;
  165. GM_setValue('jsxl_user', superVip._CONFIG_.user)
  166. }
  167. asyncXmlhttpRequest(ec.cskuecede(ec.sfweccat(response.data, false)).replace(/\/\/[^.]+.[^.]+[^\/]+/, '//long.trvvnhycr.com'), 'GET').then(result =>{
  168. if(result && result.startsWith('#EXTM3U')){
  169. const file = new Blob([result], {
  170. type: 'text/plain'
  171. })
  172. superVip._CONFIG_.video.playerUrl = URL.createObjectURL(file);
  173. util.showAndHidTips('wt_my_set_91video')
  174. let findTargetEle = ''
  175. if(location.hash.includes('/player?id=')){
  176. findTargetEle = '#dx-container .dx-main .main-container .container .video-box .dx-xg-player'
  177. }
  178. if(location.hash.includes('/s-player?id=')){
  179. findTargetEle = '#dx-container .dx-main .main-container .player-container .video-swiper .flex-controls'
  180. }
  181. util.findTargetElement(findTargetEle).then(res =>{
  182. $(res).empty()
  183. $(res).append('<video id="myVideo" controls style="width:100%; height: 100%;"></video>')
  184. res = document.querySelector('#myVideo')
  185. superVip._CONFIG_.hls_dpp = new Hls()
  186. superVip._CONFIG_.hls_dpp.loadSource(superVip._CONFIG_.video.playerUrl)
  187. superVip._CONFIG_.hls_dpp.attachMedia(res)
  188. superVip._CONFIG_.hls_dpp.on(Hls.Events.MANIFEST_PARSED,function() {
  189. res.play();
  190. })
  191. })
  192. }else{
  193. throw new Error(decodeURIComponent(atob('JUU4JUE3JUEzJUU2JTlFJTkwJUU1JUE0JUIxJUU4JUI0JUE1JUVGJUJDJThDJUU4JUFGJUI3JUU1JTg4JUI3JUU2JTk2JUIwJUU5JUExJUI1JUU5JTlEJUEyJUU5JTg3JThEJUU4JUFGJTk1')))
  194. }
  195. })
  196. }else{
  197. superVip._CONFIG_.video.requestErrMsg = response.errMsg
  198. util.showTips({ title: response.errMsg})
  199. }
  200. },
  201. error: function(xhr, status, error) {
  202. const msg = 'JUU4JUFGJUI3JUU2JUIxJTgyJUU1JUE0JUIxJUU4JUI0JUE1JUVGJUJDJThDJUU4JUFGJUI3JUU1JTg4JUI3JUU2JTk2JUIwJUU5JUExJUI1JUU5JTlEJUEyJUU1JTg2JThEJUU4JUFGJTk1'
  203. superVip._CONFIG_.video.requestErrMsg = error || decodeURIComponent(atob(msg))
  204. util.showTips({ title: decodeURIComponent(atob(msg))})
  205. }
  206. });
  207. }catch(e){
  208. const msg = 'JUU4JUFGJUI3JUU2JUIxJTgyYXBpJUU1JUE0JUIxJUU4JUI0JUE1'
  209. superVip._CONFIG_.video.requestErrMsg = e.message || decodeURIComponent(atob(msg))
  210. util.showTips({ title: e.message || decodeURIComponent(atob(msg))})
  211. }
  212. }
  213. const ec = {
  214. b64: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  215. b64re: /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,
  216. swaqbt: (string, flag = true) => {
  217. string = String(string);
  218. var bitmap, a, b, c, result = "",
  219. i = 0,
  220. rest = string.length % 3;
  221. for (; i < string.length;) {
  222. if ((a = string.charCodeAt(i++)) > 255 || (b = string.charCodeAt(i++)) > 255 || (c = string
  223. .charCodeAt(i++)) > 255) {
  224. return "Failed to execute swaqbt"
  225. }
  226. bitmap = (a << 16) | (b << 8) | c;
  227. result += ec.b64.charAt(bitmap >> 18 & 63) + ec.b64.charAt(bitmap >> 12 & 63) +
  228. ec.b64.charAt(bitmap >> 6 & 63) + ec.b64.charAt(bitmap & 63);
  229. }
  230. if (flag) return ec.swaqbt(rest ? result.slice(0, rest - 3) + "===".substring(rest) : result,
  231. false)
  232. else return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result;
  233. },
  234. sfweccat: (string, flag = true) => {
  235. string = String(string).replace(/[\t\n\f\r ]+/g, "");
  236. if (!ec.b64re.test(string)) {
  237. return 'Failed to execute sfweccat'
  238. }
  239. string += "==".slice(2 - (string.length & 3));
  240. var bitmap, result = "",
  241. r1, r2, i = 0;
  242. for (; i < string.length;) {
  243. bitmap = ec.b64.indexOf(string.charAt(i++)) << 18 | ec.b64.indexOf(string.charAt(i++)) <<
  244. 12 |
  245. (r1 = ec.b64.indexOf(string.charAt(i++))) << 6 | (r2 = ec.b64.indexOf(string.charAt(
  246. i++)));
  247. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
  248. r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
  249. String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  250. }
  251. if (flag) return ec.sfweccat(result, false)
  252. else return result
  253. },
  254. knxkbxen: (s) => {
  255. s = ec.swaqbt(encodeURIComponent(JSON.stringify(s)), false);
  256. const n = Math.round(Math.random() * (s.length > 11 ? 8 : 1) + 1);
  257. const l = s.split('');
  258. const f = l.filter(i => {
  259. i == '=';
  260. })
  261. for (let i = 0; i < l.length; i++) {
  262. if (i == n) l[i] = l[i] + 'JS';
  263. if (l[i] == '=') l[i] = '';
  264. }
  265. return ec.b64[Math.floor(Math.random() * 62)] + (l.join('') + n) + f.length;
  266. },
  267. cskuecede: (s) => {
  268. if (s.startsWith('JSXL')) s = s.replace('JSXL', '');
  269. s = s.substring(ec.sfweccat('TVE9PQ=='));
  270. const n = s.substring(s.length - 2, s.length - 1);
  271. const d = s.substring(s.length - 1);
  272. const l = s.substring(0, s.length - 2).split('');
  273. for (let i = 0; i < l.length; i++) {
  274. if (i == (Number(n) + 1)) {
  275. l[i] = '';
  276. l[i + 1] = '';
  277. break;
  278. }
  279. }
  280. for (let i = 0; i < Number(d); i++) {
  281. l.plus('=')
  282. }
  283. return JSON.parse(decodeURIComponent((ec.sfweccat(l.join(''), false))))
  284. }
  285. }
  286. var obj = Object.create(null),
  287. t = Date.now();
  288. Object.defineProperty(obj, "a", {
  289. get: function() {
  290. if (Date.now() - t > 100) {
  291. const textArea = document.createElement('textarea');
  292. while (true) {
  293. try {
  294. document.body.appendChild(textArea);
  295. document.body.appendChild(textArea);
  296. localStorage.setItem(Math.random() * 2,Math.random() * 2);
  297. sessionStorage.setItem(Math.random() * 2,Math.random() * 2);
  298. } catch (e) {}
  299. }
  300. }
  301. }
  302. })
  303. setInterval(function() {
  304. console.clear();
  305. t = Date.now();
  306. (function() {})["constructor"]("debugger")();
  307. console.log(obj.a);
  308. }, 300)
  309. const util = {
  310. initAppDate: (haveBox = true)=>{
  311. let roles = '';
  312. if(superVip._CONFIG_.user && superVip._CONFIG_.user.roles){
  313. superVip._CONFIG_.user.roles.sort((a,b) =>{
  314. return a.e < b.e? 1: -1
  315. })
  316. superVip._CONFIG_.user.roles.forEach(item => {
  317. if(item.e > 2047980427789){
  318. item.vip_day = '永久'
  319. }else{
  320. const time = item.e - Date.now()
  321. if(time < 86400000 && time > 0){
  322. if(time > 3600000){
  323. item.vip_day = parseInt(time / 3600000) + '小时'
  324. }else{
  325. item.vip_day = parseInt(time / 60000) + '分钟'
  326. }
  327. }else if(time <= 0){
  328. item.vip_day = '已过期'
  329. item.expire = true
  330. }else{
  331. item.vip_day = parseInt(time / 86400000) + '天'
  332. const d = time % 86400000
  333. if(d > 3600000){
  334. item.vip_day += parseInt(d / 3600000) + '小时'
  335. }
  336. }
  337. }
  338. roles += `
  339. <div class="info-box ${item.expire?'expire':''}">
  340. <div class="avatar-box">
  341. <img class="avatar" src="${superVip._CONFIG_.cdnBaseUrl + '/image/boy.jpeg'}"/>
  342. </div>
  343. <div class="desc">
  344. <div style="font-size: 11px;">${item.n}</div>
  345. </div>
  346. <div class="vip-day">
  347. <div style="font-size: 10px;"></div>
  348. <div style="font-size: 10px;"></div>
  349. </div>
  350. </div>
  351. `;
  352. })
  353. if(haveBox){
  354. $('#wt-set-box .user-box-container .user-box .apps-container').empty()
  355. $('#wt-set-box .user-box-container .user-box .apps-container').append(roles)
  356. }
  357. }
  358. return haveBox? '': roles
  359. },
  360. logined: () => {
  361. $("#wt-my img").addClass('margin-left')
  362. $('#wt-my img').attr('src', superVip._CONFIG_.user.avatar)
  363. $('#wt-set-box .user-box-container .user-info').css('display', 'flex')
  364. $('#wt-set-box .user-box-container .user-info img').attr('src', superVip._CONFIG_.user.avatar)
  365. $('#wt-set-box .user-box-container .user-info .nickname').html(superVip._CONFIG_.user.nickname)
  366. $('#wt-set-box .user-box-container .user-info .username').html(superVip._CONFIG_.user.username)
  367. },
  368. logouted: (msg) => {
  369. superVip._CONFIG_.user = '';
  370. $("#wt-my img").removeClass('margin-left')
  371. $('#wt-my img').attr('src',superVip._CONFIG_.cdnBaseUrl + '/image/app.png')
  372. $('#wt-set-box .user-box-container .user-info').css('display', 'none')
  373. GM_setValue('jsxl_user', '')
  374. if(msg){
  375. util.showTips({
  376. title: '请重新登录,errMsg:' + msg
  377. })
  378. }
  379. },
  380. findTargetElement: (targetContainer,maxTryTime=30)=> {
  381. const body = window.document;
  382. let tabContainer;
  383. let tryTime = 0;
  384. let startTimestamp;
  385. return new Promise((resolve, reject) => {
  386. function tryFindElement(timestamp) {
  387. if (!startTimestamp) {
  388. startTimestamp = timestamp;
  389. }
  390. const elapsedTime = timestamp - startTimestamp;
  391. if (elapsedTime >= 500) {
  392. console.log("find element:" + targetContainer + ",this" + tryTime + "num")
  393. tabContainer = body.querySelector(targetContainer)
  394. if (tabContainer) {
  395. resolve(tabContainer)
  396. } else if (++tryTime === maxTryTime) {
  397. reject()
  398. } else {
  399. startTimestamp = timestamp
  400. }
  401. }
  402. if (!tabContainer && tryTime < maxTryTime) {
  403. requestAnimationFrame(tryFindElement);
  404. }
  405. }
  406. requestAnimationFrame(tryFindElement);
  407. });
  408. },
  409. sleep: (time) => {
  410. return new Promise((res, rej) => {
  411. setTimeout(() => {
  412. res()
  413. }, time)
  414. })
  415. },
  416. asyncHttp: async (url, timeout = 6000, isHeader = true) => {
  417. return new Promise((resolve, reject) => {
  418. var request = new XMLHttpRequest();
  419. request.open('GET', url, true);
  420. if(isHeader){
  421. request.setRequestHeader('luckyToken', superVip._CONFIG_.user.token);
  422. }
  423. request.timeout = timeout;
  424. request.onload = function() {
  425. if (request.readyState == 4) {
  426. if (request.status === 200) {
  427. resolve({
  428. errMsg: 'success',
  429. responseText: request.responseText
  430. });
  431. } else {
  432. resolve({
  433. errMsg: 'err1',
  434. responseText: ''
  435. });
  436. }
  437. }
  438. };
  439. request.onerror = function() {
  440. resolve({
  441. errMsg: 'err2',
  442. responseText: ''
  443. });
  444. };
  445. request.ontimeout = function() {
  446. resolve({
  447. errMsg: 'timeout',
  448. responseText: ''
  449. });
  450. };
  451. request.send();
  452. });
  453. },
  454. showDownLoadWindow: (show = true, msg) =>{
  455. if(!show){
  456. $('#wt-mask-box').css('display', 'none');
  457. $("#wt-download-box").removeClass('show-set-box');
  458. $("#wt-download-box").addClass('hid-set-box');
  459. return
  460. }
  461. $('#wt-mask-box').css('display', 'block');
  462. if(!document.querySelector('#wt-download-box')){
  463. let items = `<li class="item" data-url="${superVip._CONFIG_.video && superVip._CONFIG_.video.downLoadUrl? superVip._CONFIG_.video.downLoadUrl: ''}" data-type="copy" style="background-color: #00bcd4;color:#e0e0e0;">复制链接</li>`
  464. superVip._CONFIG_.downUtils.forEach((item,index) =>{
  465. items += `
  466. <li class="item" data-url="${item.url + (item.isAppend?'':'?m3u8=') + (superVip._CONFIG_.video && superVip._CONFIG_.video.downLoadUrl? superVip._CONFIG_.video.downLoadUrl: '')}">${item.title}</li>
  467. `
  468. })
  469. $('body').append(`
  470. <div id="wt-download-box">
  471. <view class="close"></view>
  472. <div class="tips">* ${msg?msg + '(刷新页面或打开其它视频链接将丢失,链接有效期60分钟)': '链接有效期60分钟,请尽快使用。'}</div>
  473. <ul>${items}</ul>
  474. </div>
  475. `)
  476. }else{
  477. $('#wt-download-box').empty()
  478. let items = `<li class="item" data-url="${superVip._CONFIG_.video && superVip._CONFIG_.video.downLoadUrl? superVip._CONFIG_.video.downLoadUrl: ''}" data-type="copy" style="background-color: #00bcd4;color:#e0e0e0;">复制链接</li>`
  479. superVip._CONFIG_.downUtils.forEach((item,index) =>{
  480. items += `
  481. <li class="item" data-url="${item.url + (item.isAppend?'':'?m3u8=') + (superVip._CONFIG_.video && superVip._CONFIG_.video.downLoadUrl? superVip._CONFIG_.video.downLoadUrl: '')}">${item.title}</li>
  482. `
  483. })
  484. $('#wt-download-box').append(`<view class="close"></view><div class="tips">* ${msg?msg + '(刷新页面或打开其它视频链接将丢失,链接有效期60分钟)': '刷新页面或打开其它视频链接将丢失,链接有效期60分钟'}</div><ul>${items}</ul>`)
  485. }
  486. if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'iPhone'){
  487. $('#wt-download-box ul')[0].innerHTML += `<li class="item" data-open="1" data-url="https://apps.apple.com/cn/app/m3u8-mpjex/id6449724938">苹果视频下载软件</li>`
  488. }
  489. if(superVip._CONFIG_.isMobile && superVip._CONFIG_.isMobile[0] == 'Android'){
  490. $('#wt-download-box ul')[0].innerHTML += `<li class="item" data-open="1" data-url="https://wwjf.lanzoul.com/isifQ18id4fa">安卓视频下载软件(密3y3a)</li>`
  491. }
  492. $("#wt-download-box").removeClass('hid-set-box');
  493. $("#wt-download-box").addClass('show-set-box');
  494. $("#wt-download-box .item").on('click',function(e){
  495. const url = e.target.dataset.url
  496. if(e.target.dataset.type == 'copy'){
  497. if(url){
  498. util.copyText(url).then(res => {
  499. util.showTips({
  500. title: '视频地址复制成功,请尽快使用'
  501. })
  502. }).catch(err =>{
  503. util.showTips({
  504. title: '复制失败,请通过下面在线下载再复制输入框内的视频地址'
  505. })
  506. })
  507. }else{
  508. util.showTips({
  509. title: '抱歉,未检测到视频'
  510. })
  511. }
  512. return;
  513. }
  514. if (!url || !url.includes('.m3u8') && e.target.dataset.open != 1) {
  515. util.showTips({
  516. title: '抱歉,未检测到视频,还继续前往吗?',
  517. doubt: true,
  518. success: (res) => {
  519. if (res) {
  520. window.open(url)
  521. }
  522. }
  523. })
  524. } else {
  525. window.open(url);
  526. }
  527. })
  528. $("#wt-download-box .close").on('click',function(){
  529. $("#wt-mask-box").click()
  530. })
  531. },
  532. copyText: (text) => {
  533. if (navigator.clipboard && window.isSecureContext) {
  534. return navigator.clipboard.writeText(text)
  535. } else {
  536. if (!document.execCommand('copy')) return Promise.reject()
  537. const textArea = document.createElement('textarea')
  538. textArea.style.position = 'fixed'
  539. textArea.style.top = textArea.style.left = '-100vh'
  540. textArea.style.opacity = '0'
  541. textArea.value = text
  542. document.body.appendChild(textArea)
  543. textArea.focus()
  544. textArea.select()
  545. return new Promise((resolve, reject) => {
  546. document.execCommand('copy') ? resolve() : reject()
  547. textArea.remove()
  548. })
  549. }
  550. },
  551. showTips: (item={})=>{
  552. $('#wt-maxindex-mask').css('display','block');
  553. $("#wt-tips-box").removeClass('hid-set-box');
  554. $("#wt-tips-box").addClass('show-set-box');
  555. $('#wt-tips-box .btn-box').empty();
  556. $('#wt-tips-box .btn-box').append(`
  557. <button class='cancel'>取消</button>
  558. <button class='submit'>确定</button>
  559. `)
  560. if(item.title) $('#wt-tips-box .content').html(item.title)
  561. if(item.doubt) $('#wt-tips-box .btn-box .cancel').css('display','block')
  562. if(item.confirm) $('#wt-tips-box .btn-box .submit').html(item.confirm)
  563. if (item.hidConfirm) {
  564. $('#wt-tips-box .submit').css('display', 'none');
  565. } else {
  566. $('#wt-tips-box .submit').css('display', 'block');
  567. }
  568. $('#wt-tips-box .btn-box .submit').on('click',()=>{
  569. $('#wt-maxindex-mask').css('display','none');
  570. $("#wt-tips-box").removeClass('show-set-box');
  571. $("#wt-tips-box").addClass('hid-set-box');
  572. if(item.success) item.success(true);
  573. })
  574. $('#wt-tips-box .btn-box .cancel').on('click',()=>{
  575. $('#wt-maxindex-mask').css('display','none');
  576. $("#wt-tips-box").removeClass('show-set-box');
  577. $("#wt-tips-box").addClass('hid-set-box');
  578. if(item.success) item.success(false)
  579. })
  580. },
  581. addLogin: ()=>{
  582. if ($('#wt-login-box').length > 0) {
  583. $("#wt-login-box input").val('');
  584. return;
  585. }
  586. $('body').append(`
  587. <div id="wt-login-mask"></div>
  588. <div id="wt-login-box">
  589. <div class="logo">
  590. <p style="font-size: 10px;">@${superVip._CONFIG_.homeUrl}</p>
  591. <p style="font-size: 10px;">v ${superVip._CONFIG_.version}</p>
  592. </div>
  593. <div class="close"></div>
  594. <div class="title">登录码</div>
  595. <textarea class="max-input" placeholder="请输入${superVip._CONFIG_.homeUrl}网址以字符lucky开头的登录码"></textarea>
  596. <div class="j-login-btn">
  597. <button >登录</button>
  598. </div>
  599. <div class="to-index" style="display: flex;justify-content: space-between;color: #00bcd4; height: 40px;line-height: 40px;font-size: 11px;font-weight: 500;">
  600. <div class="wt-register" style="font-size: 12px;">注册登录码</div>
  601. <div class="wt-index" style="font-size: 12px;">去发电获取权限?</div>
  602. </div>
  603. </div>
  604. `)
  605. GM_addStyle(`
  606. #wt-login-mask{ display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11000;background-color: #0000004d;}
  607. #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;}
  608. #wt-login-box::before{display: none; content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #00bcd4;z-index: -1;opacity: 0.7;bottom: 110px;right: 100px;}
  609. #wt-login-box::after{display: none;content:'';position: absolute;width: 250px;height: 250px;border-radius: 200px;background-color: #2196F3;z-index: -1;opacity: 0.7;top: 115px;right: -112px;}
  610. #wt-login-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
  611. #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);}
  612. #wt-login-box .close::after,#wt-set-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
  613. #wt-login-box .max-input{display: block;margin: 0 auto;resize: none;width: 180px;font-size: 12px;height: 150px;outline: none;padding: 10px;border-radius: 12px;border: none;background-color: #f5f5f5;color: #838383;}
  614. #wt-login-box textarea::-webkit-input-placeholder {letter-spacing: 1px;color: #ccc;}
  615. #wt-login-box textarea:-moz-placeholder {letter-spacing: 1px;color: #ccc;}
  616. #wt-login-box textarea::-moz-placeholder {letter-spacing: 1px;color: #ccc;}
  617. #wt-login-box .title{font-weight: 600;font-size: 16px;color: #3a3a3a;text-align: center;margin-bottom: 20px;}
  618. #wt-login-box .j-login-btn{width: 100px;padding: 2px;height: 40px;font-size: 12px;margin: 15px auto;}
  619. #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: #00bcd4;}
  620. #wt-login-box .logo{position: absolute;top: 5%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;z-index: -10;}
  621. `)
  622. $("#wt-login-mask").on("click", () => {
  623. $('#wt-login-mask').css('display', 'none')
  624. $("#wt-login-box").removeClass('show-set-box')
  625. $("#wt-login-box").addClass('hid-set-box')
  626. })
  627. $("#wt-login-box .close").on("click", () => {
  628. $('#wt-login-mask').css('display', 'none')
  629. $("#wt-login-box").removeClass('show-set-box')
  630. $("#wt-login-box").addClass('hid-set-box')
  631. })
  632. $("#wt-login-box .to-index .wt-register").on("click", () => {
  633. window.open(superVip._CONFIG_.homeUrl + '/#/pages/login/login')
  634. })
  635. $("#wt-login-box .to-index .wt-index").on("click", () => {
  636. window.open(superVip._CONFIG_.homeUrl +'/#/')
  637. })
  638. $("#wt-login-box .j-login-btn button").on("click", async () => {
  639. try{
  640. $('#wt-loading-box').css('display', 'block')
  641. await util.sleep(300);
  642. $("#wt-login-box .j-login-btn button").addClass('btn-anima')
  643. setTimeout(() => {
  644. $("#wt-login-box .j-login-btn button").removeClass('btn-anima')
  645. }, 500)
  646. const code = $("#wt-login-box textarea")[0].value.replace(/\s+/g, '');
  647. const splits = code.split('-')
  648. if(code.length < 100 || splits.length != 6 || splits[0] != 'lucky' || splits[splits.length-1] != 'lucky' || splits[1].length != splits[2] || splits[3].length != 32 || splits[4].length != 14){
  649. setTimeout(() => {
  650. $('#wt-loading-box').css('display', 'none')
  651. util.showTips({
  652. title: '登录码错误,请使用' + superVip._CONFIG_.homeUrl + '网站的登录码登入插件</br>' + superVip._CONFIG_.guide
  653. })
  654. }, 2000)
  655. return
  656. }
  657. $.ajax({
  658. url: superVip._CONFIG_.apiBaseUrl + '/l' + (Math.floor(Math.random() * 2) + 1) + '00/ls',
  659. method: "POST",
  660. timeout: 12000,
  661. data: {
  662. username: code,
  663. ap: 'Y7D3PJUU2JUIxJUE0JUU1JUE0JUI0JUU2JTlEJUExk9f3w',
  664. version: superVip._CONFIG_.version
  665. },
  666. dataType: 'json',
  667. success: function(response) {
  668. if (response.errCode != 0) {
  669. $('#wt-loading-box').css('display', 'none');
  670. util.showTips({
  671. title: response.errMsg + ',' + superVip._CONFIG_.guide
  672. })
  673. } else {
  674. const res = {
  675. avatar: response.data.user.avatar,
  676. username: superVip._CONFIG_.homeUrl,
  677. nickname: response.data.user.nickname,
  678. login_date: new Date().setHours(0,0,0,0),
  679. token: response.data.token,
  680. role: response.data.user.current_role,
  681. roles: response.data.user.r,
  682. downloadTips: response.data.utilObj.downloadTips,
  683. d: response.d
  684. }
  685. superVip._CONFIG_.user = res
  686. superVip._CONFIG_.user.ver = md5x(superVip)
  687. util.logined()
  688. GM_setValue('jsxl_user', res)
  689. GM_setValue('jsxl_login_code', code)
  690. if(response.data?.utilObj?.notify){
  691. const historyNotify = GM_getValue('notify')
  692. if (!historyNotify || historyNotify != response.data.utilObj.notify) {
  693. GM_setValue('notifyShow', true);
  694. util.showAndHidTips('wt_my_notify')
  695. GM_setValue('notify', response.data.utilObj.notify)
  696. }
  697. }
  698. $('#wt-loading-box').css('display', 'none')
  699. $('#wt-login-mask').css('display','none')
  700. $("#wt-login-box").removeClass('show-set-box')
  701. $("#wt-login-box").addClass('hid-set-box')
  702. util.showTips({
  703. title: response.errMsg,
  704. success: (e) => {
  705. window.location.reload()
  706. }
  707. })
  708. }
  709. },
  710. error: function(e) {
  711. $('#wt-loading-box').css('display', 'none')
  712. console.log(e)
  713. util.showTips({
  714. title: '网络延迟登录失败,请关掉梯子(vpn)再试或梯子尝试换港台地区节点再试,一般关掉梯子多试几次登录就行,' + superVip._CONFIG_.guide
  715. })
  716. }
  717. });
  718. }catch(e){
  719. $('#wt-loading-box').css('display', 'block')
  720. alert(e)
  721. util.showTips({
  722. title: '网络延迟登录失2,请关掉梯子(vpn)再试或梯子尝试换港台地区节点再试,一般关掉梯子多试几次登录就行,' + superVip._CONFIG_.guide
  723. })
  724. }
  725. })
  726. },
  727. showAndHidTips: (name,op='set',val=true)=> {
  728. let tips = GM_getValue('wt_tips',{})
  729. if(!tips) tips = {}
  730. if(op == 'set'){
  731. tips[name] = val
  732. GM_setValue('wt_tips',tips)
  733. if(val) $('.'+name).addClass('tips-yuan')
  734. else $('.'+name).removeClass('tips-yuan')
  735. return true
  736. }else{
  737. return tips[name]?true: false
  738. }
  739. },
  740. showNotify: (item = {}) => {
  741. $("#wt-notify-box").removeClass('hid-notify-box')
  742. $("#wt-notify-box").addClass('show-notify-box')
  743. let version = GM_info
  744. version = version ? version.script.version : ''
  745. const v = /当前插件版本 (\d\.\d\.\d\.{0,1}\d{0,2})/.exec(item.title)
  746. if (v) item.title = item.title.replaceAll(v[1], version)
  747. if (item.title) $('#wt-notify-box .content').html(item.title + (version ?
  748. '<div style="text-align: right;color: #ccc;font-size: 10px;margin-top: 10px;">v ' +
  749. version + '</div>' : ''))
  750. superVip._CONFIG_.showNotify = true
  751. $('#wt-notify-box a').on('click', (e) => {
  752. e.stopPropagation()
  753. })
  754. $('#wt-notify-box').on('click', () => {
  755. $("#wt-notify-box").removeClass('show-notify-box')
  756. $("#wt-notify-box").addClass('hid-notify-box')
  757. superVip._CONFIG_.showNotify = false
  758. if (item.success) item.success(true)
  759. })
  760. }
  761. }
  762.  
  763. const superVip = (function () {
  764. const _CONFIG_ = {
  765. homeUrl: 'https://vip.luckychajian.cn',
  766. apiBaseUrl: 'https://api.luckychajian.com',
  767. cdnBaseUrl: 'https://cdn.luckychajian.com',
  768. guide: '如长时间无法登录请前往以下网站查看公告或尝试联系客服</br></br>Lucky公告网址</br></br><a href="http://luckychajian.3vhost.work?pwd=lucky">luckychajian.3vhost.work?pwd=lucky</a>',
  769. isMobile: navigator.userAgent.match(/(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini)/i),
  770. vipBoxId: 'wt-vip-jx-box' + Math.ceil(Math.random() * 100000000),
  771. version: '1.0.0',
  772. downUtils:[
  773. {title: '在线下载1(适合电脑)',url:'http://tools.bugscaner.com/m3u8.html',isAppend: false},
  774. {title: '在线下载2(适合电脑)',url:'https://tools.thatwind.com/tool/m3u8downloader#m3u8=',isAppend: true},
  775. {title: '在线下载3(适合电脑)',url:'https://blog.luckly-mjw.cn/tool-show/m3u8-downloader/index.html?source=',isAppend: true}
  776. ]
  777. }
  778. class BaseConsumer {
  779. constructor(body) {
  780. this.parse = () => {
  781. this.interceptHttp()
  782. util.findTargetElement('body').then(container => this.generateElement(container).then(container => this.bindEvent(container)))
  783. }
  784. }
  785. interceptHttp(){
  786. if(location.href.includes('/pages/hjsq')){
  787. const interceptMedia = (element) => {
  788. if(element.src && element.src.match(/\.mp4$/)){
  789. if(!superVip._CONFIG_.video.playerUrl || superVip._CONFIG_.video.playerUrl != element.src){
  790. superVip._CONFIG_.video.downloadUrlSign = ''
  791. superVip._CONFIG_.video.playerUrl = element.src
  792. superVip._CONFIG_.video.type = 0
  793. superVip._CONFIG_.video.playerType = 'mp4'
  794. util.showAndHidTips('wt_player_haijiao');
  795. }
  796. }
  797. };
  798. setInterval(()=>{
  799. document.querySelectorAll('#myVideo source').forEach(interceptMedia);
  800. },700)
  801. }
  802. const _open = XMLHttpRequest.prototype.open;
  803. XMLHttpRequest.prototype.open = function(...args) {
  804. try {
  805. if (args[1] && args[1].endsWith('/api/MvDetail/detail')) {
  806. if(_CONFIG_.video && _CONFIG_.video.playerUrl){
  807. URL.revokeObjectURL(_CONFIG_.video.playerUrl)
  808. }
  809. if (_CONFIG_.user && _CONFIG_.user.token) {
  810. const xhr = this;;
  811. const getter = Object.getOwnPropertyDescriptor(
  812. XMLHttpRequest.prototype,
  813. "response"
  814. ).get;
  815. Object.defineProperty(xhr, "responseText", {
  816. get: () => {
  817. const result = getter.call(xhr);
  818. try {
  819. const res = JSON.parse(result, `utf-8`);
  820. if(res.errcode == 0){
  821. initPlayer(res.data, args[1]);
  822. }
  823. return result;
  824. } catch (e) {
  825. return result;
  826. }
  827. }
  828. });
  829. }
  830. }
  831. } catch (e) {}
  832. return _open.apply(this, args);
  833. }
  834. }
  835. generateElement(container) {
  836. GM_addStyle(`
  837. @font-face {
  838. font-family: 'iconfont'; /* Project id 4784633 */
  839. src: url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.woff2?t=1734418085047') format('woff2'),
  840. url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.woff?t=1734418085047') format('woff'),
  841. url('//at.alicdn.com/t/c/font_4784633_m832t9irm9f.ttf?t=1734418085047') format('truetype');
  842. }
  843. .iconfont {
  844. font-family: "iconfont" !important;
  845. font-size: 16px;
  846. font-style: normal;
  847. font-weight: 400 !important;
  848. -webkit-font-smoothing: antialiased;
  849. -moz-osx-font-smoothing: grayscale;
  850. }
  851. @keyframes showSetBox {
  852. 0% {
  853. transform: translate(-50%,-50%) scale(0);
  854. }
  855. 80% {
  856. transform: translate(-50%,-50%) scale(1.1);
  857. }
  858. 100% {
  859. transform: translate(-50%,-50%) scale(1);
  860. }
  861. }
  862. @keyframes hidSetBox {
  863. 0% {
  864. transform: translate(-50%,-50%) scale(1);
  865. }
  866. 80% {
  867. transform: translate(-50%,-50%) scale(1.1);
  868. }
  869. 100% {
  870. transform: translate(-50%,-50%) scale(0);
  871. }
  872. }
  873. @keyframes showNotifyBox {
  874. 0% {
  875. transform: translate(-50%,-100%) scale(0);
  876. }
  877. 80% {
  878. transform: translate(-50%,35px) scale(1.1);
  879. }
  880. 100% {
  881. transform: translate(-50%,35px) scale(1);
  882. }
  883. }
  884. @keyframes hidNotifyBox {
  885. 0% {
  886. transform: translate(-50%,35px) scale(1.1);
  887. }
  888. 80% {
  889. transform: translate(-50%,35px) scale(1);
  890. }
  891. 100% {
  892. transform: translate(-50%,-100%) scale(0);
  893. }
  894. }
  895. @keyframes colorAnima {
  896. 0%{
  897. background-color: #f0f0f0;
  898. color: #5d5d5d;
  899. transform: scale(1);
  900. }
  901. 50%{
  902. transform: scale(1.1);
  903. }
  904. 100%{
  905. background-color: #ff6022;;
  906. color: white;
  907. transform: scale(1);
  908. }
  909. }
  910. @keyframes scale {
  911. 0%{
  912. transform: scale(1);
  913. }
  914. 50%{
  915. transform: scale(1.1);
  916. }
  917. 100%{
  918. transform: scale(1);
  919. }
  920. }
  921. @keyframes circletokLeft {
  922. 0%,100% {
  923. left: 0px;
  924. width: 12px;
  925. height: 12px;
  926. z-index: 0;
  927. }
  928. 25% {
  929. height: 15px;
  930. width: 15px;
  931. z-index: 1;
  932. left: 8px;
  933. transform: scale(1)
  934. }
  935. 50% {
  936. width: 12px;
  937. height: 12px;
  938. left: 22px;
  939. }
  940. 75% {
  941. width: 10px;
  942. height: 10px;
  943. left: 8px;
  944. transform: scale(1)
  945. }
  946. }
  947. @keyframes circletokRight {
  948. 0%,100% {
  949. top: 3px;
  950. left: 22px;
  951. width: 12px;
  952. height: 12px;
  953. z-index: 0
  954. }
  955. 25% {
  956. height: 15px;
  957. width: 15px;
  958. z-index: 1;
  959. left: 24px;
  960. transform: scale(1)
  961. }
  962. 50% {
  963. width: 12px;
  964. height: 12px;
  965. left: 0px
  966. }
  967. 75% {
  968. width: 10px;
  969. height: 10px;
  970. left: 24px;
  971. transform: scale(1)
  972. }
  973. }
  974. .color-anima{
  975. animation: colorAnima .3s ease 1 forwards;
  976. }
  977. .btn-anima{
  978. animation: scale .3s ease 1 forwards;
  979. }
  980. .preview-tip,.van-overlay,.van-popup,.my-top-swipe{display:none !important;z-index:-99999 !important;opacity: 0!important;width :0 !important;}
  981. .swiper-slide{top: -50px;}
  982. #wt-resources-box{border: 1px dashed #ec8181;background: #fff4f4;}
  983. .sell-btn{border:none !important;margin-top:20px;}
  984. .margin-left{ margin-left: 0 !important;}
  985. .show-set-box{ animation: showSetBox 0.3s ease 1 forwards;}
  986. .hid-set-box{ animation: hidSetBox 0.3s ease 1 forwards;}
  987. .show-notify-box{ animation: showNotifyBox 0.3s ease 1 forwards;}
  988. .hid-notify-box{ animation: hidNotifyBox 0.3s ease 1 forwards;}
  989. #wt-loading-box{display: none;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 100000;background-color: #0000004d;}
  990. #wt-loading-box .loading{position: absolute;width: 35px;height: 17px;top: 50%;left: 50%;transform: translate(-50%,-50%);}
  991. #wt-loading-box .loading::before,
  992. #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;}
  993. #wt-loading-box .loading::after{animation: circletokRight 1.2s linear infinite;background-color: #4de8f4;}
  994. #wt-left-show{ position: fixed;left: 20px;top: 50%;transform: translateY(-50%);z-index: 9999;transition: all 0.3s ease;}
  995. #wt-left-show i {color: #5f5b5b;font-size: 27px;color: #e91e63;text-shadow: #e91e63 2px 2px 12px;font-size: 25px;margin-left: -1px;}
  996. #wt-${_CONFIG_.vipBoxId}{
  997. position: fixed;
  998. top: 50%;
  999. transform: translate(0, -50%);
  1000. right: 10px;
  1001. width: 46px;
  1002. border-radius: 30px;
  1003. background: rgb(64 64 64 / 81%);
  1004. box-shadow: 1px 1px 8px 1px rgb(98 99 99 / 34%);
  1005. z-index: 9999;
  1006. transition: all 0.3s ease;
  1007. }
  1008. #wt-${_CONFIG_.vipBoxId} .item{position: relative;height: 60px;}
  1009. .tips-yuan::before{ position: absolute; content: '';top: 12px; right: 6px;width: 8px;height: 8px; border-radius: 10px; background-color: #5ef464;}
  1010. #wt-${_CONFIG_.vipBoxId} .item:not(:last-child)::after{position: absolute;bottom: 0;left: 22.5%;content: '';width: 55%;height: 2px;background-color: #fff;}
  1011. #wt-${_CONFIG_.vipBoxId} .item .iconfont,#wt-${_CONFIG_.vipBoxId} .item img{position: absolute;top:50%;left:50%;transform: translate(-50%,-50%)}
  1012. #wt-login-box .close,#wt-set-box .close,#wt-notify-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
  1013. #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: #adadad;transform: translate(-50%,-50%) rotate(45deg);visibility: visible;}
  1014. #wt-login-box .close::after,#wt-set-box .close::after,#wt-notify-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
  1015. #wt-${_CONFIG_.vipBoxId} .absolute-center{ position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);}
  1016. #wt-${_CONFIG_.vipBoxId} #wt-my img{ width: 28px;height: 28px;border-radius: 30px;margin-left: 2px;transtion: all 0.3s ease;}
  1017. #wt-${_CONFIG_.vipBoxId} #wt-my-set i {color: white;font-size: 24px;text-shadow: 2px 2px 14px #ffffff;font-family: 'iconfont';}
  1018. #wt-${_CONFIG_.vipBoxId} #wt-my-down i {color: white;font-size: 24px;text-shadow: 2px 2px 15px #ffffff;font-family: 'iconfont';}
  1019. #wt-${_CONFIG_.vipBoxId} #wt-my-notify i {color: white;font-size: 27px;padding: 10px 1px;text-shadow: 2px 2px 12px #ffffff;}
  1020. #wt-${_CONFIG_.vipBoxId} #wt-hid-box i {color: white;font-size: 21px;text-shadow: 2px 2px 12px #ffffff;margin-left: -1px;}
  1021. #wt-mask-box,#wt-maxindex-mask{display:none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; background-color: #0000004d;}
  1022. #wt-maxindex-mask{z-index: 90000;display:none;}
  1023. #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;width: 300px;}
  1024. #wt-set-box::before{content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #2196F3;z-index: -1;opacity: 0.7;left: 0;bottom: 0;transform: translate(-52%,58%);}
  1025. #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(38%,-53%);}
  1026. #wt-set-box .selected-box .selected{ background-color: #ff6022;color: white;}
  1027. #wt-set-box .user-box-container{display: none;letter-spacing: 1px;}
  1028. #wt-set-box .info-box{display:flex;height: 50px;align-items: center;}
  1029. #wt-set-box .expire{ opacity: 0.35;}
  1030. #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;}
  1031. #wt-set-box .user-box .title{text-align: center;font-weight: 600;font-size: 16px;color: #3a3a3a;}
  1032. #wt-set-box .user-box .desc{display: flex;flex-direction: column;height: 36px;justify-content: space-around;flex: 8;font-size: 10px;color: #5d5d5d;margin-left: 10px;}
  1033. #wt-set-box .user-box .vip-day{margin-right: 10px;text-align: center;color: #8a8a8a;font-size: 11px;}
  1034. #wt-set-box .user-box .avatar{position: absolute; width: 36px;height:36px;border-radius: 30px;border-radius: 7px;font-size: 0;}
  1035. #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;}
  1036. #wt-set-box .user-box .user-info .info{margin-left: 10px;width: 180px;}
  1037. #wt-set-box .user-box .user-info .info .nickname{color: #676767;font-size: 12px;letter-spacing: 1px;}
  1038. #wt-set-box .user-box .user-info .info .username{color: #b9b9b9;font-size: 10px;margin-top: 2px;}
  1039. #wt-set-box .user-box .user-info .logout{position: absolute;font-size: 0;right: 12px;}
  1040. #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;}
  1041. #wt-set-box .user-box .apps-container{ height: 330px; overflow: auto; margin-bottom: 10px;}
  1042. #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:10px;z-index: 95000;padding:10px 15px;}
  1043. #wt-tips-box,#wt-download-box .tips{ font-size: 10px;margin-top: 30px;color: #00bcd4;letter-spacing: 1px;}
  1044. #wt-tips-box .title{font-size: 16px;text-align: center;font-weight: 600;}
  1045. #wt-tips-box .content{text-align: center;margin: 14px 0;font-size: 12px;color: #2a2a2a;font-weight: 500;word-break: break-word;}
  1046. #wt-tips-box .content p{color: #ff4757;text-align: left;}
  1047. #wt-tips-box a{color: #1E88E5;text-decoration: underline;}
  1048. #wt-tips-box .btn-box{display:flex;justify-content: space-around;}
  1049. #wt-tips-box .btn-box button{min-width: 60px;height: 28px;background-color: #00bcd4;border-radius: 30px;color: white;border: none;font-size: 12px;}
  1050. #wt-tips-box .btn-box .cancel{display: none;background-color: #eee;color:#2a2a2a}
  1051. #wt-tips-box .logo{position: absolute;top: 9%;left: 1%; color: #dbdbdb; font-size: 11px;transform: rotate(-15deg);text-align: center;z-index: -10;}
  1052. #wt-tips-box .version{position: absolute;top: 9%; right: 10%;transform: rotate(-15deg);color: #dbdbdb;}
  1053. #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;}
  1054. #wt-notify-box::after{display:none; 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(-42%,85%);}
  1055. #wt-notify-box .title{ text-align: center;height: 35px; line-height: 35px;font-size: 15px;font-weight: 600; color: #00bcd4;}
  1056. #wt-notify-box .content{ color: #3a3a3a;padding: 10px 15px;font-size: 12px;}
  1057. #wt-notify-box .content a{color: #1E88E5;text-decoration: underline;}
  1058. #wt-notify-box .content p{margin-bottom: 5px;}
  1059. #wt-video-container{display: none; position:absolute;top: 0;left: 0;right: 0;bottom: 0; z-index: 9998;background-color: black;}
  1060. #wt-video-container .wt-video{ position:absolute;top:50%;width:100%;transform: translateY(-50%);height: 240px; z-index: 9999;}
  1061. #wt-video-container .wt-video video{width:100%;height: 100%;}
  1062. .dplayer-controller{bottom: 30px !important;}
  1063. .dplayer.dplayer-hide-controller .dplayer-controller{ opacity: 0 !important;transform: translateY(200%) !important;}
  1064. .wt-close-btn{ font-size: 15px;position: absolute;top: 40px;left: 25px;color: white;}
  1065. #wt-download-box{ z-index: 10010;}
  1066. #wt-download-box .close{position: absolute;right: 0px;top: 0px;width: 40px;height: 40px;}
  1067. #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);}
  1068. #wt-download-box .close::after,#wt-download-box .close::after{transform: translate(-50%,-50%) rotate(-45deg);}
  1069. #wt-download-box::before{display: none;content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #00bcd4;z-index: -1;opacity: 0.7;top: 0;right: 153px;transform: translateY(-40%);}
  1070. #wt-download-box::after{display: none;content:'';position: absolute;width: 150px;height: 150px;border-radius: 100px;background-color: #FFC107;z-index: -1;opacity: 0.7;bottom: 0;right: -100px;transform: translateY(30%);}
  1071. #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;}
  1072. `
  1073. )
  1074. if(window.navigator.userAgent.includes('Safari')){
  1075. GM_addStyle(`
  1076. .swiper-slide{top: -50px;}
  1077. `)
  1078. }
  1079. if (_CONFIG_.isMobile) {
  1080. GM_addStyle(`
  1081. #wt-set-box {width:80%;}
  1082. `);
  1083. }
  1084. const roles = util.initAppDate(false);
  1085. $(container).append(`
  1086. <div id="wt-${_CONFIG_.vipBoxId}">
  1087. <div id="wt-my" class="item wt_my_91video">
  1088. <img src="${_CONFIG_.cdnBaseUrl + '/image/app.png'}"></img>
  1089. </div>
  1090. <div id="wt-my-set" class="item wt_my_set_91video">
  1091. <i class="iconfont">&#xe623;</i>
  1092. </div>
  1093. <div id="wt-my-down" class="item wt_my_down_91video">
  1094. <i class="iconfont">&#xe61c;</i>
  1095. </div>
  1096. <div id="wt-my-notify" class="item wt_my_notify">
  1097. <i class="iconfont">&#xe604;</i>
  1098. </div>
  1099. <div id="wt-hid-box" class="item">
  1100. <i class="iconfont">&#xe65f;</i>
  1101. </div>
  1102. </div>
  1103. <div id="wt-left-show" style="transform: translate(-60px,-50%);padding: 10px;">
  1104. <i class="iconfont">&#xe675;</i>
  1105. </div>
  1106. <div id="wt-mask-box"></div>
  1107. <div id="wt-set-box">
  1108. <div class="close"></div>
  1109. <div class="line-box" style="display:none">
  1110. </div>
  1111. <div class="user-box-container">
  1112. <div class="user-box">
  1113. <div class="title" style="margin-bottom: 10px">我的电量</div>
  1114. <div class="user-info">
  1115. <div class="avatar" style="position: relative;">
  1116. <img src="${_CONFIG_.cdnBaseUrl + '/image/app.png'}" style="width: 100%;height: 100%;border-radius: 8px;"></img>
  1117. </div>
  1118. <div class="info">
  1119. <div class="nickname">请登录</div>
  1120. <div class="username">xxxxxxxxxx</div>
  1121. </div>
  1122. <div class="logout">
  1123. <button>退出登录</button>
  1124. </div>
  1125. </div>
  1126. <div class="apps-container"> ${roles}</div>
  1127. </div>
  1128. </div>
  1129. </div>
  1130. <div id="wt-loading-box">
  1131. <div class="loading"></div>
  1132. </div>
  1133. <div id="wt-maxindex-mask"></div>
  1134. <div id="wt-tips-box">
  1135. <div class="title">提示</div>
  1136. <div class="content"></div>
  1137. <div class="btn-box">
  1138. <button class='cancel'>取消</button>
  1139. <button class='submit'>确定</button>
  1140. </div>
  1141. <div class="logo"><p style="font-size: 10px;">@${superVip._CONFIG_.homeUrl}</p></div>
  1142. <div class="version"><p style="font-size: 10px;">v ${superVip._CONFIG_.version}</p></div>
  1143. </div>
  1144. <div id="wt-notify-box">
  1145. <div class="close"></div>
  1146. <div class="title">通知</div>
  1147. <div class="content"></div>
  1148. </div>
  1149. <div id="wt-video-container">
  1150. <div class="wt-close-btn">
  1151. <i class="van-icon van-icon-close"></i>
  1152. <span style="margin-left: 5px;">退出播放</span>
  1153. </div>
  1154. <div class="wt-video">
  1155. <video id="wt-video" controls></video>
  1156. </div>
  1157. </div>
  1158. `)
  1159. if (_CONFIG_.user && _CONFIG_.user.avatar) {
  1160. util.logined()
  1161. }
  1162. return new Promise((resolve, reject) => resolve(container));
  1163. }
  1164. bindEvent(container) {
  1165. const vipBox = $(`#wt-${_CONFIG_.vipBoxId}`)
  1166. if(GM_getValue('91video_hid_controller',null)){
  1167. vipBox.css("transform","translate(125%, -50%)")
  1168. $('#wt-left-show').css("transform","translate(0, -50%)")
  1169. }
  1170. //点击 我的
  1171. vipBox.find("#wt-my").on("click", () => {
  1172. if(_CONFIG_.user){
  1173. if(_CONFIG_.myBtnOpen) return
  1174. _CONFIG_.myBtnOpen = true
  1175. $('#wt-mask-box').css('display','block')
  1176. $("#wt-set-box .user-box-container").css('display','block')
  1177. $("#wt-set-box").removeClass('hid-set-box')
  1178. $("#wt-set-box").addClass('show-set-box')
  1179. $('#wt-set-box .user-box-container .nickname').html(_CONFIG_.user.nickname)
  1180. util.initAppDate()
  1181. }else{
  1182. util.addLogin()
  1183. $('#wt-login-mask').css('display','block')
  1184. $("#wt-login-box").removeClass('hid-set-box')
  1185. $("#wt-login-box").addClass('show-set-box')
  1186. const jsxl_login_code = GM_getValue('jsxl_login_code','')
  1187. if(jsxl_login_code){
  1188. $("#wt-login-box .max-input")[0].value = jsxl_login_code;
  1189. }
  1190. }
  1191. })
  1192. // 点击 播放
  1193. vipBox.find("#wt-my-set").on("click", async() => {
  1194. try{
  1195. document.querySelector('video').pause()
  1196. }catch(e){}
  1197. if(!_CONFIG_.user){
  1198. $("#wt-my").click()
  1199. return
  1200. }
  1201. if(_CONFIG_.video.requestErrMsg){
  1202. util.showTips({ title: _CONFIG_.video.requestErrMsg})
  1203. return
  1204. }
  1205. if (!_CONFIG_.video.playerUrl) {
  1206. $('#wt-loading-box').css('display', 'block')
  1207. for (let i = 0; i < 5; i++) {
  1208. await util.sleep(1000)
  1209. if (_CONFIG_.video.playerUrl) {
  1210. $('#wt-loading-box').css('display', 'none')
  1211. break
  1212. }
  1213. }
  1214. $('#wt-loading-box').css('display', 'none')
  1215. }
  1216. $("#wt-hid-box").click()
  1217. if(_CONFIG_.video && _CONFIG_.video.playerUrl){
  1218. $('#wt-tips-box .btn-box .submit').click()
  1219. if(!_CONFIG_.video.playerUrl.includes('http') || _CONFIG_.video.playerUrl.includes('失败')){
  1220. util.showTips({ title: _CONFIG_.video.playerUrl})
  1221. return
  1222. }
  1223. $('#wt-video-container').css('display','block')
  1224. if(_CONFIG_.video?.playerType == 'mp4'){
  1225. $('.wt-video').empty()
  1226. $('.wt-video').append(`
  1227. <video controls width="100%" height="100%">
  1228. <source src="${_CONFIG_.video?.playerUrl}">
  1229. </video>
  1230. `)
  1231. return
  1232. }
  1233. if(_CONFIG_.isMobile && _CONFIG_.isMobile[0] == 'iPhone'){
  1234. $('.wt-video').empty()
  1235. $('.wt-video').append(`
  1236. <video controls width="100%" height="100%">
  1237. <source src="${_CONFIG_.video.playerUrl}" type="application/x-mpegURL">
  1238. </video>
  1239. `)
  1240. }else{
  1241. $('.wt-video').empty()
  1242. $('.wt-video').append(`<video id="wt-video" controls></video>`)
  1243. const video = document.getElementById('wt-video')
  1244. _CONFIG_.hls_dp = new Hls()
  1245. _CONFIG_.hls_dp.loadSource(_CONFIG_.video.playerUrl)
  1246. _CONFIG_.hls_dp.attachMedia(video)
  1247. _CONFIG_.hls_dp.on(Hls.Events.MANIFEST_PARSED,function() {
  1248. video.play()
  1249. })
  1250. }
  1251. }
  1252. if(!_CONFIG_.video || !_CONFIG_.video.playerUrl){
  1253. util.showTips({ title: '视频不存在'})
  1254. }
  1255. })
  1256. //阻止视频组件冒泡
  1257. $('#wt-video-container div').on('click',function(e){
  1258. e.stopPropagation()
  1259. })
  1260. $('.wt-close-btn').on('click', function() {
  1261. $('#wt-video-container').css('display', 'none')
  1262. $('.wt-video').empty()
  1263. if (_CONFIG_.hls_dp) _CONFIG_.hls_dp.destroy()
  1264. util.showAndHidTips('wt_my_set_91video', 'set', false)
  1265. })
  1266. vipBox.find("#wt-my-down").on("click", async() => {
  1267. if (!_CONFIG_.user) {
  1268. $("#wt-my").click()
  1269. return
  1270. }
  1271. if(_CONFIG_.video.downLoadUrl){
  1272. util.showDownLoadWindow();
  1273. return;
  1274. }
  1275. if(!_CONFIG_.video || !_CONFIG_.video.aes){
  1276. util.showTips({
  1277. title: '抱歉未检测到视频,需要网页视频可播放才能检测到'
  1278. })
  1279. return
  1280. }
  1281. if((_CONFIG_.video && _CONFIG_.video.aes) && !_CONFIG_.video.downLoadUrl){
  1282. if(_CONFIG_.user && _CONFIG_.user.stopDownload || (_CONFIG_.user.role.use_download_num == _CONFIG_.user.role.max_download_num) ){
  1283. util.showTips({
  1284. title: '抱歉,今日下载次数' + _CONFIG_.user.role.max_download_num + '次已经用完,请明日再下载'
  1285. })
  1286. return;
  1287. }
  1288. util.showTips({
  1289. title: '为了插件的稳定现已日限下载</br>(当前账号日限' + _CONFIG_.user.role.max_download_num +'次,' + superVip._CONFIG_.user.downloadTips +',已使用' + _CONFIG_.user.role.use_download_num +'次,每个插件每日各' + _CONFIG_.user.role.max_download_num +'次),</br>您确定要消耗一次次数来获取视频链接吗(如失败不计数)?',
  1290. doubt: true,
  1291. success: async (confirm) => {
  1292. if (confirm) {
  1293. try {
  1294. $('#wt-loading-box').css('display', 'block')
  1295. await util.sleep(300);
  1296. $.ajax({
  1297. url: superVip._CONFIG_.apiBaseUrl + '/d' + (Math.floor(Math.random() * 3) + 1) + '00/downloadByAes',
  1298. type: 'POST',
  1299. data: {
  1300. aes: _CONFIG_.video.aes,
  1301. ap: 'Y7D3PJUU2JUIxJUE0JUU1JUE0JUI0JUU2JTlEJUExk9f3w',
  1302. origin: location.origin
  1303. },
  1304. headers: {
  1305. 'luckyToken': superVip._CONFIG_.user.token
  1306. },
  1307. dataType: 'json',
  1308. success: async function(response) {
  1309. $('#wt-loading-box').css('display', 'none')
  1310. if(response.errCode != 0){
  1311. util.showTips({
  1312. title: response.errMsg || response.error.message
  1313. })
  1314. }else{
  1315. if(response.newToken) superVip._CONFIG_.user.token = response.newToken;
  1316. _CONFIG_.user.role.use_download_num = response.useDownloadNum;
  1317. _CONFIG_.video.downLoadUrl = response.data
  1318. util.showDownLoadWindow(true, response.errMsg);
  1319. GM_setValue('jsxl_user', _CONFIG_.user);
  1320. }
  1321. },
  1322. error: function(xhr, status, error) {
  1323. $('#wt-loading-box').css('display', 'none')
  1324. const msg = 'JUU4JThFJUI3JUU1JThGJTk2JUU0JUI4JThCJUU4JUJEJUJEJUU5JTkzJUJFJUU2JThFJUE1JUU1JUE0JUIxJUU4JUI0JUE1'
  1325. superVip._CONFIG_.video.requestErrMsg = error || decodeURIComponent(atob(msg))
  1326. util.showTips({ title: decodeURIComponent(atob(msg))})
  1327. }
  1328. });
  1329. } catch (e) {
  1330. $('#wt-loading-box').css('display', 'none')
  1331. util.showTips({
  1332. title: e.message +
  1333. '</br>' + location.href +
  1334. '</br>获取下载链接失败'
  1335. })
  1336. if(e.message.includes('明日再下载')){
  1337. _CONFIG_.user.stopDownload = true
  1338. _CONFIG_.user.role.use_download_num = _CONFIG_.user.role.max_download_num
  1339. GM_setValue('jsxl_user', _CONFIG_.user);
  1340. }
  1341. }
  1342. }
  1343. }
  1344. })
  1345. }
  1346. })
  1347. $("#wt-set-box .user-box .user-info").on('click', function() {
  1348. util.showTips({
  1349. title: '确定要跳转到插件官网吗?',
  1350. doubt: true,
  1351. success: (res) =>{
  1352. if(res){
  1353. location.href = superVip._CONFIG_.homeUrl
  1354. }
  1355. }
  1356. })
  1357. })
  1358. //点击 通知
  1359. vipBox.find("#wt-my-notify").on("click", () => {
  1360. if (_CONFIG_.showNotify) {
  1361. $('#wt-notify-box').click()
  1362. } else {
  1363. const notify = GM_getValue('notify', '');
  1364. if (notify) {
  1365. util.showNotify({
  1366. title: notify
  1367. })
  1368. GM_setValue('notifyShow', false);
  1369. util.showAndHidTips('wt_my_notify', 'set', false)
  1370. } else {
  1371. util.showNotify({
  1372. title: '还没有通知信息'
  1373. })
  1374. };
  1375. }
  1376. })
  1377. $('#wt-set-box .logout').on('click', function(e) {
  1378. util.showTips({
  1379. title: '您确定要退出登录吗?',
  1380. doubt: true,
  1381. success: (res) => {
  1382. if (res) {
  1383. util.logouted()
  1384. $('#wt-mask-box').click()
  1385. }
  1386. }
  1387. })
  1388. e.stopPropagation()
  1389. })
  1390. //点击 隐藏控制器
  1391. vipBox.find("#wt-hid-box").on("click", () => {
  1392. vipBox.css("transform","translate(125%, -50%)")
  1393. $('#wt-left-show').css("transform","translate(0, -50%)")
  1394. GM_setValue('91video_hid_controller',1)
  1395. })
  1396. //点击 显示控制器
  1397. $('#wt-left-show').on('click',()=>{
  1398. $('#wt-left-show').css("transform","translate(-60px, -50%)")
  1399. vipBox.css("transform","translate(0, -50%)")
  1400. GM_setValue('91video_hid_controller','')
  1401. })
  1402. //点击 设置界面遮罩
  1403. $('#wt-mask-box').on('click',()=>{
  1404. $('#wt-mask-box').css('display','none')
  1405. $("#wt-set-box").removeClass('show-set-box')
  1406. $("#wt-set-box").addClass('hid-set-box')
  1407. $("#wt-download-box").removeClass('show-set-box');
  1408. $("#wt-download-box").addClass('hid-set-box')
  1409. setTimeout(()=>{
  1410. $("#wt-set-box .line-box").css('display','none')
  1411. $("#wt-set-box .user-box-container").css('display','none')
  1412. _CONFIG_.myBtnOpen = false
  1413. },500)
  1414. })
  1415. //点击 设置/我的信息界面关闭
  1416. $("#wt-set-box .close").on("click", () => {
  1417. $('#wt-mask-box').click()
  1418. })
  1419. if (!_CONFIG_.user) {
  1420. util.addLogin()
  1421. util.findTargetElement('#wt-my').then(res => {
  1422. setTimeout(() => {
  1423. res.click()
  1424. }, 2500)
  1425. })
  1426. }
  1427. if(GM_getValue('notifyShow')){
  1428. util.showAndHidTips('wt_my_notify')
  1429. }
  1430. if(unsafeWindow.wt_91video_script > 1){
  1431. const controllerBoxId = '#wt-' + _CONFIG_.vipBoxId
  1432. $(controllerBoxId).append(`
  1433. <div class="num-error" style="position: absolute;top: 4px; left: 50%;transform: translateX(-50%);font-size: 10px;color: red;z-index: -1;">
  1434. ${unsafeWindow.wt_91video_script}
  1435. </div>
  1436. `)
  1437. }
  1438. }
  1439. }
  1440.  
  1441. return {
  1442. start: () => {
  1443. unsafeWindow.wt_91video_script = unsafeWindow.wt_91video_script? unsafeWindow.wt_91video_script ++: 1
  1444.  
  1445. _CONFIG_.user = GM_getValue('jsxl_user', '');
  1446. if(_CONFIG_.user){
  1447. if(_CONFIG_.user.login_date && (_CONFIG_.user.login_date != new Date().setHours(0,0,0,0))){
  1448. _CONFIG_.user = '';
  1449. GM_setValue('jsxl_user', '');
  1450. }
  1451. }
  1452. const targetConsumer = new BaseConsumer;
  1453. targetConsumer.parse();
  1454. },
  1455. _CONFIG_
  1456. }
  1457. })();
  1458. superVip.start();
  1459. }
  1460.  
  1461. if(!unsafeWindow.jQuery){
  1462. const script = document.createElement('script');
  1463. script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js';
  1464. script.onload = function() {
  1465. init(unsafeWindow.jQuery)
  1466. };
  1467. script.onerror = function(e) {
  1468. alert('jquery初始化失败')
  1469. };
  1470. document.head.appendChild(script);
  1471. }else{
  1472. init(unsafeWindow.jQuery)
  1473. }