forked from espruino/EspruinoWebIDE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
279 lines (243 loc) · 12.9 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html>
<html><!-- index for ws.js or totally online Web IDE -->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Web Serial Origin Trial - www.espruino.com -->
<meta http-equiv="origin-trial" content="AjRdPA+O3VUML2r8/U0gIUmgBgZLDktY1Kypa8hjMesuKpbfYhXRrWHgjGp7f2Yd5sM36E4+TZdkSHewx27wOgUAAABQeyJvcmlnaW4iOiJodHRwczovL3d3dy5lc3BydWluby5jb206NDQzIiwiZmVhdHVyZSI6IlNlcmlhbCIsImV4cGlyeSI6MTU4OTM1NzgxNn0=">
<link rel="icon" href="favicon.ico">
<link rel="manifest" href="webapp_manifest.json">
<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.1.custom.css" />
<link rel="stylesheet" href="css/libs/jquery.treeview.css" />
<link rel="stylesheet" href="js/libs/codemirror/codemirror.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/dialog/dialog.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/fold/foldgutter.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/hint/show-hint.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/lint/lint.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/search/matchesonscrollbar.css" />
<link rel="stylesheet" href="js/libs/codemirror/addon/tern/tern.css" />
<link rel="stylesheet" href="js/libs/splitster/splitster.css" />
<link rel="stylesheet" href="js/libs/toastr/toastr.css" />
<link rel="stylesheet" href="js/libs/guiders/guiders.css" />
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/typography.css" />
<link rel="stylesheet" href="css/abstracts.css" />
<link rel="stylesheet" href="css/components.css" />
<link rel="stylesheet" href="css/icons.css" />
<script>
// Force HTTPS - needed for web bluetooth
var l = window.location.toString();
if (l.substr(0,7)=="http://" && !window.location.port)
window.location = "https://"+l.substr(7);
</script>
<title>Espruino Web IDE</title>
</head>
<body>
<div class="window window--app">
<!-- Title Bar -->
<div class="window__title-bar title-bar" style="-webkit-app-region: drag">
<h5 class="title-bar__title">Espruino Web IDE</h5>
<div class="title-bar__buttons"></div>
</div>
<!-- Viewport -->
<div class="window__viewport">
<!-- Toolbar -->
<div class="toolbar">
<div class="h-split">
<div class="h-split__left toolbar__buttons toolbar__buttons--left"></div>
<div class="h-split__right toolbar__buttons toolbar__buttons--right"></div>
</div>
</div>
<!-- Splitter -->
<div class="split-pane">
<div class="split-pane__left">
<div class="split-pane__loading">LOADING ...</div>
<div class="editor editor--terminal">
<div class="sidebar editor__sidebar">
<div class="v-split">
<div class="v-split__top sidebar__buttons sidebar__buttons--top"></div>
<div class="v-split__bottom sidebar__buttons sidebar__buttons--bottom"></div>
</div>
</div>
<div class="canvas editor__canvas editor__canvas__terminal"></div>
</div>
</div>
<div class="split-pane__right">
<div class="editor editor--code">
<div class="sidebar editor__sidebar">
<div class="v-split">
<div class="v-split__top sidebar__buttons sidebar__buttons--top"></div>
<div class="v-split__bottom sidebar__buttons sidebar__buttons--bottom"></div>
</div>
</div>
<div class="canvas editor__canvas"></div>
</div>
</div>
</div>
<!-- Status -->
<div class="status">
<div class="h-split">
<div class="h-split__left status__left"></div>
<div class="h-split__right status__right"></div>
</div>
</div>
</div>
<script src="js/libs/jquery-1.11.0.js"></script>
<script src="js/libs/jquery-ui-1.10.1.custom.js"></script>
<script src="js/libs/jquery.ui.touch-punch.min.js"></script>
<script src="js/libs/jquery.treeview.js"></script>
<script src="js/libs/jquery.sparkline.min.js"></script>
<script src="js/libs/splitster/splitster.js"></script>
<script src="js/libs/toastr/toastr.min.js"></script>
<script src="js/libs/guiders/guiders.js"></script>
<script src="js/libs/flot/jquery.flot.js"></script>
<script src="js/libs/flot/jquery.flot.time.js"></script>
<script src="js/libs/jcanvas/jcanvas.min.js"></script>
<script src="js/libs/jszip.min.js"></script>
<script src="js/libs/codemirror/codemirror.js"></script>
<script src="js/libs/codemirror/javascript.js"></script>
<script src="js/libs/codemirror/jshint.js"></script>
<script src="js/libs/codemirror/beautify.js"></script>
<script src="js/libs/codemirror/addon/dialog/dialog.js"></script>
<script src="js/libs/codemirror/addon/edit/closebrackets.js"></script>
<script src="js/libs/codemirror/addon/edit/trailingspace.js"></script>
<script src="js/libs/codemirror/addon/fold/brace-fold.js"></script>
<script src="js/libs/codemirror/addon/fold/comment-fold.js"></script>
<script src="js/libs/codemirror/addon/fold/foldcode.js"></script>
<script src="js/libs/codemirror/addon/fold/foldgutter.js"></script>
<script src="js/libs/codemirror/addon/fold/indent-fold.js"></script>
<script src="js/libs/codemirror/addon/hint/javascript-hint.js"></script>
<script src="js/libs/codemirror/addon/hint/show-hint.js"></script>
<script src="js/libs/codemirror/addon/lint/lint.js"></script>
<script src="js/libs/codemirror/addon/lint/javascript-lint.js"></script>
<script src="js/libs/codemirror/addon/scroll/annotatescrollbar.js"></script>
<script src="js/libs/codemirror/addon/search/jump-to-line.js"></script>
<script src="js/libs/codemirror/addon/search/matchesonscrollbar.js"></script>
<script src="js/libs/codemirror/addon/search/match-highlighter.js"></script>
<script src="js/libs/codemirror/addon/search/search.js"></script>
<script src="js/libs/codemirror/addon/search/searchcursor.js"></script>
<script src="js/libs/codemirror/addon/selection/active-line.js"></script>
<script src="js/libs/codemirror/addon/selection/mark-selection.js"></script>
<script src="js/libs/codemirror/addon/selection/selection-pointer.js"></script>
<script src="js/libs/codemirror/addon/tern/tern.js"></script>
<script src="js/libs/codemirror/keymap/emacs.js"></script>
<script src="js/libs/codemirror/keymap/sublime.js"></script>
<script src="js/libs/codemirror/keymap/vim.js"></script>
<script src="js/libs/acorn/acorn.js"></script>
<script src="js/libs/acorn/acorn_loose.js"></script>
<script src="js/libs/acorn/walk.js"></script>
<script src="js/libs/acorn/signal.js"></script>
<script src="js/libs/acorn/tern.js"></script>
<script src="js/libs/acorn/def.js"></script>
<script src="js/libs/acorn/comment.js"></script>
<script src="js/libs/acorn/infer.js"></script>
<script src="js/libs/acorn/doc_comment.js"></script>
<script src="EspruinoTools/espruino.js"></script>
<!-- load console here, so we get any messages while loading -->
<script src="js/core/settingsConsole.js"></script>
<script src="EspruinoTools/core/utils.js"></script>
<script src="EspruinoTools/core/config.js"></script>
<script src="js/core/html.js"></script>
<script src="js/core/notifications.js"></script>
<script src="js/core/status.js"></script>
<script src="js/core/app.js"></script>
<script src="js/core/file.js"></script>
<script src="EspruinoTools/core/serial.js"></script>
<!-- SERIAL_INTERFACES -->
<script src="EspruinoTools/core/serial_chrome_serial.js"></script>
<script src="EspruinoTools/core/serial_chrome_socket.js"></script>
<script src="EspruinoTools/core/serial_node_serial.js"></script> <!-- Electron / nw.js -->
<script src="EspruinoTools/core/serial_web_audio.js"></script>
<script src="EspruinoTools/core/serial_web_bluetooth.js"></script>
<script src="EspruinoTools/core/serial_web_serial.js"></script>
<script src="EspruinoTools/core/serial_websocket_relay.js"></script>
<script src="EspruinoTools/core/serial_frame.js"></script>
<!-- WebRTC/Peer.js connection -->
<script src="js/libs/peerjs.min.js"></script>
<script src="js/libs/qrcode.min.js"></script>
<script src="EspruinoTools/libs/webrtc-connection.js"></script>
<script src="EspruinoTools/core/serial_webrtc.js"></script>
<script src="EspruinoTools/core/terminal.js"></script>
<script src="EspruinoTools/core/codeWriter.js"></script>
<script src="EspruinoTools/core/modules.js"></script>
<script src="EspruinoTools/core/env.js"></script>
<script src="EspruinoTools/core/flasher.js"></script>
<script src="EspruinoTools/core/flasherESP8266.js"></script>
<script src="js/libs/secure-dfu.js"></script>
<script src="js/core/editorBlockly.js"></script>
<script src="js/core/editorJavaScript.js"></script>
<script src="js/core/send.js"></script>
<!-- Popup Windows -->
<script src="js/core/menuPortSelector.js"></script>
<script src="js/core/menuSettings.js"></script>
<script src="js/core/menuFlasher.js"></script>
<!-- Special pages in Settings Window -->
<script src="js/core/settingsAbout.js"></script>
<script src="js/core/settingsFlasher.js"></script>
<!-- Non-vital Plugins -->
<script src="EspruinoTools/plugins/boardJSON.js"></script>
<script src="EspruinoTools/plugins/versionChecker.js"></script>
<script src="EspruinoTools/plugins/compiler.js"></script>
<script src="EspruinoTools/plugins/assembler.js"></script>
<script src="EspruinoTools/plugins/getGitHub.js"></script>
<script src="EspruinoTools/libs/utf8.js"></script> <!-- needed for unicode -->
<script src="EspruinoTools/plugins/unicode.js"></script>
<script src="EspruinoTools/libs/esprima/esprima.js"></script> <!-- needed for minify -->
<script src="EspruinoTools/libs/esprima/esmangle.js"></script> <!-- needed for minify -->
<script src="EspruinoTools/libs/esprima/escodegen.js"></script> <!-- needed for minify -->
<script src="EspruinoTools/plugins/minify.js"></script>
<script src="EspruinoTools/plugins/pretokenise.js"></script> <!-- This should come before saveOnSend -->
<script src="EspruinoTools/plugins/saveOnSend.js"></script> <!-- This should come after minify -->
<script src="EspruinoTools/plugins/setTime.js"></script> <!-- This should come after save on send -->
<script src="js/plugins/tutorial.js"></script>
<script src="js/plugins/webcam.js"></script>
<script src="js/plugins/fontSize.js"></script>
<script src="js/plugins/uiMode.js"></script>
<script src="js/plugins/urlHandler.js"></script>
<!-- js/plugins/fileReload.js BROKEN -->
<script src="js/plugins/codeLink.js"></script>
<script src="js/plugins/testing.js"></script>
<script src="js/plugins/notification_sound.js"></script>
<script src="js/plugins/tern.js"></script> <!-- smart autocomplete -->
<script src="js/plugins/debugger.js"></script>
<script src="js/plugins/tour.js"></script>
<script src="js/plugins/settingsProfile.js"></script>
<script src="js/plugins/helpLinks.js"></script>
<script src="js/plugins/arrows.js"></script>
<script src="js/plugins/offline.js"></script>
<script src="js/plugins/storage.js"></script>
<script src="js/libs/imageconverter.js"></script> <!-- for storage.js -->
<script src="js/plugins/emulator.js"></script>
<script src="js/plugins/keyShortcuts.js"></script>
<script src="js/plugins/terminalLogger.js"></script>
<!-- js/plugins/_examplePlugin.js -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46537227-2', 'auto');
ga('send', 'pageview');
// register service worker on known origins
if (window.location.origin == "https://www.espruino.com") {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('serviceworker.js').then(function(reg) {
if(reg.installing) {
console.log('serviceworker> installing');
} else if(reg.waiting) {
console.log('serviceworker> installed');
} else if(reg.active) {
console.log('serviceworker> active');
}
}).catch(function(error) {
console.log('serviceworker> registration failed with ' + error);
});
}
}
</script>
</body>
</html>