mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-26 06:20:27 +01:00
Update content of files
This commit is contained in:
parent
719d02940c
commit
1bfe1f41dc
31 changed files with 131 additions and 82 deletions
|
@ -198,9 +198,9 @@
|
|||
<script src="/js/main-aj.js?57"></script>
|
||||
<script src="/js/contest.js?25"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>ajInit({"version":387,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":388,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">Aj._useScrollHack=true;
|
||||
Aj.onLoad(function(state) {
|
||||
function requestConfirmation(event) {
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitRetinaVideos();
|
||||
mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":3,"unsupportedURL":"\/?notgs=1"});
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitRetinaVideos();
|
||||
mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":3,"unsupportedURL":"\/?notgs=1"});
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -285,7 +285,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -283,7 +283,7 @@ This way you can quickly see how to [start a Secret Chat](/) on iOS or show one
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -298,7 +298,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -250,7 +250,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -305,7 +305,7 @@ you can also download our Android app directly from [telegram.org](https://teleg
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -264,7 +264,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -301,7 +301,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -286,7 +286,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -329,7 +329,7 @@ TEST
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -220,7 +220,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":4});
|
||||
initScrollVideos(true);
|
||||
|
|
|
@ -50,13 +50,9 @@
|
|||
window.Telegram.WebApp.MainButton.setParams({});
|
||||
}
|
||||
}
|
||||
|
||||
document.write('<style>#tg-fixed-container{position:fixed;left:0;right:0;top:0;transform:translateY(100vh)}</style>');
|
||||
|
||||
function onViewportChanged(eventType, eventData) {
|
||||
var el = document.getElementById('tg-fixed-container');
|
||||
if (el && eventData.height) {
|
||||
el.style.transform = 'translateY(' + eventData.height + 'px)';
|
||||
if (eventData.height) {
|
||||
setViewportHeight(eventData.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,25 +188,47 @@
|
|||
eventHandlers[eventType].splice(index, 1);
|
||||
};
|
||||
|
||||
function setCssProperty(name, value) {
|
||||
var root = document.documentElement;
|
||||
if (root && root.style && root.style.setProperty) {
|
||||
root.style.setProperty('--tg-' + name, value);
|
||||
}
|
||||
}
|
||||
|
||||
var themeParams = {};
|
||||
function setThemeParams(theme_params) {
|
||||
var root = document.documentElement, color;
|
||||
if (root && root.style && root.style.setProperty) {
|
||||
for (var key in theme_params) {
|
||||
if (color = parseColorToHex(theme_params[key])) {
|
||||
themeParams[key] = color;
|
||||
if (key == 'bg_color') {
|
||||
var color_scheme = isColorDark(color) ? 'dark' : 'light'
|
||||
themeParams.color_scheme = color_scheme;
|
||||
root.style.setProperty('--tg-theme-color-scheme', color_scheme);
|
||||
}
|
||||
key = '--tg-theme-' + key.split('_').join('-');
|
||||
root.style.setProperty(key, color);
|
||||
var color;
|
||||
for (var key in theme_params) {
|
||||
if (color = parseColorToHex(theme_params[key])) {
|
||||
themeParams[key] = color;
|
||||
if (key == 'bg_color') {
|
||||
var color_scheme = isColorDark(color) ? 'dark' : 'light'
|
||||
themeParams.color_scheme = color_scheme;
|
||||
setCssProperty('theme-color-scheme', color_scheme);
|
||||
}
|
||||
key = 'theme-' + key.split('_').join('-');
|
||||
setCssProperty(key, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var viewportHeight = false;
|
||||
function setViewportHeight(height) {
|
||||
if (typeof height !== 'undefined') {
|
||||
viewportHeight = height;
|
||||
}
|
||||
var css_height;
|
||||
if (viewportHeight !== false) {
|
||||
css_height = (viewportHeight - mainButtonHeight) + 'px';
|
||||
} else if (mainButtonHeight) {
|
||||
css_height = 'calc(100vh - ' + mainButtonHeight + 'px)';
|
||||
} else {
|
||||
css_height = '100vh';
|
||||
}
|
||||
setCssProperty('viewport-height', css_height);
|
||||
}
|
||||
|
||||
|
||||
function parseColorToHex(color) {
|
||||
color += '';
|
||||
var match;
|
||||
|
@ -260,6 +278,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
var mainButtonHeight = 0;
|
||||
var MainButton = (function() {
|
||||
var isVisible = false;
|
||||
var isActive = true;
|
||||
|
@ -302,7 +321,7 @@
|
|||
|
||||
onEvent('main_button_pressed', onMainButtonPressed);
|
||||
|
||||
var debugBtn = null, debugBodyBottom, debugBtnStyle = {};
|
||||
var debugBtn = null, debugBtnStyle = {};
|
||||
if (initParams.tgWebAppDebug) {
|
||||
debugBtn = document.createElement('tg-main-button');
|
||||
debugBtnStyle = {
|
||||
|
@ -328,8 +347,6 @@
|
|||
document.addEventListener('DOMContentLoaded', function onDomLoaded(event) {
|
||||
document.removeEventListener('DOMContentLoaded', onDomLoaded);
|
||||
document.body.appendChild(debugBtn);
|
||||
debugBodyBottom = window.getComputedStyle ? window.getComputedStyle(document.body).marginBottom : document.body.style.marginBottom;
|
||||
debugBodyBottom = parseInt(debugBodyBottom) || 0;
|
||||
debugBtn.addEventListener('click', onMainButtonPressed, false);
|
||||
});
|
||||
}
|
||||
|
@ -361,11 +378,11 @@
|
|||
debugBtn.style.backgroundColor = color;
|
||||
debugBtn.style.color = text_color;
|
||||
|
||||
var fixedContainer = document.getElementById('tg-fixed-container');
|
||||
if (fixedContainer) {
|
||||
fixedContainer.style.top = isVisible ? '-48px' : '0';
|
||||
mainButtonHeight = (isVisible ? 48 : 0);
|
||||
if (document.documentElement) {
|
||||
document.documentElement.style.marginBottom = mainButtonHeight + 'px';
|
||||
}
|
||||
document.body.style.marginBottom = (debugBodyBottom + (isVisible ? 48 : 0)) + 'px';
|
||||
setViewportHeight();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -586,9 +603,10 @@
|
|||
if (webAppData.theme_params) {
|
||||
setThemeParams(webAppData.theme_params);
|
||||
}
|
||||
setViewportHeight();
|
||||
|
||||
onEvent('theme_changed', onThemeChanged);
|
||||
onEvent('viewport_changed', onViewportChanged);
|
||||
|
||||
postEvent('web_app_request_viewport');
|
||||
|
||||
// For Windows Phone app
|
||||
|
|
|
@ -199,6 +199,7 @@ var RLottie = (function () {
|
|||
curWorkerNum = 0;
|
||||
}
|
||||
rlPlayer.options = options;
|
||||
rlPlayer.isVisible = true;
|
||||
rlPlayer.paused = options.noAutoPlay || false;
|
||||
rlPlayer.forcePlayFrames = 0;
|
||||
rlPlayer.times = [];
|
||||
|
@ -225,6 +226,7 @@ var RLottie = (function () {
|
|||
var focused = window.isFocused ? isFocused() : document.hasFocus();
|
||||
if (!focused ||
|
||||
rlPlayer.paused ||
|
||||
!rlPlayer.isVisible ||
|
||||
!rlPlayer.frameCount) {
|
||||
return false;
|
||||
}
|
||||
|
@ -366,6 +368,12 @@ var RLottie = (function () {
|
|||
}
|
||||
}
|
||||
|
||||
rlottie.setVisible = function(el, visible) {
|
||||
if (el && el.rlPlayer) {
|
||||
el.rlPlayer.isVisible = visible;
|
||||
}
|
||||
}
|
||||
|
||||
rlottie.destroyWorkers = function() {
|
||||
destroyWorkers();
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitRetinaVideos();
|
||||
mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":3,"unsupportedURL":"\/?notgs=1"});
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?44"></script>
|
||||
<script src="/js/tgsticker.js?26"></script>
|
||||
<script src="/js/tgsticker.js?27"></script>
|
||||
|
||||
<script>mainInitRetinaVideos();
|
||||
mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":3,"unsupportedURL":"\/?notgs=1"});
|
||||
|
|
|
@ -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-webview.js?7"></script>
|
||||
<script src="https://tg.dev/js/telegram-webview.js?8"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = document.documentElement.style.getPropertyValue('--tg-theme-color-scheme');
|
||||
|
@ -17,7 +17,7 @@
|
|||
Telegram.WebView.onEvent('theme_changed', setThemeClass);
|
||||
setThemeClass();
|
||||
</script>
|
||||
<link href="/css/cafe.css?13" rel="stylesheet">
|
||||
<link href="/css/cafe.css?14" rel="stylesheet">
|
||||
</head>
|
||||
<body style="display:none">
|
||||
<section class="cafe-page cafe-items">
|
||||
|
@ -436,12 +436,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div id="tg-fixed-container">
|
||||
<div class="cafe-status-wrap">
|
||||
<div class="cafe-status js-status"></div>
|
||||
</div>
|
||||
<script src="https://tg.dev/js/jquery.min.js"></script>
|
||||
<script src="https://tg.dev/js/tgsticker.js?26"></script>
|
||||
<script src="/js/cafe.js?13"></script>
|
||||
<script src="https://tg.dev/js/tgsticker.js?27"></script>
|
||||
<script src="/js/cafe.js?14"></script>
|
||||
<script>Cafe.init({"apiUrl":"\/cafe\/api","userId":0,"userHash":null});</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'SF-Pro-Rounded';
|
||||
src: local('SF Pro Rounded Medium'),
|
||||
url('fonts/SF-Pro-Rounded-Medium.otf') format('opentype');
|
||||
font-weight: 500;
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'SF-Pro-Rounded';
|
||||
src: local('SF Pro Rounded Bold'),
|
||||
url('fonts/SF-Pro-Rounded-Bold.otf') format('opentype');
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'SF-Pro-Rounded', sans-serif;
|
||||
font-family: var(--default-font);
|
||||
font-size: 13px;
|
||||
line-height: 16px;
|
||||
font-weight: 500;
|
||||
|
@ -26,10 +11,12 @@ body {
|
|||
width: 1px;
|
||||
min-width: 100%;
|
||||
|
||||
--default-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
--block-bg-color: var(--tg-theme-bg-color);
|
||||
--bg-color: #ebedf0;
|
||||
--animation: .15s ease;
|
||||
--page-animation: .3s ease;
|
||||
--page-animation-duration: .3s;
|
||||
--page-animation: var(--page-animation-duration) ease;
|
||||
--status-height: 48px;
|
||||
--accent-color: #31b545;
|
||||
--main-color: #f8a917;
|
||||
|
@ -79,11 +66,12 @@ body.closed .cafe-page {
|
|||
max-width: 480px;
|
||||
justify-content: space-around;
|
||||
align-content: flex-end;
|
||||
transition: -webkit-filter var(--animation), max-height var(--page-animation);
|
||||
transition: max-height var(--page-animation), opacity var(--page-animation);
|
||||
background-color: var(--block-bg-color);
|
||||
}
|
||||
body.order-mode .cafe-items {
|
||||
max-height: 0 !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.cafe-items:after {
|
||||
content: '';
|
||||
|
@ -166,7 +154,7 @@ button {
|
|||
button,
|
||||
.cafe-item-counter {
|
||||
display: inline-block;
|
||||
font-family: 'SF-Pro-Rounded', sans-serif;
|
||||
font-family: var(--default-font);
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
|
@ -257,6 +245,13 @@ button,
|
|||
height: 14px;
|
||||
}
|
||||
|
||||
.cafe-status-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transform: translateY(var(--tg-viewport-height, 100vh));
|
||||
}
|
||||
.cafe-status {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
@ -287,8 +282,8 @@ button,
|
|||
}
|
||||
|
||||
.cafe-order-overview {
|
||||
display: none; /*temp*/
|
||||
font-family: 'SF-Pro-Rounded', sans-serif;
|
||||
display: none;
|
||||
font-family: var(--default-font);
|
||||
background-color: var(--bg-color);
|
||||
transition: opacity var(--page-animation);
|
||||
opacity: 0;
|
||||
|
@ -367,7 +362,7 @@ body.order-mode .cafe-order-overview {
|
|||
margin-top: 14px;
|
||||
}
|
||||
.cafe-text-field {
|
||||
font-family: 'SF-Pro-Rounded', sans-serif;
|
||||
font-family: var(--default-font);
|
||||
font-size: 17px;
|
||||
line-height: 21px;
|
||||
font-weight: 500;
|
||||
|
@ -404,7 +399,7 @@ body.order-mode .cafe-order-overview {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
.cafe-text-field-hint {
|
||||
font-family: 'SF-Pro-Rounded', sans-serif;
|
||||
font-family: var(--default-font);
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
font-weight: 500;
|
||||
|
|
|
@ -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-webview.js?7"></script>
|
||||
<script src="https://telegram.org/js/telegram-webview.js?8"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = document.documentElement.style.getPropertyValue('--tg-theme-color-scheme');
|
||||
|
|
|
@ -193,8 +193,25 @@ var Cafe = {
|
|||
},
|
||||
toggleMode: function(mode_order) {
|
||||
Cafe.modeOrder = mode_order;
|
||||
var anim_duration, match;
|
||||
try {
|
||||
anim_duration = window.getComputedStyle(document.body).getPropertyValue('--page-animation-duration');
|
||||
if (match = /([\d\.]+)(ms|s)/.exec(anim_duration)) {
|
||||
anim_duration = +match[1];
|
||||
if (match[2] == 's') {
|
||||
anim_duration *= 1000;
|
||||
}
|
||||
} else {
|
||||
anim_duration = 400;
|
||||
}
|
||||
} catch (e) {
|
||||
anim_duration = 400;
|
||||
}
|
||||
if (mode_order) {
|
||||
var height = $('.cafe-items').height();
|
||||
$('.js-item-lottie').each(function() {
|
||||
RLottie.setVisible(this, false);
|
||||
});
|
||||
$('.cafe-order-overview').show();
|
||||
$('.cafe-items').css('maxHeight', height).redraw();
|
||||
$('body').addClass('order-mode');
|
||||
|
@ -202,12 +219,23 @@ var Cafe = {
|
|||
autosize.update(this);
|
||||
});
|
||||
Telegram.WebApp.expand();
|
||||
setTimeout(function() {
|
||||
$('.js-item-lottie').each(function() {
|
||||
RLottie.setVisible(this, true);
|
||||
});
|
||||
}, anim_duration);
|
||||
} else {
|
||||
$('.js-item-lottie').each(function() {
|
||||
RLottie.setVisible(this, false);
|
||||
});
|
||||
$('body').removeClass('order-mode');
|
||||
setTimeout(function() {
|
||||
$('.cafe-items').css('maxHeight', '');
|
||||
$('.cafe-order-overview').hide();
|
||||
}, 400);
|
||||
$('.js-item-lottie').each(function() {
|
||||
RLottie.setVisible(this, true);
|
||||
});
|
||||
}, anim_duration);
|
||||
}
|
||||
Cafe.updateMainButton();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue