mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: unblock page rendering when Telegram CDN is unavailable
- Google Fonts: non-render-blocking via media="print" onload trick - telegram-web-app.js: load only inside Telegram environment - Telegram SDK init: skip entirely outside Telegram - Script load timeout: 8000ms → 2000ms for faster deep link fallback - Email login form: expanded by default (80% of registrations)
This commit is contained in:
23
index.html
23
index.html
@@ -18,8 +18,29 @@
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
media="print"
|
||||
onload="this.media='all'"
|
||||
/>
|
||||
<script src="https://telegram.org/js/telegram-web-app.js" async></script>
|
||||
<noscript>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</noscript>
|
||||
<script>
|
||||
// Load Telegram Web App script only inside Telegram environment
|
||||
(function() {
|
||||
var isTelegram = window.TelegramWebviewProxy ||
|
||||
location.hash.indexOf('tgWebApp') !== -1 ||
|
||||
location.search.indexOf('tgWebApp') !== -1;
|
||||
if (isTelegram) {
|
||||
var s = document.createElement('script');
|
||||
s.src = 'https://telegram.org/js/telegram-web-app.js';
|
||||
s.async = true;
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #0a0f1a;
|
||||
|
||||
Reference in New Issue
Block a user