This commit is contained in:
Kavalar 2025-01-04 02:23:31 +03:00
parent 3a36554034
commit 7b4bfbbc21

View File

@ -1,9 +1,9 @@
document.addEventListener("DOMContentLoaded", () => {
let tg = window.Telegram.WebApp;
let tg = window.Telegram.WebAppUser;
let username_tag = document.getElementById("username_tag")
let user_id_tag = document.getElementById("user_id_tag")
username_tag.innerHTML = tg.initDataUnsafe.user.username;
user_id_tag.innerHTML = Telegram.WebApp.initDataUnsafe.userId;
user_id_tag.innerHTML = tg.id;
console.log(tg.initDataUnsafe.user)
});