| <!DOCTYPE html> |
| <html lang="ru"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>У Гарика - приложение</title> |
| <link rel="manifest" href="/manifest.json"> |
| <link rel="stylesheet" href="style.css"> |
| <link rel="apple-touch-icon" href="/icon.png"> |
| <meta name="apple-mobile-web-app-capable" content="yes"> |
| <meta name="apple-mobile-web-app-status-bar-style" content="default"> |
| <link rel="icon" type="image/png" sizes="192x192" href="/icon.png"> |
| <link rel="icon" href="icon.png" type="image/png"> |
| <meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" /> |
| <meta name="description" content=" "> |
| </head> |
| <body> |
| <iframe |
| src="https://metastore-full.hf.space/633275/catalog?mode=online&staff_id=" |
| frameborder="0" |
| allowfullscreen |
| allow="cross-origin-isolated; cookies"></iframe> |
|
|
| |
| <button id="installButton" style="display: none;">Установить приложение</button> |
|
|
| <script> |
| let deferredPrompt; |
| const installButton = document.getElementById('installButton'); |
| |
| |
| window.addEventListener('beforeinstallprompt', (event) => { |
| event.preventDefault(); |
| deferredPrompt = event; |
| installButton.style.display = 'block'; |
| installButton.classList.add('pulse-animation'); |
| }); |
| |
| |
| installButton.addEventListener('click', async () => { |
| if (deferredPrompt) { |
| deferredPrompt.prompt(); |
| const { outcome } = await deferredPrompt.userChoice; |
| if (outcome === 'accepted') { |
| console.log('Пользователь принял запрос на установку'); |
| } else { |
| console.log('Пользователь отклонил запрос на установку'); |
| } |
| deferredPrompt = null; |
| installButton.style.display = 'none'; |
| installButton.classList.remove('pulse-animation'); |
| } |
| }); |
| |
| |
| window.addEventListener('appinstalled', () => { |
| console.log('Приложение успешно установлено'); |
| installButton.style.display = 'none'; |
| installButton.classList.remove('pulse-animation'); |
| deferredPrompt = null; |
| }); |
| |
| |
| if ('serviceWorker' in navigator) { |
| window.addEventListener('load', () => { |
| navigator.serviceWorker.register('/service-worker.js') |
| .then((registration) => { |
| console.log('Сервисный рабочий процесс зарегистрирован:', registration); |
| }) |
| .catch((error) => { |
| console.log('Ошибка регистрации сервисного рабочего процесса:', error); |
| }); |
| }); |
| } |
| |
| |
| window.addEventListener('error', (event) => { |
| console.error('Произошла ошибка:', event.message, event.filename, event.lineno); |
| }); |
| </script> |
| </body> |
| </html> |