22// @name VIP视频破解
33// @name :en VIP Video Cracker
44// @namespace hoothin
5- // @version 1.7.1
5+ // @version 1.7.2
66// @description 解析并破解各大视频站的VIP权限
77// @description :en Crack VIP permissions of some chinese video sites
88// @author hoothin
99// @include *://v.qq.com/x/*
10- // @include *://*.mgtv.com/b/*
10+ // @include *://m.v.qq.com/*
11+ // @include *://*.mgtv.com/*b/*
1112// @include *://*.le.com/ptv/vplay/*
13+ // @include *://m.le.com/*
1214// @include *://v.youku.com/v_show/*
15+ // @include *://m.youku.com/video/*
1316// @include *://*.iqiyi.com/v_*
1417// @include *://*.iqiyi.com/dianying/*
1518// @include *://*.tudou.com/albumplay/*
1619// @include *://*.tudou.com/listplay/*
1720// @include *://*.tudou.com/programs/view/*
18- // @include *://*.wasu.cn/Play/show/id/*
19- // @include *://tv.sohu.com/*
20- // @include *://film.sohu.com/album/*
21+ // @include *://*.wasu.cn/* Play/show/id/*
22+ // @include *://* tv.sohu.com/*
23+ // @include *://* film.sohu.com/album/*
2124// @include *://ddp.vip.pptv.com/vod_detail/*
2225// @include *://*.pptv.com/show/*
23- // @include *://www .acfun.cn/v/*
26+ // @include *://* .acfun.cn/v/*
2427// @include *://*.fun.tv/vplay/*
2528// @include *://vip.1905.com/play/*
2629// @include *://vip.pptv.com/show/*
2730// @include *://v.yinyuetai.com/video/*
2831// @include *://v.yinyuetai.com/playlist/*
29- // @include *://www .bilibili.com/video/*
32+ // @include *://* .bilibili.com/video/*
3033// @exclude *?url=*
3134// @exclude *?qt=*
3235// @exclude *?v=*
4346 var cracks = [
4447 { name :"47影视云" , url :"https://api.47ks.com/webcloud/?v=%s" , title :"首选" } ,
4548 { name :"无名小站" , url :"http://www.wmxz.wang/video.php?url=%s" , title :"次选" } ,
46- { name :"小海解析1(s)" , url :"https://ckplaer.duapp.com/hai2.php?url=%s" , title :"播放器似乎放在百度开发者平台" } ,
47- { name :"小海解析2" , url :"http://jx.ck921.com/hai2.php?url=%s" , title :"和上面的用的应该是同样的服务器" } ,
4849 { name :"石头解析(s)" , url :"https://jiexi.071811.cc/jx.php?url=%s" } ,
4950 { name :"爱看TV(s)" , url :"https://aikan-tv.com/tong.php?url=%s" } ,
5051 { name :"最小品(s)" , url :"https://www.zuixiaopin.com/api/cloudVideo?url=%s" } ,
5152 { name :"妹儿云(s)" , url :"https://www.yymeier.com/api.php?url=%s" } ,
5253 { name :"那片(s)" , url :"https://jxapi.nepian.com/ckparse/?url=%s" } ,
5354 { name :"眼睛会下雨(s)" , url :"https://www.vipjiexi.com/yun.php?url=%s" } ,
55+ { name :"小海解析1(s)" , url :"https://ckplaer.duapp.com/hai2.php?url=%s" , title :"播放器似乎放在百度开发者平台" } ,
56+ { name :"小海解析2" , url :"http://jx.ck921.com/hai2.php?url=%s" , title :"和上面的用的应该是同样的服务器" } ,
5457 { name :"Relon" , url :"http://yyygwz.com/index.php?url=%s" } ,
5558 { name :"SO视频" , url :"http://parse.colaparse.cc/?url=%s" } ,
5659 { name :"言朋影院" , url :"http://vip.yingyanxinwen.cn/vip/index.php?url=%s" } ,
7679 { name :"PPYPP" , url :"http://www.ppypp.com/yunparse/?url=%s" } ,
7780 { name :"百域阁" , url :"http://api.svip.baiyug.cn/svip/index.php?url=%s" } ,
7881 ] , video , videoWidth , videoHeight , i = 0 ;
82+ var isMobile = function ( ) {
83+ var userAgentInfo = navigator . userAgent . toLowerCase ( ) ;
84+ var Agents = [ "android" , "iphone" ,
85+ "symbianos" , "windows phone" ,
86+ "ipad" , "ipod" , "midp" , "ucweb" ] ;
87+ var flag = false ;
88+ for ( var v = 0 ; v < Agents . length ; v ++ ) {
89+ if ( userAgentInfo . indexOf ( Agents [ v ] ) > 0 ) {
90+ flag = true ;
91+ break ;
92+ }
93+ }
94+ return flag ;
95+ } ( ) ;
7996 var iqiyi = location . hostname . indexOf ( "iqiyi.com" ) != - 1 ;
8097 var vipVideoCrackJump = GM_getValue ( "vipVideoCrackJump" ) ;
8198 var vipVideoCrackEmbed = GM_getValue ( "vipVideoCrackEmbed" ) ;
8299 var vipVideoCrackUrl = GM_getValue ( "vipVideoCrackUrl" ) ;
83100 var iframe = document . createElement ( "iframe" ) ;
84101 var selectStyle = document . createElement ( "style" ) ;
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:18px;overflow:hidden;white-space:nowrap;border:1px solid #666;background:black;}.crackArea:hover{opacity:1;filter:alpha(opacity=100);width:230px;}.crackArea>p{display:block;font-size:13px;text-align:center;float:left;position:absolute;top:0px;background-color:black;width:100%}.crackArea:hover>p{display:none;}.crackArea>label{display:none;}.crackArea:hover>label{display:initial;}" ;
102+ 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:18px;height:18px; overflow:hidden;white-space:nowrap;border:1px solid #666;background:black;}.crackArea:hover{opacity:1;filter:alpha(opacity=100);width:230px;}.crackArea>p{display:block;font-size:13px;text-align:center;float:left;position:absolute;top:0px;background-color:black;width:100%;height:100%;margin:0 auto }.crackArea:hover>p{display:none;}.crackArea>label{display:none;}.crackArea:hover>label{display:initial;}" ;
86103 document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( selectStyle ) ;
87104 var placeholder = document . createElement ( "div" ) ;
88105 placeholder . style . cssText = "width:100%;height:100%;text-align:center;font-size:x-large;cursor:pointer;color:#666;" ;
181198 }
182199 return canEmbed ;
183200 }
184- var si = setInterval ( function ( ) {
185- [ ] . every . call ( document . querySelectorAll ( "object,embed,video" ) , function ( item ) {
186- var style = unsafeWindow . getComputedStyle ( item , null ) ;
187- if ( style . width . replace ( "px" , "" ) > 100 && style . height . replace ( "px" , "" ) > 100 ) {
188- video = item ;
189- return false ;
190- }
191- return true ;
192- } ) ;
193- if ( video ) {
194- clearInterval ( si ) ;
195- var videoStyle = unsafeWindow . getComputedStyle ( video , null ) ;
196- videoWidth = videoStyle . width ;
197- videoHeight = videoStyle . height ;
198- var videoParent = video . parentNode ;
199- videoParent . appendChild ( crackArea ) ;
200- placeholder . style . lineHeight = unsafeWindow . getComputedStyle ( videoParent ) . height ;
201- if ( location . hostname . indexOf ( "v.yinyuetai.com" ) != - 1 ) {
202- if ( ! / ^ h t t p s ? : \/ \/ v \. y i n y u e t a i \. c o m \/ v i d e o \/ h 5 \/ / . test ( location . href ) ) {
203- unsafeWindow . location . href = unsafeWindow . location . href . replace ( / ^ h t t p s ? : \/ \/ v \. y i n y u e t a i \. c o m \/ v i d e o \/ / , "http://v.yinyuetai.com/video/h5/" ) ;
204- } else {
205- videoParent . parentNode . style . position = "absolute" ;
206- setTimeout ( function ( ) {
207- videoStyle = unsafeWindow . getComputedStyle ( video , null ) ;
208- videoWidth = videoStyle . width ;
209- videoHeight = videoStyle . height ;
210- } , 1000 ) ;
201+ if ( isMobile ) {
202+ crackArea . style . position = "fixed" ;
203+ document . body . appendChild ( crackArea ) ;
204+ } else {
205+ var si = setInterval ( function ( ) {
206+ [ ] . every . call ( document . querySelectorAll ( "object,embed,video" ) , function ( item ) {
207+ var style = unsafeWindow . getComputedStyle ( item , null ) ;
208+ if ( style . width . replace ( "px" , "" ) > 100 && style . height . replace ( "px" , "" ) > 100 ) {
209+ video = item ;
210+ return false ;
211211 }
212- } else if ( location . hostname . indexOf ( "v.youku.com" ) != - 1 ) {
213- if ( vipVideoCrackEmbed ) videoHeight = "567px" ;
214- } else if ( iqiyi ) {
215- document . querySelector ( '#widget-dramaseries' ) . addEventListener ( 'click' , function ( e ) {
216- var target = e . target . parentNode ;
217- if ( target . tagName != "LI" ) return ;
218- GM_xmlhttpRequest ( {
219- method : 'GET' ,
220- url : "http://cache.video.qiyi.com/jp/vi/" + target . dataset . videolistTvid + "/" + target . dataset . videolistVid + "/?callback=crackIqiyi" ,
221- onload : function ( result ) {
222- var crackIqiyi = function ( d ) {
223- location . href = d . vu ;
224- } ;
225- eval ( result . responseText ) ;
226- }
212+ return true ;
213+ } ) ;
214+ if ( video ) {
215+ clearInterval ( si ) ;
216+ var videoStyle = unsafeWindow . getComputedStyle ( video , null ) ;
217+ videoWidth = videoStyle . width ;
218+ videoHeight = videoStyle . height ;
219+ var videoParent = video . parentNode ;
220+ videoParent . appendChild ( crackArea ) ;
221+ placeholder . style . lineHeight = unsafeWindow . getComputedStyle ( videoParent ) . height ;
222+ if ( location . hostname . indexOf ( "v.yinyuetai.com" ) != - 1 ) {
223+ if ( ! / ^ h t t p s ? : \/ \/ v \. y i n y u e t a i \. c o m \/ v i d e o \/ h 5 \/ / . test ( location . href ) ) {
224+ unsafeWindow . location . href = unsafeWindow . location . href . replace ( / ^ h t t p s ? : \/ \/ v \. y i n y u e t a i \. c o m \/ v i d e o \/ / , "http://v.yinyuetai.com/video/h5/" ) ;
225+ } else {
226+ videoParent . parentNode . style . position = "absolute" ;
227+ setTimeout ( function ( ) {
228+ videoStyle = unsafeWindow . getComputedStyle ( video , null ) ;
229+ videoWidth = videoStyle . width ;
230+ videoHeight = videoStyle . height ;
231+ } , 1000 ) ;
232+ }
233+ } else if ( location . hostname . indexOf ( "v.youku.com" ) != - 1 ) {
234+ if ( vipVideoCrackEmbed ) videoHeight = "567px" ;
235+ } else if ( iqiyi ) {
236+ document . querySelector ( '#widget-dramaseries' ) . addEventListener ( 'click' , function ( e ) {
237+ var target = e . target . parentNode ;
238+ if ( target . tagName != "LI" ) return ;
239+ GM_xmlhttpRequest ( {
240+ method : 'GET' ,
241+ url : "http://cache.video.qiyi.com/jp/vi/" + target . dataset . videolistTvid + "/" + target . dataset . videolistVid + "/?callback=crackIqiyi" ,
242+ onload : function ( result ) {
243+ var crackIqiyi = function ( d ) {
244+ location . href = d . vu ;
245+ } ;
246+ eval ( result . responseText ) ;
247+ }
248+ } ) ;
227249 } ) ;
250+ unsafeWindow . addEventListener ( "hashchange" , function ( ) {
251+ crackJump ( ) ;
252+ } ) ;
253+ }
254+ if ( vipVideoCrackJump ) {
255+ jumpCheck . checked = true ;
256+ }
257+ if ( vipVideoCrackEmbed ) {
258+ embedCheck . checked = true ;
259+ }
260+ crackJump ( ) ;
261+ unsafeWindow . eval ( `
262+ var pushState = window.history.pushState;
263+ window.history.pushState=function(a){
264+ window.postMessage("pushState","*");
265+ return pushState.apply(history, arguments);
266+ };
267+ var replaceState = window.history.pushState;
268+ window.history.replaceState=function(a){
269+ window.postMessage("replaceState","*");
270+ return pushState.apply(history, arguments);
271+ };` ) ;
272+ unsafeWindow . addEventListener ( 'message' , function ( e ) {
273+ if ( e . data == "pushState" || e . data == "replaceState" ) {
274+ setTimeout ( function ( ) { crackJump ( ) ; } , 1 ) ;
275+ }
228276 } ) ;
229- unsafeWindow . addEventListener ( "hashchange" , function ( ) {
230- crackJump ( ) ;
231- } ) ;
232- }
233- if ( vipVideoCrackJump ) {
234- jumpCheck . checked = true ;
235277 }
236- if ( vipVideoCrackEmbed ) {
237- embedCheck . checked = true ;
238- }
239- crackJump ( ) ;
240- unsafeWindow . eval ( `
241- var pushState = window.history.pushState;
242- window.history.pushState=function(a){
243- window.postMessage("pushState","*");
244- return pushState.apply(history, arguments);
245- };
246- var replaceState = window.history.pushState;
247- window.history.replaceState=function(a){
248- window.postMessage("replaceState","*");
249- return pushState.apply(history, arguments);
250- };` ) ;
251- unsafeWindow . addEventListener ( 'message' , function ( e ) {
252- if ( e . data == "pushState" || e . data == "replaceState" ) {
253- setTimeout ( function ( ) { crackJump ( ) ; } , 1 ) ;
254- }
255- } ) ;
256- }
257- } , 500 ) ;
278+ } , 500 ) ;
279+ }
258280} ) ( ) ;
0 commit comments