mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-24 16:29:45 +01:00
Update content of files
This commit is contained in:
parent
4bab7b88a2
commit
72d18f2db6
3 changed files with 12 additions and 7 deletions
|
@ -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.js?10"></script>
|
||||
<script src="https://tg.dev/js/telegram-web-app.js?11"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||
|
@ -441,7 +441,7 @@
|
|||
</div>
|
||||
<script src="https://tg.dev/js/jquery.min.js"></script>
|
||||
<script src="https://tg.dev/js/tgsticker.js?27"></script>
|
||||
<script src="/js/cafe.js?20"></script>
|
||||
<script src="/js/cafe.js?21"></script>
|
||||
<script>Cafe.init({"apiUrl":"\/cafe\/api","userId":0,"userHash":null});</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<meta name="MobileOptimized" content="176" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<script src="https://telegram.org/js/telegram-web-app.js?10"></script>
|
||||
<script src="https://telegram.org/js/telegram-web-app.js?11"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||
|
@ -188,9 +188,9 @@
|
|||
</ul>
|
||||
<p>Haptics:</p>
|
||||
<ul>
|
||||
<li>Impact: <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccupped('heavy');">heavy</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccupped('light');">light</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccupped('medium');">medium</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccupped('rigid');">rigid</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccupped('soft');">soft</a></li>
|
||||
<li>Notification: <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('error');">error</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('success');">success</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('warning');">warning</a></li>
|
||||
<li>Selection: <a href="javascript:Telegram.WebApp.HapticFeedback.selectionChanged();">changed</a></li>
|
||||
<li>Impact: <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccurred('heavy');">heavy</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccurred('light');">light</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccurred('medium');">medium</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccurred('rigid');">rigid</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.impactOccurred('soft');">soft</a><br><br></li>
|
||||
<li>Notification: <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('error');">error</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('success');">success</a>, <a href="javascript:Telegram.WebApp.HapticFeedback.notificationOccurred('warning');">warning</a><br><br></li>
|
||||
<li>Selection: <a href="javascript:Telegram.WebApp.HapticFeedback.selectionChanged();">changed</a><br><br></li>
|
||||
</ul>
|
||||
<pre><code id="webview_data"></code></pre>
|
||||
<div class="hint">
|
||||
|
@ -378,7 +378,7 @@ $('body').css('visibility', '');
|
|||
Telegram.WebApp.MainButton
|
||||
.setText('CLOSE WEBVIEW')
|
||||
.show()
|
||||
.onClick(function(){ webviewClose(); });
|
||||
.onClick(webviewClose);
|
||||
|
||||
function toggleMainButton(el) {
|
||||
var mainButton = Telegram.WebApp.MainButton;
|
||||
|
|
|
@ -54,11 +54,13 @@ var Cafe = {
|
|||
},
|
||||
eIncrClicked: function(e) {
|
||||
e.preventDefault();
|
||||
Telegram.WebApp.HapticFeedback.impactOccurred('light');
|
||||
var itemEl = $(this).parents('.js-item');
|
||||
Cafe.incrClicked(itemEl, 1);
|
||||
},
|
||||
eDecrClicked: function(e) {
|
||||
e.preventDefault();
|
||||
Telegram.WebApp.HapticFeedback.impactOccurred('light');
|
||||
var itemEl = $(this).parents('.js-item');
|
||||
Cafe.incrClicked(itemEl, -1);
|
||||
},
|
||||
|
@ -278,8 +280,10 @@ var Cafe = {
|
|||
if (status == 'paid') {
|
||||
Telegram.WebApp.close();
|
||||
} else if (status == 'failed') {
|
||||
Telegram.WebApp.HapticFeedback.notificationOccurred('error');
|
||||
Cafe.showStatus('Payment has been failed.');
|
||||
} else {
|
||||
Telegram.WebApp.HapticFeedback.notificationOccurred('warning');
|
||||
Cafe.showStatus('You have cancelled this order.');
|
||||
}
|
||||
});
|
||||
|
@ -288,6 +292,7 @@ var Cafe = {
|
|||
}
|
||||
}
|
||||
if (result.error) {
|
||||
Telegram.WebApp.HapticFeedback.notificationOccurred('error');
|
||||
Cafe.showStatus(result.error);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue