Skip to content

Commit

Permalink
Add missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
revenkroz committed Feb 12, 2023
1 parent 54a5a07 commit 8a7ce91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
border-radius: 4px;
padding: 8px;
margin: 7px 0;
word-break: break-all;
word-break: break-word;
white-space: pre-wrap;
text-align: left;
Expand Down Expand Up @@ -407,6 +406,16 @@
close() {
Telegram.WebApp.close();
},
toggleMainButton(el) {
const mainButton = Telegram.WebApp.MainButton;
if (mainButton.isVisible) {
mainButton.hide();
el.innerHTML = 'Show Main Button';
} else {
mainButton.show();
el.innerHTML = 'Hide Main Button';
}
},

// actions
sendMessage(msg_id, with_webview) {
Expand Down

0 comments on commit 8a7ce91

Please sign in to comment.