视频解析脚本[修改版]

请大家注意隐私安全:视频解析中的广告勿点击,不要相信黄赌毒等有害信息~支持腾讯视频、优酷视频、爱奇艺视频、bilibili视频、搜狐视频、乐视视频、PPTV视频、MGTV视频、1905视频、咪咕视频等视频解析。

  1. // ==UserScript==
  2. // @name 视频解析脚本[修改版]
  3. // @namespace 修改样式(原作者:xiaogf)
  4. // @version 1.12.3
  5. // @description 请大家注意隐私安全:视频解析中的广告勿点击,不要相信黄赌毒等有害信息~支持腾讯视频、优酷视频、爱奇艺视频、bilibili视频、搜狐视频、乐视视频、PPTV视频、MGTV视频、1905视频、咪咕视频等视频解析。
  6. // @author 修改样式(原作者:xiaogf)
  7. // @license xiaosu
  8. // @include *://v.qq.com/x/cover/*
  9. // @include *://m.v.qq.com/x/m/*
  10. // @include *://v.youku.com/*
  11. // @include *://m.youku.com/*
  12. // @include *://tv.sohu.com/v/*
  13. // @include *://film.sohu.com/*
  14. // @include *://m.tv.sohu.com/*
  15. // @include *://www.iqiyi.com/*
  16. // @include *://m.iqiyi.com/*
  17. // @include *://www.le.com/ptv/*
  18. // @include *://m.le.com/*
  19. // @include *://www.mgtv.com/*
  20. // @include *://m.mgtv.com/*
  21. // @include *://www.bilibili.com/bangumi/*
  22. // @include *://m.bilibili.com/bangumi/*
  23. // @include *://v.pptv.com/*
  24. // @include *://m.pptv.com/*
  25. // @include *://vip.1905.com/*
  26. // @include *://www.1905.com/vod/*
  27. // @include *://vip.1905.com/m/*
  28. // @include *://www.miguvideo.com/*
  29. // @include *://m.miguvideo.com/*
  30. // ==/UserScript==
  31. (function() {
  32. const mianColor = "#1e1e28";
  33. const secondColor = "#fa0606";
  34. const clkColor = "#fa0606";
  35. const fontsColor = "#f3f1e7";
  36. const iconMarginLeft = 5;
  37. const iconMarginTop = 150;
  38. var iconWidth = 40;
  39. const iconHeight = 40;
  40. const iconFilletPercent = 0.3;
  41. var developMenuHeight = 220;
  42. var developMenuSecond = 0;
  43. const parseInterfaces =[
  44. {"name": "M1907","url": "https://z1.m1907.top/?jx="},
  45. {"name": "解析啦","url": "https://www.jiexila.com/?url="},
  46. {"name": "三七解析","url": "https://jx.777jiexi.com/player/?url="},
  47. {"name": "醉仙解析","url": "http://jx.zui.cm/?url="},
  48. {"name": "M3U8TV","url": "https://jx.m3u8.tv/jiexi/?url="},
  49. {"name": "虾米解析","url": "https://jx.xmflv.com/?url="},
  50. {"name": "盘古解析","url": "https://www.pangujiexi.cc/jiexi.php?url="},
  51. {"name": "1717解析","url": "https://www.1717yun.com/api/?url="},
  52. {"name":"冰豆解析","url":"https://bd.jx.cn/?url="},
  53. ];
  54. const videoSites = [
  55. "v.qq.com",
  56. "iqiyi.com",
  57. "youku.com",
  58. "mgtv.com",
  59. "sohu.com",
  60. "le.com",
  61. "1905.com",
  62. "pptv.com",
  63. "bilibili.com",
  64. "miguvideo.com"
  65. ];
  66. const currentUrl = document.location.href;
  67. if (self != top) {
  68. return;
  69. }
  70. var result = videoSites.some(site=>{
  71. if (currentUrl.match(site)) {
  72. return true;
  73. }
  74. return false;
  75. })
  76. if(!result){
  77. return;
  78. }
  79. if(iconWidth<30){
  80. iconWidth=30;
  81. }
  82. if(developMenuHeight<(iconWidth*2.6)){
  83. developMenuHeight=iconWidth*2.6;
  84. }
  85. var uaLogo="pc";
  86. if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
  87. uaLogo="mobile";
  88. }
  89. const globalStyle = "cursor:pointer;position:fixed;left:"+iconMarginLeft+"px;top:"+iconMarginTop+"px;z-index:2147483647;";
  90. const mainIconStyle = "height:"+iconHeight+"px;width:"+iconWidth+"px;background:"+mianColor+";box-sizing:border-box;";
  91. const triangleStyle = "border-left:"+(iconWidth*0.3)+"px solid "+secondColor+";border-top:"+(iconHeight*0.2)+"px solid transparent;border-bottom:"+(iconHeight*0.2)+"px solid transparent;position:absolute;right:31%;top:30%;";
  92. const squareStyle = "background:"+secondColor+";width:"+(iconWidth*0.26)+"px;height:"+(iconWidth*0.26)+"px;position:absolute;right:37%;top:37%;";
  93. const inMenuBoxStyle = "width:100%;height:100%;overflow-y:scroll;overflow-x:hidden;";
  94. const outMenuBoxStyle = "background:"+mianColor+";height:0px;overflow:hidden;font-size:"+(iconWidth*0.35)+"px;width:"+(iconWidth*3)+"px;position:absolute;left:42px;top:0px;transition:height "+developMenuSecond+"s;-moz-transition:height "+developMenuSecond+"s;-webkit-transition:height "+developMenuSecond+"s;-o-transition:height "+developMenuSecond+"s;";
  95. const MenuItemsStyle = "color:"+fontsColor+";display: block;padding:"+(iconWidth*0.12)+"px "+(iconWidth*0.12)+"px "+(iconWidth*0.12)+"px "+(iconWidth*0.2)+"px;text-align:center;margin-bottom:3px;";
  96. const IframeStyle = "frameborder='no' width='100%' height='100%' allowfullscreen='true' allowtransparency='true' frameborder='0' scrolling='no';";
  97. var classAndIDMap = {
  98. "pc":
  99. {
  100. "v.qq.com":"mod_player|tenvideo_player|player-container|player__container",
  101. "iqiyi.com":"flashbox",
  102. "youku.com":"ykPlayer",
  103. "mgtv.com":"mgtv-player-wrap",
  104. "sohu.com":"sohuplayer|x-player",
  105. "le.com":"fla_box",
  106. "1905.com":"player",
  107. "pptv.com":"pplive-player",
  108. "miguvideo.com":"mod-player",
  109. "bilibili.com":"bilibili-player|bpx-player-container|bilibili-player-video-wrap|player-limit-mask"
  110. },
  111. "mobile":{
  112. "m.v.qq.com":"mod_player|tenvideo_player|player-container|player__container",
  113. "iqiyi.com":"m-box",
  114. "youku.com":"h5-detail-player",
  115. "mgtv.com":"video-area",
  116. "sohu.com":"sohuplayer|player-view",
  117. "le.com":"playB",
  118. "1905.com":"player",
  119. "pptv.com":"pp-details-video",
  120. "miguvideo.com":"mod-player",
  121. "bilibili.com":"bilibili-player|bpx-player-video-wrap|bpx-player-container|bilibiliPlayer|player-wrapper"}
  122. };
  123. createIcon();
  124. document.onreadystatechange = function(){
  125. if(document.readyState == 'complete'){
  126. if(!document.getElementById("mainIcon")){
  127. createIcon();
  128. }
  129. }
  130. }
  131. function createIcon(){
  132. try{
  133. var div = document.createElement("div");
  134. div.style.cssText = globalStyle;
  135. div.setAttribute("id","mainIcon");
  136. var html = "<div id='mainButton' style='"+mainIconStyle+"'><div id='triangle' style='"+triangleStyle+"'></div></div><div id='dropDownBox' style='"+outMenuBoxStyle+"'><div style="+inMenuBoxStyle+">";
  137. for(var i in parseInterfaces){
  138. if(i==parseInterfaces.length-1){
  139. html += "<span class='spanStyle' style='"+MenuItemsStyle+"border:1px solid #e2e2e2;' url='"+parseInterfaces[i].url+"'>"+parseInterfaces[i].name+"</span>";
  140. }else{
  141. html += "<span class='spanStyle' style='"+MenuItemsStyle+"border:1px solid #e2e2e2;' url='"+parseInterfaces[i].url+"'>"+parseInterfaces[i].name+"</span>";
  142. }
  143. }
  144. html += "</div></div>";
  145. div.innerHTML = html;
  146. document.body.insertBefore(div,document.body.firstChild);
  147. div.onclick = function() {
  148. var dropDownBox = document.getElementById("dropDownBox").style.height;
  149. var mainButton = document.getElementById("mainButton");
  150. var triangle = document.getElementById("triangle");
  151. if(dropDownBox == "0px"){
  152. triangle.removeAttribute("style");
  153. triangle.setAttribute("style",triangleStyle);
  154. document.getElementById("dropDownBox").style.height = developMenuHeight+"px";
  155. }else{
  156. document.getElementById("dropDownBox").style.height = "0px";
  157. triangle.removeAttribute("style");
  158. triangle.setAttribute("style",triangleStyle);
  159. }
  160. }
  161. var elements = document.getElementsByClassName("spanStyle");
  162. for(var j in elements){
  163. elements[j].onclick=function(){
  164. this.style.color = clkColor;
  165. var parseInterface = this.getAttribute("url");
  166. for(let key in classAndIDMap[uaLogo]){
  167. if (document.location.href.match(key)) {
  168. var values = classAndIDMap[uaLogo][key].split("|");
  169. var labelType = "";
  170. var class_id = "";
  171. for(let value in values){
  172. if(document.getElementById(values[value])){
  173. class_id = values[value];
  174. labelType = "id";
  175. break;
  176. }
  177. if(document.getElementsByClassName(values[value]).length>0){
  178. class_id = values[value];
  179. labelType = "class";
  180. break;
  181. }
  182. }
  183. if(class_id!=""){
  184. var iframe = "<iframe id='iframePlayBox' src='"+parseInterface+document.location.href+"' "+IframeStyle+" ></iframe>";
  185. if(labelType=="id"){
  186. document.getElementById(class_id).innerHTML="";
  187. document.getElementById(class_id).innerHTML=iframe;
  188. }else{
  189. document.getElementsByClassName(class_id)[0].innerHTML="";
  190. if(uaLogo=="mobile"){
  191. document.getElementsByClassName(class_id)[0].style.height="225px";
  192. }
  193. document.getElementsByClassName(class_id)[0].innerHTML=iframe;
  194. }
  195. return;
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }catch(error){
  202. }
  203. }
  204. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址