9 lines
384 B
JavaScript
9 lines
384 B
JavaScript
document.addEventListener("DOMContentLoaded", () => {
|
|
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 = tg.initDataUnsafe.receiver.id;
|
|
|
|
console.log(tg.initDataUnsafe.user)
|
|
}); |