From b8b34b320518737ce91ef4508cbeae24dfbfbb56 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 24 Aug 2022 14:31:30 +0000 Subject: [PATCH] Update content of files --- data/web/telegram.org/js/telegram-web-app.js | 8 ++++++++ data/web/webappcontent.telegram.org/cafe.html | 2 +- data/web/webappcontent.telegram.org/demo.html | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/data/web/telegram.org/js/telegram-web-app.js b/data/web/telegram.org/js/telegram-web-app.js index 9dc635ed0f..6b32a355f1 100644 --- a/data/web/telegram.org/js/telegram-web-app.js +++ b/data/web/telegram.org/js/telegram-web-app.js @@ -284,6 +284,7 @@ var webAppInitData = '', webAppInitDataUnsafe = {}; var themeParams = {}, colorScheme = 'light'; var webAppVersion = '6.0'; + var webAppPlatform = 'unknown'; if (initParams.tgWebAppData && initParams.tgWebAppData.length) { webAppInitData = initParams.tgWebAppData; @@ -314,6 +315,9 @@ if (initParams.tgWebAppVersion) { webAppVersion = initParams.tgWebAppVersion; } + if (initParams.tgWebAppPlatform) { + webAppPlatform = initParams.tgWebAppPlatform; + } function onThemeChanged(eventType, eventData) { if (eventData.theme_params) { @@ -986,6 +990,10 @@ get: function(){ return webAppVersion; }, enumerable: true }); + Object.defineProperty(WebApp, 'platform', { + get: function(){ return webAppPlatform; }, + enumerable: true + }); Object.defineProperty(WebApp, 'colorScheme', { get: function(){ return colorScheme; }, enumerable: true diff --git a/data/web/webappcontent.telegram.org/cafe.html b/data/web/webappcontent.telegram.org/cafe.html index 4a45e839a5..51002669b3 100644 --- a/data/web/webappcontent.telegram.org/cafe.html +++ b/data/web/webappcontent.telegram.org/cafe.html @@ -9,7 +9,7 @@ - + +