Skip to content

Commit b25b648

Browse files
committed
add embed fun
1 parent e8992d0 commit b25b648

1 file changed

Lines changed: 65 additions & 17 deletions

File tree

VIP Video Cracker/VIP Video Cracker.user.js

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name VIP视频破解
33
// @name:en VIP Video Cracker
44
// @namespace hoothin
5-
// @version 1.5.9
5+
// @version 1.6.0
66
// @description 解析并破解各大视频站的VIP权限
77
// @description:en Crack VIP permissions of some chinese video sites
88
// @author hoothin
@@ -41,13 +41,12 @@
4141
(function() {
4242
'use strict';
4343
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:"首选"},
4545
{name:"无名小站1",url:"http://www.wmxz.wang/video.php?url=%s",title:"次选"},
4646
{name:"无名小站2",url:"http://www.sfsft.com/admin.php?url=%s",title:"无名小站的源码"},
4747
{name:"小海解析1",url:"https://ckplaer.duapp.com/hai.php?url=%s",title:"播放器似乎放在百度开发者平台"},
4848
{name:"小海解析2",url:"http://jx.ck921.com/hai.php?url=%s",title:"和上面的用的应该是同样的服务器"},
4949
{name:"VIP看看",url:"http://2.jx.72du.com/video.php?url=%s",title:"无名小站的源码"},
50-
{name:"疯狂解析",url:"http://vip.ifkdy.com/?url=%s",title:"仅是简单嵌了47影视云、小海解析等几个解析站"},
5150
{name:"歪歪电影",url:"http://www.yydy8.com/common/?url=%s"},
5251
{name:"石头解析",url:"https://jiexi.071811.cc/jx.php?url=%s"},
5352
{name:"百域阁",url:"http://api.svip.baiyug.cn/svip/index.php?url=%s"},
@@ -73,14 +72,17 @@
7372
{name:"舞动秋天",url:"http://qtzr.net/s/?qt=%s"},
7473
{name:"CloudParse",url:"http://api.cloudparse.com/?url=%s"},
7574
{name:"迷失之梦",url:"http://mt2t.com/yun?url=%s",title:"这个解析站似乎不大稳定"},
75+
{name:"疯狂解析",url:"http://vip.ifkdy.com/?url=%s",title:"仅是简单嵌了47影视云、小海解析等几个解析站"},
7676
{name:"97在线看",url:"http://www.97zxkan.com/jiexi/97zxkanapi.php?url=%s"},
7777
{name:"71ki解析",url:"http://jx.71ki.com/tong.php?url=%s"}
78-
],video,i=0;
78+
],video,videoWidth,videoHeight,i=0;
7979
var iqiyi=location.hostname.indexOf("iqiyi.com")!=-1;
8080
var vipVideoCrackJump=GM_getValue("vipVideoCrackJump");
81+
var vipVideoCrackEmbed=GM_getValue("vipVideoCrackEmbed");
8182
var vipVideoCrackUrl=GM_getValue("vipVideoCrackUrl");
83+
var iframe=document.createElement("iframe");
8284
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;}";
8486
document.getElementsByTagName("head")[0].appendChild(selectStyle);
8587
var placeholder=document.createElement("div");
8688
placeholder.style.cssText="width:100%;height:100%;text-align:center;font-size:x-large;cursor:pointer;color:#666;";
@@ -103,39 +105,79 @@
103105
select.onchange=function(){
104106
var value=select.options[select.options.selectedIndex].value;
105107
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+
}
114119
}
115120
select.options.selectedIndex=0;
116121
}
117122
};
118123
var quickAccess=document.createElement("label");
119124
quickAccess.className="crackJump";
120-
quickAccess.title="立即跳转到上次选择的站点";
121-
quickAccess.innerHTML="<input type='checkbox'>立即跳转";
125+
quickAccess.title="立即利用上次选择的接口破解";
126+
quickAccess.innerHTML="<input type='checkbox'>立即破解";
122127
var jumpCheck=quickAccess.querySelector("input");
123128
jumpCheck.onclick=function(){
124129
vipVideoCrackJump=jumpCheck.checked;
125130
GM_setValue("vipVideoCrackJump",vipVideoCrackJump);
126131
crackJump();
127132
};
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+
};
128143
var crackArea=document.createElement("div");
129144
crackArea.className="crackArea";
130145
crackArea.appendChild(select);
131146
crackArea.appendChild(quickAccess);
147+
crackArea.appendChild(embedLabel);
132148
function crackJump(){
133149
if(vipVideoCrackJump){
134150
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+
}
137156
}
138157
}
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+
}
139181
var si=setInterval(function(){
140182
[].every.call(document.querySelectorAll("object,embed,video"),function(item){
141183
var style=getComputedStyle(item, null);
@@ -147,6 +189,9 @@
147189
});
148190
if(video){
149191
clearInterval(si);
192+
var videoStyle=getComputedStyle(video, null);
193+
videoWidth=videoStyle.width;
194+
videoHeight=videoStyle.height;
150195
var videoParent=video.parentNode;
151196
if(location.hostname.indexOf("v.yinyuetai.com")!=-1){
152197
videoParent.parentNode.style.position="absolute";
@@ -156,6 +201,9 @@
156201
if(vipVideoCrackJump){
157202
jumpCheck.checked=true;
158203
}
204+
if(vipVideoCrackEmbed){
205+
embedCheck.checked=true;
206+
}
159207
crackJump();
160208
unsafeWindow.eval(`
161209
var pushState = window.history.pushState;

0 commit comments

Comments
 (0)