mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
These variables were intended to be globals declare in the global namespace. That this ends up on the window object is an implementation detail of JavaScript. Remove the window. prefix put in front of staticRoot and webRoot and include the global declaration in the TypeScript module.
39 lines
1.0 KiB
HTML
39 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="theme-color" content="#2a2a2a" />
|
|
<title>__CLUSTER_NAME__</title>
|
|
<style>
|
|
html {
|
|
color: #fff;
|
|
background-color: #000;
|
|
}
|
|
|
|
#bootstrap-msg {
|
|
font: 20px serif;
|
|
color: #aaa;
|
|
margin: auto;
|
|
margin-top: 1em;
|
|
width: fit-content;
|
|
}
|
|
</style>
|
|
<script>
|
|
webRoot = new URL("__WEB_ROOT__", document.location).pathname;
|
|
staticRoot = new URL("__STATIC_ROOT__", document.location).pathname;
|
|
function scriptError() {
|
|
let bootstrapMsg = document.getElementById("bootstrap-msg");
|
|
bootstrapMsg.textContent = "Error loading main bundle, see web console for details.";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
<div id="root">
|
|
<div id="bootstrap-msg">Loading web interface...</div>
|
|
</div>
|
|
<script src="__STATIC_ROOT____MAIN_BUNDLE__" defer onerror="scriptError()"></script>
|
|
</body>
|
|
</html>
|