-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLegacySnap.html
130 lines (115 loc) · 4.32 KB
/
LegacySnap.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- iOS meta tags and icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="BirdBrain PWA">
<link rel="apple-touch-icon" href="img/icon_legacy_152x152.png">
<!-- PWA manifest -->
<link rel="manifest" href="manifest-legacysnap.json">
<!-- PWA info -->
<meta name="theme-color" content="#089BAB" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BirdBrain Legacy Snap!</title>
<meta name="description" content="A Web App from BirdBrain Technologies. Use Snap! to program your Finch Robot or Hummingbird Robotics Kit.">
<script src="js/jquery.js" ></script>
<link href="fontawesome/css/all.min.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="css/fonts.css" rel="stylesheet" type="text/css">
<link href="css/custom.css" rel="stylesheet" type="text/css">
<!-- <link href="css/chromebook.css" rel="stylesheet" type="text/css"> -->
<link rel="icon" type="image/png" href="img/icon_legacy_32x32.png">
</head>
<body>
<header id="main-header">
<div class="row">
<div id=programmingLang>
</div>
<div class="col-xs-12">
<div class="col-xs-4 text-right">
<img id="hummingbird-logo" class="logo-legacy" src="img/hummingbirdDuo.png" alt="hummingbird" />
</div>
<div class="col-xs-4">
<img id="bbt-logo" class="logo-legacy" src="img/birdbrain-logo-h.png" alt="BirdBrain Technologies LLC" />
</div>
<div class="col-xs-4 text-left">
<img id="finch-logo" class="logo-legacy" src="img/originalFinch.png" alt="finch" />
</div>
</div>
<div id="indicators">
<div id="indicator-wifi" class="fa-stack /*indicator-on*/">
<i class="icon fas fa-fw fa-wifi fa-stack-2x"></i>
<i class="dot fas fa-circle fa-stack-1x"></i>
</div>
<div id="butInstall" class="fa-stack" aria-label="Install" hidden>
<a id="btn-install" class="btn btn-orange">
<i class="fas fa-download fa-lg"></i>
</a>
</div>
</div>
</div>
</header>
<section id="finder" style="display: block;">
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
<a id="find-button" class="btn btn-orange btn-lg" href="#">
<!-- <i class="fas fa-sync-alt /*fa-spin*/"></i> -->
<span id="findBtnText"> Find Robots</span>
</a>
</div>
<!-- for now, we must use the default popup. When the scanning api is ready we can use this again: https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md
<div class="col-xs-12">
<div id="robots-found" class="robot-list">
</div>
</div>-->
</div>
</div>
</section>
<section id="connected">
<div class="container">
</div>
</section>
<section id="connected-expanded" style="visibility:hidden">
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
<div id="btn-change-level" style="display: none; margin-bottom: 15px;"><a class="btn btn-lg btn-orange" ><b>Change Level</b></a></div>
</div>
</div>
<div class="row">
<div class="col-xs-12" id="snap-div">
<i id="ideLoading" class="dot dot-spin fas fa-sync-alt fa-spin fa-stack-2x"></i>
<!-- snap iframe will be added here -->
</div>
</div>
</div>
</section>
<!-- Include main code -->
<script>const useSnap=true;</script>
<script>var useHID=true;</script>
<script src="js/install.js"></script>
<script src="js/translations.js"></script>
<script src="js/messages.js"></script>
<script src="js/gui.js"></script>
<script src="js/hidRobot.js"></script>
<script src="js/hid.js"></script>
<script>
// Register service worker.
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('service-worker-legacysnap.js', {
updateViaCache: 'none'
}).then((reg) => {
console.log('Service worker registered.', reg);
}).catch(error => {
console.error("Error registering service worker: " + error.message);
});
onLoad();
});
}
</script>
</body>
</html>