some tg tests
This commit is contained in:
10
index.html
10
index.html
@@ -12,6 +12,16 @@
|
|||||||
<title>Luminic Space</title>
|
<title>Luminic Space</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
if (window.Telegram.WebApp) {
|
||||||
|
const tg = window.Telegram.WebApp;
|
||||||
|
tg.expand(); // Разворачиваем веб-приложение на весь экран
|
||||||
|
|
||||||
|
// Получаем информацию о пользователе и выводим её
|
||||||
|
const user = tg.initDataUnsafe.user;
|
||||||
|
console.log(user);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user