Skip to content

Commit d5925d0

Browse files
committed
fix for youku
1 parent 8124bc8 commit d5925d0

1 file changed

Lines changed: 25 additions & 24 deletions

File tree

VIP Video Cracker/VIP Video Cracker.user.js

Lines changed: 25 additions & 24 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.6.7
5+
// @version 1.6.8
66
// @description 解析并破解各大视频站的VIP权限
77
// @description:en Crack VIP permissions of some chinese video sites
88
// @author hoothin
@@ -192,10 +192,6 @@
192192
});
193193
if(video){
194194
clearInterval(si);
195-
var videoStyle=unsafeWindow.getComputedStyle(video, null);
196-
videoWidth=videoStyle.width;
197-
videoHeight=videoStyle.height;
198-
var videoParent=video.parentNode;
199195
if(location.hostname.indexOf("v.yinyuetai.com")!=-1){
200196
if (!/^https?:\/\/v\.yinyuetai\.com\/video\/h5\//.test(location.href)) {
201197
unsafeWindow.location.href = unsafeWindow.location.href.replace(/^https?:\/\/v\.yinyuetai\.com\/video\//,"http://v.yinyuetai.com/video/h5/");
@@ -207,7 +203,31 @@
207203
videoHeight=videoStyle.height;
208204
},1000);
209205
}
206+
}else if(location.hostname.indexOf("v.youku.com")!=-1){
207+
if(vipVideoCrackEmbed)video.height="90%";
208+
}else if(iqiyi){
209+
document.querySelector('#widget-dramaseries').addEventListener('click', function(e){
210+
var target=e.target.parentNode;
211+
if(target.tagName!="LI")return;
212+
GM_xmlhttpRequest({
213+
method: 'GET',
214+
url: "http://cache.video.qiyi.com/jp/vi/"+target.dataset.videolistTvid+"/"+target.dataset.videolistVid+"/?callback=crackIqiyi",
215+
onload: function(result) {
216+
var crackIqiyi=function(d){
217+
location.href=d.vu;
218+
};
219+
eval(result.responseText);
220+
}
221+
});
222+
});
223+
unsafeWindow.addEventListener("hashchange",function(){
224+
crackJump();
225+
});
210226
}
227+
var videoStyle=unsafeWindow.getComputedStyle(video, null);
228+
videoWidth=videoStyle.width;
229+
videoHeight=videoStyle.height;
230+
var videoParent=video.parentNode;
211231
videoParent.appendChild(crackArea);
212232
placeholder.style.lineHeight=unsafeWindow.getComputedStyle(videoParent).height;
213233
if(vipVideoCrackJump){
@@ -233,25 +253,6 @@
233253
setTimeout(function(){crackJump();},1);
234254
}
235255
});
236-
if(iqiyi){
237-
document.querySelector('#widget-dramaseries').addEventListener('click', function(e){
238-
var target=e.target.parentNode;
239-
if(target.tagName!="LI")return;
240-
GM_xmlhttpRequest({
241-
method: 'GET',
242-
url: "http://cache.video.qiyi.com/jp/vi/"+target.dataset.videolistTvid+"/"+target.dataset.videolistVid+"/?callback=crackIqiyi",
243-
onload: function(result) {
244-
var crackIqiyi=function(d){
245-
location.href=d.vu;
246-
};
247-
eval(result.responseText);
248-
}
249-
});
250-
});
251-
unsafeWindow.addEventListener("hashchange",function(){
252-
crackJump();
253-
});
254-
}
255256
}
256257
},500);
257258
})();

0 commit comments

Comments
 (0)