|
2 | 2 | // @name VIP视频破解 |
3 | 3 | // @name:en VIP Video Cracker |
4 | 4 | // @namespace hoothin |
5 | | -// @version 1.5.9 |
| 5 | +// @version 1.6.0 |
6 | 6 | // @description 解析并破解各大视频站的VIP权限 |
7 | 7 | // @description:en Crack VIP permissions of some chinese video sites |
8 | 8 | // @author hoothin |
|
41 | 41 | (function() { |
42 | 42 | 'use strict'; |
43 | 43 | var cracks=[ |
44 | | - {name:"47影视云",url:"http://api.47ks.com/webcloud/?v=%s",title:"首选"}, |
| 44 | + {name:"47影视云",url:"https://api.47ks.com/webcloud/?v=%s",title:"首选"}, |
45 | 45 | {name:"无名小站1",url:"http://www.wmxz.wang/video.php?url=%s",title:"次选"}, |
46 | 46 | {name:"无名小站2",url:"http://www.sfsft.com/admin.php?url=%s",title:"无名小站的源码"}, |
47 | 47 | {name:"小海解析1",url:"https://ckplaer.duapp.com/hai.php?url=%s",title:"播放器似乎放在百度开发者平台"}, |
48 | 48 | {name:"小海解析2",url:"http://jx.ck921.com/hai.php?url=%s",title:"和上面的用的应该是同样的服务器"}, |
49 | 49 | {name:"VIP看看",url:"http://2.jx.72du.com/video.php?url=%s",title:"无名小站的源码"}, |
50 | | - {name:"疯狂解析",url:"http://vip.ifkdy.com/?url=%s",title:"仅是简单嵌了47影视云、小海解析等几个解析站"}, |
51 | 50 | {name:"歪歪电影",url:"http://www.yydy8.com/common/?url=%s"}, |
52 | 51 | {name:"石头解析",url:"https://jiexi.071811.cc/jx.php?url=%s"}, |
53 | 52 | {name:"百域阁",url:"http://api.svip.baiyug.cn/svip/index.php?url=%s"}, |
|
73 | 72 | {name:"舞动秋天",url:"http://qtzr.net/s/?qt=%s"}, |
74 | 73 | {name:"CloudParse",url:"http://api.cloudparse.com/?url=%s"}, |
75 | 74 | {name:"迷失之梦",url:"http://mt2t.com/yun?url=%s",title:"这个解析站似乎不大稳定"}, |
| 75 | + {name:"疯狂解析",url:"http://vip.ifkdy.com/?url=%s",title:"仅是简单嵌了47影视云、小海解析等几个解析站"}, |
76 | 76 | {name:"97在线看",url:"http://www.97zxkan.com/jiexi/97zxkanapi.php?url=%s"}, |
77 | 77 | {name:"71ki解析",url:"http://jx.71ki.com/tong.php?url=%s"} |
78 | | - ],video,i=0; |
| 78 | + ],video,videoWidth,videoHeight,i=0; |
79 | 79 | var iqiyi=location.hostname.indexOf("iqiyi.com")!=-1; |
80 | 80 | var vipVideoCrackJump=GM_getValue("vipVideoCrackJump"); |
| 81 | + var vipVideoCrackEmbed=GM_getValue("vipVideoCrackEmbed"); |
81 | 82 | var vipVideoCrackUrl=GM_getValue("vipVideoCrackUrl"); |
| 83 | + var iframe=document.createElement("iframe"); |
82 | 84 | var selectStyle=document.createElement("style"); |
83 | | - selectStyle.innerHTML=".crackJump{font-size:12px;margin-left:5px;color:white;text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-webkit-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-moz-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;*filter: Glow(color=#000, strength=1);}.crackJump input{vertical-align:middle;}.vipSelect{background:black;color:white;font-size:12px;border:none;}.crackArea{position:absolute;z-index:999999;left:0px;top:0px;opacity:0.50;filter:alpha(opacity=50);transition:opacity 0.3s ease,width 0.3s ease;width:23px;overflow:hidden;white-space:nowrap;border:1px solid #666;background:black;}.crackArea:hover{opacity:1;filter:alpha(opacity=100);width:160px;}"; |
| 85 | + selectStyle.innerHTML=".crackJump{font-size:12px;margin-left:5px;color:white;text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-webkit-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-moz-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;*filter: Glow(color=#000, strength=1);}.crackJump input{vertical-align:middle;}.vipSelect{background:black;color:white;font-size:12px;border:none;}.crackArea{position:absolute;z-index:999999;left:0px;top:0px;opacity:0.50;filter:alpha(opacity=50);transition:opacity 0.3s ease,width 0.3s ease;width:23px;overflow:hidden;white-space:nowrap;border:1px solid #666;background:black;}.crackArea:hover{opacity:1;filter:alpha(opacity=100);width:230px;}"; |
84 | 86 | document.getElementsByTagName("head")[0].appendChild(selectStyle); |
85 | 87 | var placeholder=document.createElement("div"); |
86 | 88 | placeholder.style.cssText="width:100%;height:100%;text-align:center;font-size:x-large;cursor:pointer;color:#666;"; |
|
103 | 105 | select.onchange=function(){ |
104 | 106 | var value=select.options[select.options.selectedIndex].value; |
105 | 107 | if(value){ |
106 | | - window.open(value.replace("%s",(iqiyi&&location.href.indexOf("#")!=-1?decodeURIComponent(document.querySelector(".sns-icon>li>a").href.replace(/.*url=(.*)%3Fsrc.*/,"$1")):location.href))); |
107 | | - if(value.indexOf("hacg.user.js")!=-1){ |
108 | | - GM_setValue("hacgGodTurnVisited",true); |
109 | | - select.options.remove(select.options.selectedIndex); |
110 | | - }else{ |
111 | | - vipVideoCrackUrl=value; |
112 | | - GM_setValue("vipVideoCrackUrl",vipVideoCrackUrl); |
113 | | - if(video.parentNode)video.parentNode.replaceChild(placeholder,video); |
| 108 | + var url=value.replace("%s",(iqiyi&&location.href.indexOf("#")!=-1?decodeURIComponent(document.querySelector(".sns-icon>li>a").href.replace(/.*url=(.*)%3Fsrc.*/,"$1")):location.href)); |
| 109 | + if(!vipVideoCrackEmbed || !embedCrack(url)){ |
| 110 | + window.open(url); |
| 111 | + if(value.indexOf("hacg.user.js")!=-1){ |
| 112 | + GM_setValue("hacgGodTurnVisited",true); |
| 113 | + select.options.remove(select.options.selectedIndex); |
| 114 | + }else{ |
| 115 | + vipVideoCrackUrl=value; |
| 116 | + GM_setValue("vipVideoCrackUrl",vipVideoCrackUrl); |
| 117 | + if(video.parentNode)video.parentNode.replaceChild(placeholder,video); |
| 118 | + } |
114 | 119 | } |
115 | 120 | select.options.selectedIndex=0; |
116 | 121 | } |
117 | 122 | }; |
118 | 123 | var quickAccess=document.createElement("label"); |
119 | 124 | quickAccess.className="crackJump"; |
120 | | - quickAccess.title="立即跳转到上次选择的站点"; |
121 | | - quickAccess.innerHTML="<input type='checkbox'>立即跳转"; |
| 125 | + quickAccess.title="立即利用上次选择的接口破解"; |
| 126 | + quickAccess.innerHTML="<input type='checkbox'>立即破解"; |
122 | 127 | var jumpCheck=quickAccess.querySelector("input"); |
123 | 128 | jumpCheck.onclick=function(){ |
124 | 129 | vipVideoCrackJump=jumpCheck.checked; |
125 | 130 | GM_setValue("vipVideoCrackJump",vipVideoCrackJump); |
126 | 131 | crackJump(); |
127 | 132 | }; |
| 133 | + var embedLabel=document.createElement("label"); |
| 134 | + embedLabel.className="crackJump"; |
| 135 | + embedLabel.title="能嵌入当前站点的接口就直接嵌入页面"; |
| 136 | + embedLabel.innerHTML="<input type='checkbox'>能嵌就嵌"; |
| 137 | + var embedCheck=embedLabel.querySelector("input"); |
| 138 | + embedCheck.onclick=function(){ |
| 139 | + vipVideoCrackEmbed=embedCheck.checked; |
| 140 | + GM_setValue("vipVideoCrackEmbed",vipVideoCrackEmbed); |
| 141 | + crackJump(); |
| 142 | + }; |
128 | 143 | var crackArea=document.createElement("div"); |
129 | 144 | crackArea.className="crackArea"; |
130 | 145 | crackArea.appendChild(select); |
131 | 146 | crackArea.appendChild(quickAccess); |
| 147 | + crackArea.appendChild(embedLabel); |
132 | 148 | function crackJump(){ |
133 | 149 | if(vipVideoCrackJump){ |
134 | 150 | var value=vipVideoCrackUrl?vipVideoCrackUrl:cracks[0].url; |
135 | | - GM_openInTab(value.replace("%s",(iqiyi?location.href.replace(/#.*/,""):location.href)),false); |
136 | | - if(video.parentNode)video.parentNode.replaceChild(placeholder,video); |
| 151 | + var url=value.replace("%s",(iqiyi?location.href.replace(/#.*/,""):location.href)); |
| 152 | + if(!vipVideoCrackEmbed || !embedCrack(url)){ |
| 153 | + GM_openInTab(url,false); |
| 154 | + if(video.parentNode)video.parentNode.replaceChild(placeholder,video); |
| 155 | + } |
137 | 156 | } |
138 | 157 | } |
| 158 | + function embedCrack(url){ |
| 159 | + var canEmbed=false; |
| 160 | + if(/^https/.test(url)){ |
| 161 | + url=location.protocol+url.slice(6); |
| 162 | + canEmbed=true; |
| 163 | + }else if(location.protocol=="http:"){ |
| 164 | + canEmbed=true; |
| 165 | + } |
| 166 | + if(canEmbed){ |
| 167 | + iframe.width=videoWidth; |
| 168 | + iframe.height=videoHeight; |
| 169 | + iframe.src=url; |
| 170 | + if(!iframe.parentNode){ |
| 171 | + if(video.parentNode){ |
| 172 | + video.parentNode.replaceChild(iframe,video); |
| 173 | + }else{ |
| 174 | + placeholder.parentNode.replaceChild(iframe,placeholder); |
| 175 | + } |
| 176 | + video=iframe; |
| 177 | + } |
| 178 | + } |
| 179 | + return canEmbed; |
| 180 | + } |
139 | 181 | var si=setInterval(function(){ |
140 | 182 | [].every.call(document.querySelectorAll("object,embed,video"),function(item){ |
141 | 183 | var style=getComputedStyle(item, null); |
|
147 | 189 | }); |
148 | 190 | if(video){ |
149 | 191 | clearInterval(si); |
| 192 | + var videoStyle=getComputedStyle(video, null); |
| 193 | + videoWidth=videoStyle.width; |
| 194 | + videoHeight=videoStyle.height; |
150 | 195 | var videoParent=video.parentNode; |
151 | 196 | if(location.hostname.indexOf("v.yinyuetai.com")!=-1){ |
152 | 197 | videoParent.parentNode.style.position="absolute"; |
|
156 | 201 | if(vipVideoCrackJump){ |
157 | 202 | jumpCheck.checked=true; |
158 | 203 | } |
| 204 | + if(vipVideoCrackEmbed){ |
| 205 | + embedCheck.checked=true; |
| 206 | + } |
159 | 207 | crackJump(); |
160 | 208 | unsafeWindow.eval(` |
161 | 209 | var pushState = window.history.pushState; |
|
0 commit comments