Skip to content

Commit f7eccef

Browse files
committed
fix for SogouExplorer
1 parent c3c7273 commit f7eccef

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

VIP Video Cracker/VIP Video Cracker.user.js

Lines changed: 7 additions & 7 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.5
5+
// @version 1.6.6
66
// @description 解析并破解各大视频站的VIP权限
77
// @description:en Crack VIP permissions of some chinese video sites
88
// @author hoothin
@@ -116,7 +116,7 @@
116116
if(video.parentNode && !yinyuetai)video.parentNode.replaceChild(placeholder,video);
117117
}
118118
if(!vipVideoCrackEmbed || !embedCrack(url)){
119-
window.open(url);
119+
unsafeWindow.open(url);
120120
}
121121
select.options.selectedIndex=0;
122122
}
@@ -184,7 +184,7 @@
184184
}
185185
var si=setInterval(function(){
186186
[].every.call(document.querySelectorAll("object,embed,video"),function(item){
187-
var style=getComputedStyle(item, null);
187+
var style=unsafeWindow.getComputedStyle(item, null);
188188
if(style.width.replace("px","")>100 && style.height.replace("px","")>100){
189189
video=item;
190190
return false;
@@ -193,18 +193,18 @@
193193
});
194194
if(video){
195195
clearInterval(si);
196-
var videoStyle=getComputedStyle(video, null);
196+
var videoStyle=unsafeWindow.getComputedStyle(video, null);
197197
videoWidth=videoStyle.width;
198198
videoHeight=videoStyle.height;
199199
var videoParent=video.parentNode;
200200
if(yinyuetai){
201201
videoParent.parentNode.style.position="absolute";
202-
videoStyle=getComputedStyle(videoParent.parentNode, null);
202+
videoStyle=unsafeWindow.getComputedStyle(videoParent.parentNode, null);
203203
videoWidth=videoStyle.width;
204204
videoHeight=videoStyle.height;
205205
}
206206
videoParent.appendChild(crackArea);
207-
placeholder.style.lineHeight=getComputedStyle(videoParent).height;
207+
placeholder.style.lineHeight=unsafeWindow.getComputedStyle(videoParent).height;
208208
if(vipVideoCrackJump){
209209
jumpCheck.checked=true;
210210
}
@@ -223,7 +223,7 @@
223223
window.postMessage("replaceState","*");
224224
return pushState.apply(history, arguments);
225225
};`);
226-
window.addEventListener('message',function(e) {
226+
unsafeWindow.addEventListener('message',function(e) {
227227
if(e.data=="pushState" || e.data=="replaceState"){
228228
setTimeout(function(){crackJump();},1);
229229
}

0 commit comments

Comments
 (0)