forked from 2dos/DK64-Randomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (50 loc) · 1.33 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
<link href="./static/img/dk.png" rel="icon" />
<meta Http-Equiv="Cache-Control" Content="no-cache">
<meta Http-Equiv="Pragma" Content="no-cache">
<meta Http-Equiv="Expires" Content="0">
<meta Http-Equiv="Pragma-directive: no-cache">
<meta Http-Equiv="Cache-directive: no-cache">
<img style="
width: 20%;
height: 20%;
margin: 0;
position: absolute;
top: 50%;
left: 40%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
" src="./static/img/loading-icon-black.svg" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="./static/js/pyodide/pyodide.js"></script>
<script>
var pyodide;
var jquery = $;
async function load_inital() {
try {
pyodide = await loadPyodide();
} catch { }
await pyodide.loadPackage("jinja2");
await pyodide.loadPackage("micropip");
ui_script = await (await fetch("generate_ui.py")).text();
await pyodide.runPythonAsync(ui_script);
}
window.onload = load_delay;
function load_delay() {
// Delay a section so the page scripts can load
setTimeout(function () {
load_inital();
}, 1000);
}
function getFile(file) {
return $.ajax({
type: "GET",
url: file,
async: false
}).responseText;
}
</script>
<style>
body {
background: #222222;
}
</style>