Use Webogram credentials
This commit is contained in:
parent
e40d913ef9
commit
8f7a791f9f
@ -173,14 +173,14 @@ export class AppSidebarLeft extends SidebarSlider {
|
|||||||
onClick: () => {
|
onClick: () => {
|
||||||
location.href = 'https://web.telegram.org/z/';
|
location.href = 'https://web.telegram.org/z/';
|
||||||
},
|
},
|
||||||
verify: () => location.hostname === 'web.telegram.org'
|
verify: () => App.isMainDomain
|
||||||
}, {
|
}, {
|
||||||
icon: 'char w',
|
icon: 'char w',
|
||||||
text: 'ChatList.Menu.SwitchTo.Webogram',
|
text: 'ChatList.Menu.SwitchTo.Webogram',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
location.href = 'https://web.telegram.org/';
|
location.href = 'https://web.telegram.org/';
|
||||||
},
|
},
|
||||||
verify: () => location.hostname === 'web.telegram.org'
|
verify: () => App.isMainDomain
|
||||||
}];
|
}];
|
||||||
|
|
||||||
this.toolsBtn = ButtonMenuToggle({}, 'bottom-right', menuButtons, (e) => {
|
this.toolsBtn = ButtonMenuToggle({}, 'bottom-right', menuButtons, (e) => {
|
||||||
@ -201,7 +201,7 @@ export class AppSidebarLeft extends SidebarSlider {
|
|||||||
btnMenuFooter.classList.add('btn-menu-footer');
|
btnMenuFooter.classList.add('btn-menu-footer');
|
||||||
const t = document.createElement('span');
|
const t = document.createElement('span');
|
||||||
t.classList.add('btn-menu-footer-text');
|
t.classList.add('btn-menu-footer-text');
|
||||||
t.innerHTML = 'Telegram WebK alpha ' + App.version;
|
t.innerHTML = 'Telegram Web' + App.suffix + ' alpha ' + App.version;
|
||||||
btnMenuFooter.append(t);
|
btnMenuFooter.append(t);
|
||||||
btnMenu.classList.add('has-footer');
|
btnMenu.classList.add('has-footer');
|
||||||
btnMenu.append(btnMenuFooter);
|
btnMenu.append(btnMenuFooter);
|
||||||
|
@ -17,7 +17,14 @@ const App = {
|
|||||||
langPack: 'macos',
|
langPack: 'macos',
|
||||||
langPackCode: 'en',
|
langPackCode: 'en',
|
||||||
domains: [] as string[],
|
domains: [] as string[],
|
||||||
baseDcId: 2
|
baseDcId: 2,
|
||||||
|
isMainDomain: location.hostname === 'web.telegram.org',
|
||||||
|
suffix: 'K'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(App.isMainDomain) { // use Webogram credentials then
|
||||||
|
App.id = 2496;
|
||||||
|
App.hash = '8da85b0d5bfe62527e5b244c209159c3';
|
||||||
|
}
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
@ -304,7 +304,7 @@ export default class MTPNetworker {
|
|||||||
serializer.storeInt(App.id, 'api_id');
|
serializer.storeInt(App.id, 'api_id');
|
||||||
serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');
|
serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');
|
||||||
serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');
|
serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');
|
||||||
serializer.storeString(App.version, 'app_version');
|
serializer.storeString(App.version + (App.isMainDomain ? ' ' + App.suffix : ''), 'app_version');
|
||||||
serializer.storeString(navigator.language || 'en', 'system_lang_code');
|
serializer.storeString(navigator.language || 'en', 'system_lang_code');
|
||||||
serializer.storeString(App.langPack, 'lang_pack');
|
serializer.storeString(App.langPack, 'lang_pack');
|
||||||
serializer.storeString(navigator.language || 'en', 'lang_code');
|
serializer.storeString(navigator.language || 'en', 'lang_code');
|
||||||
|
Loading…
Reference in New Issue
Block a user