From 209356b8ade1920b50d1d3a1a5e121c6623d167b Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 11 Nov 2022 23:47:49 +0100 Subject: Update --- app/bits/static/error.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 app/bits/static/error.js (limited to 'app/bits/static/error.js') diff --git a/app/bits/static/error.js b/app/bits/static/error.js new file mode 100755 index 0000000..d16ae0b --- /dev/null +++ b/app/bits/static/error.js @@ -0,0 +1,9 @@ +window.onerror = (event, source, lineno, colno, error) => { + if (error.message === "FocusTrap: Element must have at least one focusable child.") return; + if (appLoading) { + document.getElementById("loadfailure").style.display = ""; + } else { + document.getElementById("error").style.display = "block"; + document.getElementById("error").innerText = error.stack; + } +} \ No newline at end of file -- cgit