-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
39 lines (39 loc) · 1.27 KB
/
Copy pathindex.html
File metadata and controls
39 lines (39 loc) · 1.27 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<link
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.38.0/min/vs/loader.min.js"
rel="preload"
as="script"></link>
<script>
let isMonacoLoaded = false;
async function loadMonaco() {
if(isMonacoLoaded) return Promise.resolve();
return new Promise((resolve) => {
const script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.38.0/min/vs/loader.min.js';
script.onload = () => {
isMonacoLoaded = true;
require.config({
paths: {
vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.38.0/min/vs/'
}
});
require(['vs/editor/editor.main'], function () {});
resolve();
};
document.head.appendChild(script);
})
}
if (window.marked) window.Al = window.marked;
// window.qrcode = QRCode;
</script>
</body>
</html>