mirror of
https://github.com/linuxserver/emulatorjs.git
synced 2026-01-24 00:21:52 +08:00
add a beforeunload event to exiting the game launcher to ensure srm files are generated
This commit is contained in:
parent
2880a36a3e
commit
fbf5bc62e6
@ -140,9 +140,10 @@ function launch(active_item) {
|
||||
}
|
||||
}, 100);
|
||||
// Reload window if user clicks back
|
||||
$(window).on('hashchange', function() {
|
||||
$(window).on('hashchange', async function() {
|
||||
if (window.location.hash !== '#game') {
|
||||
window.location.reload();
|
||||
window.dispatchEvent(new Event('beforeunload'));
|
||||
setTimeout(function(){window.location.reload();}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "emulatorjs",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "Rom and art management utility for generating configuration files for use with the EmulatorJS frontend",
|
||||
"main": "index.js",
|
||||
"author": "thelamer",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user