File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -14,34 +14,33 @@ export default {
1414 func : function ( ) {
1515 // Lấy user id (uid) - khi đang trong tường của người dùng muốn lấy user id. Ví dụ: https://www.facebook.com/callchoulnhe
1616
17- const found = ( r ) =>
18- r && r [ 0 ] && window . prompt ( `USER ID của ${ document . title } :` , r [ 0 ] ) ;
17+ const find = ( r ) => ( r ? r [ 0 ] : 0 ) ;
1918
20- return (
21- found (
19+ let uid =
20+ find (
2221 / (?< = \" u s e r I D \" \: \" ) ( .\d + ?) (? = \" ) / . exec (
2322 document . querySelector ( "html" ) . textContent
2423 )
2524 ) ||
26- found ( / (?< = \/ p r o f i l e \. p h p \? i d = ) ( .\d + ?) ( $ | (? = & ) ) / . exec ( location . href ) ) ||
25+ find ( / (?< = \/ p r o f i l e \. p h p \? i d = ) ( .\d + ?) ( $ | (? = & ) ) / . exec ( location . href ) ) ||
2726 ( ( ) => {
2827 for ( let a of Array . from ( document . querySelectorAll ( "a" ) ) ) {
29- if (
30- found (
31- / (?< = s e t \= ( p b | p i c f p | e c n f | p o b ) \. ) ( .\d + ?) ( $ | (? = \. ) ) / . exec ( a . href )
32- )
33- )
34- return true ;
28+ let _ = find (
29+ / (?< = s e t \= ( p b | p i c f p | e c n f | p o b ) \. ) ( .\d + ?) ( $ | (? = \. ) ) / . exec ( a . href )
30+ ) ;
31+ if ( _ ) return _ ;
3532 }
36- return false ;
33+ return 0 ;
3734 } ) ( ) ||
38- found (
35+ find (
3936 / (?< = \" u s e r \" \: \{ \" i d \" \: \" ) ( .\d + ?) (? = \" ) / . exec ( document . body . innerHTML )
40- ) ||
37+ ) ;
38+
39+ if ( uid ) window . prompt ( `USER ID của ${ document . title } :` , uid ) ;
40+ else
4141 window . prompt (
4242 "Không tìm thấy USER ID nào trong trang web!\nBạn có đang ở đúng trang profile chưa?\nTrang web Ví dụ: " ,
4343 "https://www.facebook.com/callchoulnhe"
44- )
45- ) ;
44+ ) ;
4645 } ,
4746} ;
You can’t perform that action at this time.
0 commit comments