Greasy Fork is available in English.

VIP 视频解析

支持腾讯视频、爱奇艺、优酷、土豆、芒果TV、搜狐视频、乐视视频、PPTV、风行、华数TV、哔哩哔哩等,支持多个解析接口切换,支持视频自由选集,自动解析视频,支持自定义拖拽位置,支持视频广告跳过,支持页内页外解析,支持 Tampermonkey、Violentmonkey、Greasemonkey

  1. // ==UserScript==
  2. // @name VIP 视频解析
  3. // @version 3.2.9
  4. // @description 支持腾讯视频、爱奇艺、优酷、土豆、芒果TV、搜狐视频、乐视视频、PPTV、风行、华数TV、哔哩哔哩等,支持多个解析接口切换,支持视频自由选集,自动解析视频,支持自定义拖拽位置,支持视频广告跳过,支持页内页外解析,支持 Tampermonkey、Violentmonkey、Greasemonkey
  5. // @author sign
  6. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaH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U6b6W+WmVm6SfvMQA7tVBtIox1TmLIO/aLBXk+LDXjpodtHmHSsSEtySdhYbG/ywOiuvmWnFS+TkB6qd/Y/6oys/Sz97SdWvgTIBzoNp0Xf6vqu3YFLglYkBfDEqQ2C3ok1WClYSn823sOqMbMJedXvjd+ylspwKoys3TFO2KnFq7Xc1QAsY9ULmTGqnluTI6Hg41BEpsF+SosIJRIS8jftzm6mH6hpWXvQFWZydjXVV1mZumK94SdWrje7AlMbk9lGnfOleJwjQYZ6TNuTy6rjJRvdrwJVOLtc9sr35tNSU9WYWbpqneAFa8LIPfujt7ytuppV5TkZJj5Ljt31PJZWICsJ32jxWBLdAbYGQdcuuY9GlXly4ZdtCxfLl31ngQ0ZqfBrmjI26Knsx5xwzUHaCXNO5LYwHJVzpZvdEwA16lPHDu1oOFA98PUvPtrHAwwwYPRkL9Ni6lTXW0SDrrhYJVzcX2JKaXLfU/PBXdHp4D7G3D1ql+A3wFTLxPACx6Ihvyt6jpztIVrvOGq0ufqnkytk8uRjJSvdZxjxVPCSs4ZoCPojs7427ToWOdK8mp7uEYnq0ouhAWy23N8X4vBPdHZ+rAagwSoBl3RGX9LC8+tAW7NgHUVcBwjfV+LQRCdAe6KQZpgZ1T073LAKbPy2trgbglQzodlhD4n5CYtbt9R7afuvaAzGvI3Oz03Bzy+1jFhjTkYlx533LnU8uvajRvmBQxs3VH9wrHOzWHok9dv7Yyzrm2xnmgNWf+/3Qk3dOsHsHXv2/Vki9ur7GZjDqFPius7Ha77flAmwjK4czKmOXT9cLDBC0wZbwtZgxvZ2Ll6wzesMtqEnI0Vz6L0yRv/3qF/XdLX3Hd8G5H8f8u/Qf0D4QAOKjjS2/gAAAAASUVORK5CYII=
  7. // @namespace https://greasyfork.org/users/665670
  8. // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js
  9. // @match *://*.youku.com/*
  10. // @match *://*.iqiyi.com/*
  11. // @match *://*.iq.com/*
  12. // @match *://*.le.com/*
  13. // @match *://v.qq.com/*
  14. // @match *://m.v.qq.com/*
  15. // @match *://*.tudou.com/*
  16. // @match *://*.mgtv.com/*
  17. // @match *://tv.sohu.com/*
  18. // @match *://film.sohu.com/*
  19. // @match *://*.1905.com/*
  20. // @match *://*.bilibili.com/*
  21. // @match *://*.pptv.com/*
  22. // @license GPL License
  23. // @grant unsafeWindow
  24. // @grant GM_openInTab
  25. // @grant GM.openInTab
  26. // @grant GM_getValue
  27. // @grant GM.getValue
  28. // @grant GM_setValue
  29. // @grant GM.setValue
  30. // @grant GM_xmlhttpRequest
  31. // @grant GM.xmlHttpRequest
  32. // @grant GM_download
  33. // @grant GM_registerMenuCommand
  34. // ==/UserScript==
  35.  
  36. (function () {
  37. 'use strict';
  38. var $ = $ || window.$;
  39. var log_count = 1;
  40. var host = location.host;
  41. var parseInterfaceList = [];
  42. var selectedInterfaceList = [];
  43. var originalInterfaceList = [
  44. {title:"M1907解析",type:"1",url:"https://im1907.top/?jx="},
  45. {title:"BL智能解析",type:"1",url:"https://svip.bljiex.cc/?v="},
  46. {title:"M3U8解析",type:"1",url:"https://jx.m3u8.tv/jiexi/?url="},
  47. {title:"8090解析",type:"1",url:"https://www.8090g.cn/jiexi/?url="},
  48. {title:"咸鱼解析",type:"1",url:"https://jx.xyflv.cc/?url="},
  49. {title:"极速解析",type:"1",url:"https://jx.2s0.cn/player/?url="},
  50. {title:"剖云解析",type:"1",url:"https://jx.qqwtt.com/?url="},
  51. //------------------------------------------------------------------------------
  52. {title:"综合/B站",type:"1",url:"https://jx.jsonplayer.com/player/?url="},
  53. {title:"M1907",type:"1",url:"https://z1.im1907.top/?&jx="},
  54. {title:"ckplayer",type:"1",url:"https://www.ckplayer.vip/jiexi/?url="},
  55. {title:"剖元",type:"1",url:"https://www.pouyun.com/?url="},
  56. {title:"盘古",type:"1",url:"https://www.pangujiexi.com/jiexi/?url="},
  57. {title:"eptept",type:"1",url:"https://dmjx.m3u8.tv/?url="},
  58. {title:"BL",type:"1",url:"https://svip.bljiex.com/?v="},
  59. {title:"play",type:"1",url:"https://www.playm3u8.cn/jiexi.php?url="},
  60. {title:"夜幕",type:"1",url:"https://www.yemu.xyz/?url="},
  61. {title:"管理者",type:"1",url:"https://www.administratorw.com/video.php?url="},
  62. {title:"冰豆",type:"1",url:"https://api.qianqi.net/vip/?url="},
  63. {title:"云解析",type:"1",url:"https://yparse.ik9.cc/index.php?url="},
  64. {title:"YT",type:"1",url:"https://jx.yangtu.top/?url="},
  65. {title:'JY解析',type:"1",url:'https://jx.we-vip.com/?url=',},
  66. {title:"⑸号解析",type:"1",url:"https://www.8090g.cn/jiexi/?url="},
  67. {title:"人人解析",type:"1",url:"https://vip.mpos.ren/v/?url="},
  68. {title:"ckmov",type:"1",url:"https://www.ckmov.com/?url="},
  69. {title:"Player-JY",type:"1",url:"https://jx.playerjy.com/?url="},
  70. {title:"虾米",type:"1",url:"https://jx.xmflv.com/?url="},
  71. {title:"yparse",type:"1",url:"https://jx.yparse.com/index.php?url="},
  72. {title:"猪蹄",type:"1",url:"https://jx.iztyy.com/Bei/?url="},
  73. {title:"qianqi",type:"1",url:"https://api.qianqi.net/vip/?url="},
  74.  
  75. {type:"1",url:"https://jx.m3u8.tv/jiexi/?url=",title:"⑤号接口"},
  76. {type:"1",url:"https://www.8090.la/8090/?url=",title:"全能vip②"},
  77. {type:"1",url:"https://www.mtosz.com/m3u8.php?url=",title:"Mao解析"},
  78. {type:"1",url:"https://movie.heheda.top/?v=",title:"风影阁"},
  79. //------------------------------------------------------------------------------
  80. {title:"M1907",type:"0",url:"https://z1.im1907.top/?jx="},
  81. {title:"yparse",type:"0",url:"https://jx.yparse.com/index.php?url="},
  82. {title:"玩的嗨",type:"0",url:"http://vip.wandhi.com/?v="},
  83. ];
  84.  
  85. //自定义 log 函数
  86. function mylog(param1, param2) {
  87. param1 = param1 ? param1 : "";
  88. param2 = param2 ? param2 : "";
  89. console.log("#" + log_count++ + "-VIP-log:", param1, param2);
  90. }
  91.  
  92. //内嵌页内播放
  93. function innerParse(url) {
  94. $("#iframe-player").attr("src", url);
  95. }
  96.  
  97. //视频播放控制
  98. function reomveVideo() {
  99. setInterval(() => {
  100. const videos = document.getElementsByTagName('video');
  101. for (let video of videos) {
  102. video.src = "";
  103. video.muted = true;
  104. video.load();
  105. video.pause();
  106. }
  107. }, 1500);
  108. }
  109.  
  110. //实时监听网址变化
  111. function urlChangeReload(){
  112. var oldURL = window.location.href;
  113. setInterval(() => {
  114. var currentURL = window.location.href;
  115. if (oldURL !== currentURL) {
  116. window.location.reload();
  117. }
  118. }, 500);
  119. }
  120.  
  121. //兼容 Tampermonkey | Violentmonkey | Greasymonkey 4.0+
  122. function GMopenInTab(url, open_in_background) {
  123. if (typeof GM_openInTab === "function") {
  124. GM_openInTab(url, open_in_background);
  125. } else {
  126. GM.openInTab(url, open_in_background);
  127. }
  128. }
  129.  
  130. //兼容 Tampermonkey | Violentmonkey | Greasymonkey 4.0+
  131. function GMgetValue(name, value) {
  132. if (typeof GM_getValue === "function") {
  133. return GM_getValue(name, value);
  134. } else {
  135. return GM.getValue(name, value);
  136. }
  137. }
  138.  
  139. //兼容 Tampermonkey | Violentmonkey | Greasymonkey 4.0+
  140. function GMsetValue(name, value) {
  141. if (typeof GM_setValue === "function") {
  142. GM_setValue(name, value);
  143. } else {
  144. GM.setValue(name, value);
  145. }
  146. }
  147.  
  148. //兼容 Tampermonkey | Violentmonkey | Greasymonkey 4.0+
  149. function GMxmlhttpRequest(obj) {
  150. if (typeof GM_xmlhttpRequest === "function") {
  151. GM_xmlhttpRequest(obj);
  152. } else {
  153. GM.xmlhttpRequest(obj);
  154. }
  155. }
  156.  
  157. //兼容 Tampermonkey | Violentmonkey | Greasymonkey 4.0+
  158. function GMaddStyle(css) {
  159. var myStyle = document.createElement('style');
  160. myStyle.textContent = css;
  161. var doc = document.head || document.documentElement;
  162. doc.appendChild(myStyle);
  163. }
  164.  
  165. //播放节点预处理
  166. var node = "";
  167. var player_Containers = [
  168. {
  169. host: "v.qq.com",
  170. container: "#mod_player,#player-container,.container-player",
  171. displayNodes: ["#mask_layer", ".mod_vip_popup", ".panel-tip-pay"]
  172. }, {
  173. host: "m.v.qq.com",
  174. container: ".mod_player,#player",
  175. displayNodes: [".mod_vip_popup", "[class^=app_],[class^=app-],[class*=_app_],[class*=-app-],[class$=_app],[class$=-app]", "div[dt-eid=open_app_bottom]", "div.video_function.video_function_new", "a[open-app]", "section.mod_source", "section.mod_box.mod_sideslip_h.mod_multi_figures_h,section.mod_sideslip_privileges,section.mod_game_rec", ".at-app-banner"]
  176. }, {
  177. host: "w.mgtv.com",
  178. container: "#mgtv-player-wrap",
  179. displayNodes: []
  180. }, {
  181. host: "www.mgtv.com",
  182. container: "#mgtv-player-wrap",
  183. displayNodes: []
  184. }, {
  185. host: "m.mgtv.com",
  186. container: ".video-area",
  187. displayNodes: ["div[class^=mg-app]", ".video-area-bar", ".open-app-popup"]
  188. }, {
  189. host: "www.bilibili.com",
  190. container: "#player_module,#bilibiliPlayer,#bilibili-player",
  191. displayNodes: ["[class^=playerPop_wrap]"]
  192. }, {
  193. host: "m.bilibili.com",
  194. container: ".player-wrapper,.player-container,.mplayer",
  195. displayNodes: []
  196. }, {
  197. host: "www.iqiyi.com",
  198. container: "#flashbox",
  199. displayNodes: ["#playerPopup", "div[class^=qy-header-login-pop]", "section[class^=modal-cover_]", ".toast"]
  200. }, {
  201. host: "m.iqiyi.com",
  202. container: ".m-video-player-wrap",
  203. displayNodes: ["div.m-iqyGuide-layer", "a[down-app-android-url]", "[name=m-extendBar]", "[class*=ChannelHomeBanner]", "section.m-hotWords-bottom"]
  204. }, {
  205. host: "www.iq.com",
  206. container: ".intl-video-wrap",
  207. displayNodes: []
  208. }, {
  209. host: "v.youku.com",
  210. container: "#ykplayer,#player",
  211. displayNodes: ["#iframaWrapper", "#checkout_counter_mask", "#checkout_counter_popup"]
  212. }, {
  213. host: "m.youku.com",
  214. container: "#player,.h5-detail-player",
  215. displayNodes: [".callEnd_box", ".h5-detail-guide", ".h5-detail-vip-guide"]
  216. }, {
  217. host: "tv.sohu.com",
  218. container: "#player",
  219. displayNodes: []
  220. }, {
  221. host: "film.sohu.com",
  222. container: "#playerWrap",
  223. displayNodes: []
  224. }, {
  225. host: "www.le.com",
  226. container: "#le_playbox",
  227. displayNodes: []
  228. }, {
  229. host: "video.tudou.com",
  230. container: ".td-playbox",
  231. displayNodes: []
  232. }, {
  233. host: "v.pptv.com",
  234. container: "#pptv_playpage_box",
  235. displayNodes: []
  236. }, {
  237. host: "vip.pptv.com",
  238. container: ".w-video",
  239. displayNodes: []
  240. }, {
  241. host: "www.wasu.cn",
  242. container: "#flashContent",
  243. displayNodes: []
  244. }, {
  245. host: "www.acfun.cn",
  246. container: "#player",
  247. displayNodes: []
  248. }, {
  249. host: "vip.1905.com",
  250. container: "#player,#vodPlayer",
  251. displayNodes: []
  252. }, {
  253. host: "www.1905.com",
  254. container: "#player,#vodPlayer",
  255. displayNodes: []
  256. },
  257. ];
  258.  
  259. //播放容器处理与弹出界面处理
  260. function playerNodes(){
  261. player_Containers.forEach((item, index) => {
  262. if (item.host == host) {
  263. node = item.container;
  264. setInterval(() => {
  265. item.displayNodes.forEach((obj, index) => {
  266. $(obj).css("display","none")
  267. });
  268. }, 500);
  269. }
  270. })
  271. }
  272.  
  273. var autoPlay = !!GMgetValue("autoPlayerKey_" + host, null) ? "开" : "关";
  274. var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
  275.  
  276. var iframeDivCss = "width:100%;height:100%;z-index:999999;";
  277. var videoPlayer = $(`<div id='iframe-div' style='`+ iframeDivCss + `'><iframe id='iframe-player' frameborder='0' allowfullscreen='true' width='100%' height='100%'></iframe></div>`);
  278.  
  279. var ImgBase64 =`
  280. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABB0lEQVR42r2VCw7CIAxAWzQuelsv4ml12XSAhZQFl0L3cWvSwFjhtRQKeu9bALgiCbDQmOfuQHqGuow2whpPpLajTlMAWNKTAhhthDU6zBbbRY
  281. 4D7LRFfQ3geXJIoCM1PIYTQC3JrRZBfooGIRqcA4gThZ/R6zCegI7EmBBIjAY4ogSSAFZNcppEZg9q7jz84WgMKFIDvEkvuVcCKG0bqoBCknEKKICgsIZ6TKEE0GwPBYSzbpYCFm9RMUn/SnJmnO7Az+URPLaZfQI47ttx/pwcCFHm3w7KtU
  282. gFlB6c/AbXSsVqQC6bAGl/pSoKE5t1tWirHAJ4UXvb6UWLgJ5/NgJgmbfCg/MFf/07iXwnzokAAAAASUVORK5CYII=`;
  283.  
  284. var sImgBase64=`
  285. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAgUlEQVR42t3UQQqAIBAF0EahE3S1buFtPEY3jGr8QgxEm5D5Cc7GlfP8jigTsVR1ESZQaxxAcF+Xa2ORgEUtAQB1BsQSpJRCzvmkAffqmsAgRt
  286. M+AHXIYwCsGgj4c8j1y4iNfW1vl2e6OgPbA2DVC0CS2ALjxMcnwD0BTjxD31lAAVVYNypdDsbLAAAAAElFTkSuQmCC`;
  287.  
  288. // 视频解析预处理
  289. var innerList = [];
  290. var outerList = [];
  291. var innerli = "";
  292. var outerli = "";
  293. var num = "";
  294. originalInterfaceList.forEach((item, index) => {
  295. if (item.type == "1") {
  296. innerList.push(item);
  297. innerli += "<li title='请勿相信视频中广告'>" + item.title + "</li>";
  298. }else{
  299. outerList.push(item);
  300. outerli += "<li title='请勿相信视频中广告'>" + item.title + "</li>";
  301. }
  302. })
  303.  
  304. parseInterfaceList = innerList.concat(outerList);
  305.  
  306. //图片按钮定位
  307. var left = 0;
  308. var top = 100;
  309. var Position = GMgetValue("Position_" + host);
  310. if(!!Position){
  311. top = Position.top;
  312. }
  313.  
  314. GMaddStyle(`
  315. #vip_movie_box {cursor:pointer; position:fixed; top:` + top + `px; right:0px; width:33px; z-index:99999; font-size:12px; text-align:left;}
  316.  
  317. #vip_movie_box .item_text {width:32px; padding:4px 0px; text-align:center; background-color:#FF4500; margin:1px 0px;}
  318. #vip_movie_box .item_text img {width:22px; height:22px; display:inline-block; vertical-align:middle;}
  319.  
  320. #vip_movie_box .selected_text {width:32px; padding:4px 0px; text-align:center; background-color:#FF4500;}
  321. #vip_movie_box .selected_text img {width:22px; height:22px;display:inline-block; vertical-align:middle;}
  322. #vip_movie_box .vip_mod_box_selected {width:320px; max-height:450px;display:none; position:absolute; right:33px; top:0; text-align:center; backdrop-filter: saturate(1) blur(15px); background: rgba(255, 255, 255, 0.2); border:1px solid gray; overflow-y: auto;}
  323. #vip_movie_box .vip_mod_box_selected ul{list-style: none; margin:10px 10px;}
  324. #vip_movie_box .vip_mod_box_selected li{font-size:12px; color:#FFFFFF; text-align:center; width:calc(36% - 14px); line-height:21px; float:left; padding:4px 4px; margin:3px 3px;background: rgba(0,0,0,0.6);border-radius:2px;box-sizing:border-box;}
  325. #vip_movie_box .vip_mod_box_selected li:hover{color:#FFFFFF; background-color:#FF4500;}
  326. #vip_movie_box .vip_mod_box_selected::-webkit-scrollbar{width:5px; height:1px;}
  327. #vip_movie_box .vip_mod_box_selected::-webkit-scrollbar-thumb{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#A8A8A8;}
  328. #vip_movie_box .vip_mod_box_selected::-webkit-scrollbar-track{box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.2); background:#F1F1F1;}
  329. #vip_movie_box .vip_mod_box_selected .selected{color:#FFFFFF; background-color:#FF4500;}
  330.  
  331. #vip_movie_box .img_text {width:32px; text-align:center; padding:3px 0px; background-color:#FF4500; margin:1px 0px;}`);
  332.  
  333. if (isMobile) {
  334. GMaddStyle(`#vip_movie_box {top:300px;}`);
  335. }
  336.  
  337. var html = $(`<div id='vip_movie_box'>
  338. <div class='item_text'><img src='`+ ImgBase64 +`' title='快速解析'/></div>
  339. <div class='selected_text' >
  340. <img src='`+ sImgBase64 +`' title='视频解析'/>
  341. <div class='vip_mod_box_selected' >
  342. <div>
  343. <div style='font-size:16px; font-weight:bold; text-align:center; color:#FF4500; line-height:21px; margin-top:10px;'>页内解析</div>
  344. <ul>
  345. ` + innerli + `
  346. <div style='clear:both;'></div>
  347. </ul>
  348. </div>
  349. <div>
  350. <div style='font-size:16px; font-weight:bold; text-align:center; color:#FF4500; line-height:21px; margin-top:10px;'>页外解析</div>
  351. <ul>
  352. ` + outerli + `
  353. <div style='clear:both;'></div>
  354. </ul>
  355. </div>
  356. </div>
  357. </div>
  358. <div class="img_text"><div class="vip_auto" style="color:white; font-size:20px; font-weight:bold; line-height:23px; " title="自动解析开关">${autoPlay}</div></div>
  359. </div>`);
  360.  
  361. $("body").append(html);
  362.  
  363. //快速解析事件处理
  364. $(".item_text").on("click", () => {
  365. GMopenInTab("http://vip.wandhi.com/?v=" + location.href, false);
  366. });
  367.  
  368. //视频解析事件处理
  369. if (isMobile) {
  370. $(".selected_text").on("click", () => $(".vip_mod_box_selected").toggle());
  371. } else {
  372. $(".selected_text").on("mouseover", () => $(".vip_mod_box_selected").show());
  373. $(".selected_text").on("mouseout", () => $(".vip_mod_box_selected").hide());
  374. }
  375. $(".vip_mod_box_selected li").each((index, item) => {
  376. item.addEventListener("click", function(){
  377. if (parseInterfaceList[index].type == "1") {
  378. $(this).siblings().removeClass("selected");
  379. $(this).addClass("selected");
  380. GMsetValue("autoPlayerValue_" + host, index);
  381. if (isMobile) {
  382. iframeDivCss = "width:100%;height:220px;z-index:999999;";
  383. }
  384. if (isMobile && window.location.href.indexOf("iqiyi.com") !== -1) {
  385. iframeDivCss = "width:100%;height:220px;z-index:999999;margin-top:-56.25%;";
  386. }
  387. if (document.getElementById("iframe-player") == null) {
  388. var player = $(node);
  389. reomveVideo();
  390. player.empty();
  391. player.append(videoPlayer);
  392. }
  393. innerParse(parseInterfaceList[index].url + location.href);
  394. }else {
  395. GMopenInTab(parseInterfaceList[index].url + location.href, false);
  396. }
  397. });
  398. });
  399.  
  400. //自动解析视频事件处理
  401. $(".vip_auto").on("click", function () {
  402. if (!!GMgetValue("autoPlayerKey_" + host, null)) {
  403. GMsetValue("autoPlayerKey_" + host, null);
  404. $(this).html("关");
  405. } else {
  406. GMsetValue("autoPlayerKey_" + host, "true");
  407. $(this).html("开");
  408. }
  409. setTimeout(function () {
  410. window.location.reload();
  411. }, 200);
  412. });
  413.  
  414. //检测自动播放是否开启
  415. function autoPlayer() {
  416. if (!!GMgetValue("autoPlayerKey_" + host, null)) {
  417. var index = GMgetValue("autoPlayerValue_" + host, 2);
  418. $(".vip_mod_box_selected li").eq(index).addClass("selected");
  419. $(".vip_auto").attr("title", `当前解析源:${parseInterfaceList[index].title}`);
  420. setTimeout(function () {
  421. if (document.getElementById("iframe-player") == null) {
  422. var player = $(node);
  423. reomveVideo();
  424. player.empty();
  425. player.append(videoPlayer);
  426. }
  427. innerParse(parseInterfaceList[index].url + location.href);
  428. }, 2500);
  429. urlChangeReload(); //实时监听网址变化
  430. }
  431. };
  432.  
  433. // 右键拖拽功能 - 防止与其他脚本干扰
  434. var movie_box = $("#vip_movie_box");
  435. movie_box.mousedown(function(e) {
  436. // 1 = 鼠标左键; 2 = 鼠标中键; 3 = 鼠标右键
  437. if (e.which == 3) {
  438. e.preventDefault() // 阻止默认行为
  439. movie_box.css("cursor", "move");//设置样式
  440. var positionDiv = $(this).offset();
  441. var distenceX = e.pageX - positionDiv.left;
  442. var distenceY = e.pageY - positionDiv.top;
  443. // 计算移动后的左偏移量 和 顶部的偏移量(防止超出边界)
  444. $(document).mousemove(function(e) {
  445. var x = e.pageX - distenceX;
  446. var y = e.pageY - distenceY;
  447. if (x < 0) {
  448. x = 0;
  449. } else if (x > $(document).width() - movie_box.outerWidth(true)) {
  450. x = $(document).width() - movie_box.outerWidth(true);
  451. }
  452. if (y < 0) {
  453. y = 0;
  454. } else if (y > $(document).height() - movie_box.outerHeight(true)) {
  455. y = $(document).height() - movie_box.outerHeight(true);
  456. }
  457. // 更新样式
  458. movie_box.css("top", y);
  459. GMsetValue("Position_" + host,{"top":y});
  460. });
  461. $(document).mouseup(function() {
  462. $(document).off('mousemove');
  463. movie_box.css("cursor", "pointer");// 还原样式
  464. });
  465. $(document).contextmenu(function(e) {
  466. e.preventDefault();// 阻止右键菜单默认行为
  467. })
  468. }
  469. });
  470.  
  471. window.onload = function () {
  472. playerNodes();
  473. autoPlayer();
  474. }
  475.  
  476. })();