This repository was archived by the owner on Oct 25, 2023. It is now read-only.
File tree 2 files changed +15
-8
lines changed
2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 45
45
}
46
46
$ . getJSON ( 'https://telegram.org/webogram_migrate' ) . success ( function ( result ) {
47
47
kzVersion = result . kz_version
48
- if ( 'K' === kzVersion || 'Z' === kzVersion ) {
49
- ConfigStorage . set ( {
50
- kz_version : kzVersion
51
- } )
52
- location . href = 'https://web.telegram.org/' + kzVersion . toLowerCase ( ) + '/' + location . hash
53
- return
54
- } else {
55
- bootReady . migration_check = true
48
+ if ( 'K' !== kzVersion && 'Z' !== kzVersion ) {
49
+ kzVersion = Math . random ( ) >= 0.5 ? 'K' : 'Z'
56
50
}
51
+ ConfigStorage . set ( {
52
+ kz_version : kzVersion
53
+ } )
54
+ location . href = 'https://web.telegram.org/' + kzVersion . toLowerCase ( ) + '/' + location . hash
57
55
} )
56
+ return
58
57
}
59
58
var checkReady = function checkReady ( ) {
60
59
var i
Original file line number Diff line number Diff line change 17
17
! window . addEventListener ) {
18
18
return
19
19
}
20
+ if ( 'web.telegram.org' !== location . hostname ||
21
+ Config . Modes . test ||
22
+ Config . Modes . ios_standalone ||
23
+ location . search . indexOf ( 'legacy=1' ) != - 1 ) {
24
+ // procceed
25
+ } else {
26
+ return
27
+ }
20
28
21
29
var declined = false
22
30
function updateFound ( ) {
You can’t perform that action at this time.
0 commit comments