diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-05 17:21:23 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-05 17:21:23 +0200 |
commit | d5a620cf09b835db2bccd99556525c90b458719f (patch) | |
tree | 1507f96be0413bd20026878890b0c1ad438e51d2 /views/script/core_crash.js | |
parent | 44210691ee8444509ac466a362337af77f2bcd49 (diff) | |
download | kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.gz kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.bz2 kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.zip |
i18n for 21.08
Diffstat (limited to 'views/script/core_crash.js')
-rw-r--r-- | views/script/core_crash.js | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/views/script/core_crash.js b/views/script/core_crash.js index d24ec2d..1a12230 100644 --- a/views/script/core_crash.js +++ b/views/script/core_crash.js @@ -1,21 +1,21 @@ -global.gameCrashed = false; -crashSound = new Audio("./sfx/gamecrash.wav"); - -function destroy() { - global.gameCrashed = true; - crashSound.play(); - require('@electron/remote').webContents.fromId(webview.getWebContentsId()).forcefullyCrashRenderer(); - try { musicElement.pause(); } catch (e) {} -} - -function spawnError(crashReport) { - document.getElementById("error-outer").style.display = "flex"; - document.getElementById("crash-dump").value = crashReport; - destroy(); -} - -const crashHandler = require('electron').ipcRenderer; - -crashHandler.on('crashreport', (event, args) => { - spawnError(args); +global.gameCrashed = false;
+crashSound = new Audio("./sfx/gamecrash.wav");
+
+function destroy() {
+ global.gameCrashed = true;
+ crashSound.play();
+ require('@electron/remote').webContents.fromId(webview.getWebContentsId()).forcefullyCrashRenderer();
+ try { musicElement.pause(); } catch (e) {}
+}
+
+function spawnError(crashReport) {
+ document.getElementById("error-outer").style.display = "flex";
+ document.getElementById("crash-dump").value = crashReport;
+ destroy();
+}
+
+const crashHandler = require('electron').ipcRenderer;
+
+crashHandler.on('crashreport', (event, args) => {
+ spawnError(args);
})
\ No newline at end of file |