Update content of files

This commit is contained in:
GitHub Action 2024-11-13 09:48:08 +00:00
parent 8ea9293781
commit a414c2fd93
4 changed files with 13 additions and 9 deletions

View file

@ -9,7 +9,7 @@
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" />
<meta name="robots" content="noindex, nofollow" />
<script src="https://tg.dev/js/telegram-web-app-beta.js?73"></script>
<script src="https://tg.dev/js/telegram-web-app-beta.js?74"></script>
<script>
function setThemeClass() {
document.documentElement.className = Telegram.WebApp.colorScheme;

View file

@ -146,6 +146,7 @@ section {
}
section#top_sect {
background-color: var(--header-color, var(--tg-theme-bg-color, #ffffff));
padding-top: calc(var(--tg-safe-area-inset-top, 0) + var(--tg-content-safe-area-inset-top, 0));
}
section#top_sect.second {
background-color: var(--header-color, var(--tg-theme-secondary-bg-color, #efefef));
@ -161,6 +162,7 @@ p {
}
ul {
text-align: left;
word-break: break-word;
}
li {
color: var(--tg-theme-hint-color, #a8a8a8);

View file

@ -8,7 +8,7 @@
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" />
<meta name="robots" content="noindex,nofollow" />
<script src="https://tg.dev/js/telegram-web-app-beta.js?73"></script>
<script src="https://tg.dev/js/telegram-web-app-beta.js?74"></script>
<script>
function setThemeClass() {
document.documentElement.className = Telegram.WebApp.colorScheme;
@ -19,14 +19,14 @@
</script>
<link href="https://tg.dev/css/bootstrap.min.css?3" rel="stylesheet">
<link href="https://tg.dev/css/bootstrap-extra.css?2" rel="stylesheet">
<link href="/css/webappdemo.css?16" rel="stylesheet">
<link href="/css/webappdemo.css?17" rel="stylesheet">
</head>
<body class="" style="visibility: hidden;">
<section id="top_sect" class="second">
<button id="main_btn" onclick="DemoApp.sendMessage('');">Send «Hello, World!»</button>
<button id="with_webview_btn" onclick="DemoApp.sendMessage('', true);">Send «Hello, World!» with inline webview button</button>
<button id="share_btn" onclick="DemoApp.sendMessage('', false, true);">Share «Hello, World!»</button>
<button id="share_ww_btn" onclick="DemoApp.sendMessage('', true, true);">Share «Hello, World!» with inline webview button</button>
<button id="share_ww_btn" onclick="DemoApp.sendMessage('', true, true);">Share «Hello, World!» with inline button</button>
<button id="data_btn" onclick="DemoApp.sendTime(true);">Send current time to bot (x10)</button>
<button onclick="DemoApp.expand();">Expand Webview</button>
<button onclick="DemoApp.toggleBackButton(this);">Show Back Button</button>
@ -91,6 +91,7 @@
<li><a href="javascript:DemoApp.downloadFile(this, 'https://telegra.ph/file/5583ac37c90979f052b7b.png', 'Photo.png');">Download picture</a> <span></span></li>
<li><a href="javascript:DemoApp.downloadFile(this, 'https://telegra.ph/file/61f1dac694c3131a7b4ac.mp4', 'Video.mp4');">Download video</a> <span></span></li>
<li><a href="javascript:DemoApp.downloadFile(this, 'https://pdfobject.com/pdf/sample.pdf', 'Sample.pdf');">Download PDF</a> <span></span></li>
</ul>
<ul>
<li><a href="javascript:Telegram.WebApp.openTelegramLink('https://t.me/addstickers/fltmp');">Stickerpack</a></li>
@ -102,9 +103,10 @@
</ul>
<ul>
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384');">Set emoji status</a> <span></span></li>
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384', 1731489698);">Set emoji status</a> for 5 min <span></span></li>
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384', 300);">Set emoji status</a> for 5 min <span></span></li>
<li><a href="javascript:DemoApp.setEmojiStatus(this, '123');">Set emoji status</a> (invalid id) <span></span></li>
</ul>
<p>Test permissions:</p>
<div class="columns">
<ul>
@ -220,7 +222,7 @@
<div class="viewport-stable-border"></div>
<script src="/js/jquery.min.js"></script>
<script src="https://tg.dev/js/bootstrap.min.js"></script>
<script src="/js/webappdemo.js?41"></script>
<script src="/js/webappdemo.js?42"></script>
<script>DemoApp.apiUrl = "/demo/api";
Telegram.WebApp.onEvent('themeChanged', function() {

View file

@ -636,8 +636,8 @@ var DemoApp = {
DemoApp.showAlert('emojiStatusFailed: ' + params.error);
});
},
setEmojiStatus: function(el, custom_emoji_id, expiration_date) {
Telegram.WebApp.setEmojiStatus(custom_emoji_id, expiration_date ? {expiration_date: expiration_date} : {}, function(result) {
setEmojiStatus: function(el, custom_emoji_id, duration) {
Telegram.WebApp.setEmojiStatus(custom_emoji_id, duration ? {duration: duration} : {}, function(result) {
if (result) {
$(el).next('span').text('(status set!)').attr('class', 'ok');
} else {
@ -645,7 +645,7 @@ var DemoApp = {
}
});
},
requestEmojiStatusAccess: function(el, custom_emoji_id, expiration_date) {
requestEmojiStatusAccess: function(el) {
Telegram.WebApp.requestEmojiStatusAccess(function(allowed) {
if (allowed) {
$(el).next('span').text('(Access granted)').attr('class', 'ok');