-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
99 lines (84 loc) · 3.32 KB
/
Copy pathindex.html
File metadata and controls
99 lines (84 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bioglass</title>
<!-- ONNX и OpenCV -->
<script src="https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.min.js"></script>
<script src="js/opencv.js"></script>
<!-- CSS -->
<link rel="stylesheet" href="css/style.css">
<!-- PWA Manifest -->
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#000000">
<!-- Favicon и SEO -->
<link rel="icon" href="logo.png" sizes="512x512" type="image/png">
<meta name="description" content="Bioglass — Offline object detection website using AI.">
<meta name="keywords" content="Bioglass, object detection, AI, offline, PWA, camera, YOLO, Mask RCNN">
<meta name="author" content="Mavox-ID">
<meta property="og:title" content="Bioglass — Offline Object Detection">
<meta property="og:description" content="Offline website for AI object recognition using your camera.">
<meta property="og:image" content="logo.png">
<meta property="og:type" content="website">
</head>
<body>
<header id="header">
<img src="logo.png" alt="Bioglass Logo" class="logo">
<h1>Bioglass</h1>
<p>Created by <code>Mavox-ID</code></p>
<button id="installButton">Download offline version</button>
</header>
<main>
<div class="content">
<video id="video" autoplay playsinline muted></video>
<canvas id="canvas" width="416" height="416"></canvas>
</div>
<div class="controls">
<button id="runInference">Run Inference</button>
<button id="stopInference">Stop Inference</button>
</div>
</main>
<footer>
<p>© 19.10.2025 <code>Mavox-ID</code> (Bioglass; AI object scanner) | <code>V25.05</code> | <code>All rights reserved</code></p>
</footer>
<script src="js/main.js"></script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js')
.then(() => console.log('Service Worker registered!'))
.catch((err) => console.log(err));
}
</script>
<script>
let deferredPrompt;
const installButton = document.getElementById('installButton');
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredPrompt = e;
installButton.style.display = 'block';
});
installButton.addEventListener('click', async () => {
if (deferredPrompt) {
deferredPrompt.prompt();
const choiceResult = await deferredPrompt.userChoice;
if (choiceResult.outcome === 'accepted') {
console.log('PWA installed ✅ - download v.1');
installButton.style.display = 'none';
localStorage.setItem('pwaInstalled', 'true');
} else {
console.log('Canceled ❌ - download PWA v.1');
}
deferredPrompt = null;
}
});
window.addEventListener('appinstalled', () => {
installButton.style.display = 'none';
localStorage.setItem('pwaInstalled', 'true');
});
if (localStorage.getItem('pwaInstalled') === 'true') {
installButton.style.display = 'none';
}
</script>
</body>
</html>