-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (31 loc) · 1.13 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Custom Vision Demo!</title>
<link rel="stylesheet" href="styles.css">
<script defer src="canvas.js"></script>
<script defer src="main.js"></script>
<link rel="manifest" href="manifest.json" />
<script>
//This is the service worker with the Cache-first network
//Add this below content to your HTML page, or add the js file to your page at the very top to register service worker
if (navigator.serviceWorker.controller) {
console.log('[PWA Builder] active service worker found, no need to register')
} else {
//Register the ServiceWorker
navigator.serviceWorker.register('pwabuilder-sw.js', {
scope: './'
}).then(function (reg) {
console.log('Service worker has been registered for scope:' + reg.scope);
});
}
</script>
</head>
<body>
<h1>Custom Vision Demo</h1>
<canvas id="drawSurface" width="400" height="400"></canvas>
<p id="emoji"></p>
<button class="btn">Analyze</button>
</body>
</html>