-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
36 lines (26 loc) · 822 Bytes
/
script.js
File metadata and controls
36 lines (26 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$( document ).ready(function() {
// let tg = window.Telegram.WebApp;
// tg.expand();
// tg.MainButton.textColor = '#FFFFFF';
// tg.MainButton.color = '#2cab37';
// let item = "";
// let btn1 = document.getElementById("btn1");
// btn1.addEventListener("click", function(){
// if (tg.MainButton.isVisible) {
// tg.MainButton.hide();
// }
// else {
// tg.MainButton.setText("Вы выбрали товар 1!");
// item = "1";
// tg.MainButton.show();
// }
// });
// Telegram.WebApp.onEvent("mainButtonClicked", function(){
// tg.sendData(item);
// });
// let usercard = document.getElementById("usercard");
// let p = document.createElement("p");
// p.innerText = `${tg.initDataUnsafe.user.first_name}
// ${tg.initDataUnsafe.user.last_name}`;
// usercard.appendChild(p);
});