Add JavaScript disabled message and error handling to app div
This commit is contained in:
@@ -10,7 +10,14 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="app">
|
||||
<noscript>
|
||||
<div class="noscript">
|
||||
<h1>JavaScript is disabled</h1>
|
||||
<p>Please enable JavaScript to use this website.</p>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,14 +6,20 @@ import { initHotkey } from "./ts/hotkey";
|
||||
import { polyfill } from "./ts/polyfill";
|
||||
import { watchParamButton } from "./ts/plugins/embedscript";
|
||||
|
||||
let app: App;
|
||||
try {
|
||||
polyfill()
|
||||
|
||||
const app = new App({
|
||||
app = new App({
|
||||
target: document.getElementById("app"),
|
||||
});
|
||||
|
||||
loadData()
|
||||
initHotkey()
|
||||
watchParamButton()
|
||||
} catch (error) {
|
||||
console.error(error, error.stack)
|
||||
alert(error)
|
||||
}
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user