This commit is contained in:
Ethan O'Brien 2023-07-01 14:06:16 -05:00
parent 06aa2ffa6b
commit b7d92d285d
3 changed files with 24 additions and 0 deletions

View file

@ -8,5 +8,22 @@
EJS_gameUrl = 'mega_mountain.nes';
EJS_DEBUG_XX = true;
EJS_AdUrl = "https://www.google.com/search?igu=1";
EJS_Buttons = {
playPause: false,
restart: false,
mute: false,
settings: false,
fullscreen: true,
saveState: false,
loadState: false,
screenRecord: false,
gamepad: false,
cheat: false,
volume: true,
quickSave: false,
quickLoad: false,
screenshot: false,
cacheManager: false
}
</script>
<script src='src/loader.js'></script>

View file

@ -225,6 +225,11 @@ class EmulatorJS {
this.on("start", () => {
closeParent.removeAttribute("hidden");
const time = (typeof this.config.adTimer === "number" && this.config.adTimer > 0) ? this.config.adTimer : 10000;
if (this.config.adTimer === 0) return;
setTimeout(() => {
div.remove();
}, time);
})
}

View file

@ -50,6 +50,8 @@
config.gameName = window.EJS_gameName;
config.color = window.EJS_color;
config.adUrl = window.EJS_AdUrl;
config.adTimer = window.EJS_AdTimer
config.VirtualGamepadSettings = window.EJS_VirtualGamepadSettings;
new EmulatorJS(EJS_player, config);