Added language provider, fixed race condition on emulator

This commit is contained in:
2025-03-16 18:24:20 -05:00
parent 60db15e932
commit 85615121b2
8 changed files with 98 additions and 12 deletions

View File

@ -34,6 +34,10 @@
<script type="text/javascript" language="javascript">
let scriptElement = null;
let initInterval = setInterval(() => {
send({ message: 'iframe_loaded' });
}, 500);
EJS_player = "#game";
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/";
EJS_language = "en-US";
@ -77,6 +81,8 @@
scriptElement = document.createElement('script');
scriptElement.src = 'https://cdn.emulatorjs.org/stable/data/loader.js';
document.body.appendChild(scriptElement);
clearInterval(initInterval);
}
const send = data => {
@ -145,7 +151,7 @@
EJS_onGameStart = () => {
send({ message: 'start' });
}
}
</script>
</body>
</html>