-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
49 lines (43 loc) · 1.56 KB
/
index.html
File metadata and controls
49 lines (43 loc) · 1.56 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
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#06b6d4" />
<title>MOD Player Pro</title>
<link rel="stylesheet" href="./index.css">
<link rel="manifest" href="./manifest.json">
</head>
<body class="bg-gray-900 text-gray-200">
<div id="root"></div>
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react@18.2.0",
"react-dom/client": "https://esm.sh/react-dom@18.2.0/client"
}
}
</script>
<script type="module" src="./index.tsx"></script>
<!--
Note: Define the libopenmpt configuration object BEFORE the script loads.
This prevents the script from overwriting our onRuntimeInitialized callback.
A promise is used to signal readiness to the React application.
-->
<script>
window.libopenmptReady = new Promise((resolve, reject) => {
window.libopenmpt = {
onRuntimeInitialized: function () {
console.log('libopenmpt runtime initialized via pre-load script.');
// 'this' is the fully initialized module object.
resolve(this);
}
};
// Expose reject for script error handling
window._libopenmptReject = reject;
});
</script>
<script charset="utf-8" src="https://wasm.noahcohn.com/libmpt/libopenmptjs.js"
onerror="window._libopenmptReject && window._libopenmptReject(new Error('Failed to load libopenmpt script from CDN'))"></script>
</body>
</html>