catch global error and display on top of page

This commit is contained in:
Gabe Yuan
2023-08-27 16:45:57 +08:00
parent e1d74aae6a
commit d84594da96
2 changed files with 2 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ const init = async () => {
await init();
} catch (err) {
const $err = document.createElement("div");
$err.innerText = `KISS-Translator Error: ${err.message}`;
$err.innerText = `KISS-Translator: ${err.message}`;
$err.style.cssText = "background:red; color:#fff; z-index:10000;";
document.body.prepend($err);
}