From d53c2a615235a55c58c9a11125850d771556f06f Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 12:03:46 -0700 Subject: [PATCH 01/25] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f830bc7..5047955 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +# Allancoding's Version of Emulatorjs # EmulatorJS From cf9e190c9cd4640bf6c986ec920c233a71f73e78 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 12:04:41 -0700 Subject: [PATCH 02/25] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5047955..e34892f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Allancoding's Version of Emulatorjs -# EmulatorJS - Self-hosted **Javascript** emulation for various system.
From 710af0dbb44937ef323f11d555d74074dae2e7d6 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 12:09:40 -0700 Subject: [PATCH 03/25] Update emu-main.js --- data/emu-main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/data/emu-main.js b/data/emu-main.js index 63b2e37..dd712b9 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -28,7 +28,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { 'reset': 'Reset', 'disabled': 'Disabled', 'enabled': 'Enabled', - 'playNow': 'Play Now' + 'playNow': 'Start Game' }, 'listeners': { 'play': null, @@ -6036,3 +6036,14 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x17edbf.default = _0x3dbc76; } +$(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); +$(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); +$(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); +$(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); +$("#loding").attr("hidden",""); +$("#loding").hide(); +$("#start").on('touchstart click', function() { +$(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); +$("#loding").show(); +$("#loding").removeAttr("hidden"); +$("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); From bb4a5bb0cd5c0d6edcbcf13a4e34094f5e055a99 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 14:32:21 -0700 Subject: [PATCH 04/25] Update emu-main.js --- data/emu-main.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/data/emu-main.js b/data/emu-main.js index dd712b9..9c91631 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -6036,14 +6036,22 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { _0x17edbf.default = _0x3dbc76; } -$(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); -$(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); -$(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); -$(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); -$("#loding").attr("hidden",""); -$("#loding").hide(); -$("#start").on('touchstart click', function() { -$(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); -$("#loding").show(); -$("#loding").removeAttr("hidden"); -$("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); +$(document).ready(function(){ + $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); + $(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); + $(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); + $(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); + $("#loding").attr("hidden",""); + $("#loding").hide(); + $("#start").on('touchstart click', function() { + $(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); + $("#loding").show(); + $("#loding").removeAttr("hidden"); + $("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); + setTimeout( + function() + { + $("div").remove(".ejs--cbcfe0a1421cadac9a04c81d6431d6"); + }, 4500); +}); +}); From 0aa9123d38011a872e2f08d7299e11379cb12645 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 14:37:10 -0700 Subject: [PATCH 05/25] Update emu-main.js --- data/emu-main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/emu-main.js b/data/emu-main.js index 9c91631..d37a8af 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -5145,8 +5145,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { if (Array.from(_0x1b48e7).forEach(function(_0x228a1f, _0x123a07) {}), null === _0x2a1dda.getAttribute('menu')) { var _0x14264d = _0x428003('li', {}); _0x14264d.appendChild(_0x428003('a', { - 'target': '_blank', - 'href': 'https://github.com/ethanaobrien/emulatorjs' + 'href': '#' }, 'EmulatorJS v' .concat(this.version))), _0x2a1dda.appendChild(_0x14264d), _0x2a1dda.setAttribute('menu', ''); } _0x2c1832 && clearTimeout(_0x2c1832), _0x2c1832 = setTimeout(function() {}, 0xfa0), _0x7f9f36.contextMenu.timer = _0x2c1832; From bd6a3689cd65442db9beda26d222089637c79468 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 14:39:27 -0700 Subject: [PATCH 06/25] Update emulator.js --- data/emulator.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/data/emulator.js b/data/emulator.js index 43192f9..d4512c3 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -13561,3 +13561,23 @@ var EJS = function(_0x574f5e) { this.jitter = _0x2d4fd2; }; }, undefined, window.EJS_main]).default; + +$(document).ready(function(){ + $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); + $(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); + $(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); + $(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); + $("#loding").attr("hidden",""); + $("#loding").hide(); + $("#start").on('touchstart click', function() { + $(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); + $("#loding").show(); + $("#loding").removeAttr("hidden"); + $("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); + setTimeout( + function() + { + $("div").remove(".ejs--cbcfe0a1421cadac9a04c81d6431d6"); + }, 4500); +}); +}); From 2276df5e5ed159005952f5abdd6df4347672a0c9 Mon Sep 17 00:00:00 2001 From: allancoding <74841470+allancoding@users.noreply.github.com> Date: Mon, 31 Jan 2022 14:41:00 -0700 Subject: [PATCH 07/25] Update loader.js --- data/loader.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/data/loader.js b/data/loader.js index f889dd5..48f0fb9 100644 --- a/data/loader.js +++ b/data/loader.js @@ -67,3 +67,22 @@ emu_main.onload = function() { }; }; +$(document).ready(function(){ + $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); + $(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); + $(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); + $(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); + $("#loding").attr("hidden",""); + $("#loding").hide(); + $("#start").on('touchstart click', function() { + $(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); + $("#loding").show(); + $("#loding").removeAttr("hidden"); + $("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); + setTimeout( + function() + { + $("div").remove(".ejs--cbcfe0a1421cadac9a04c81d6431d6"); + }, 4500); +}); +}); From 70b292ca7cde2b9b93babdb5d289c3f16cfe3290 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Tue, 22 Feb 2022 18:42:42 -0700 Subject: [PATCH 08/25] Update loader.js --- data/loader.js | 138 ++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/data/loader.js b/data/loader.js index 7293e51..9ae4daf 100644 --- a/data/loader.js +++ b/data/loader.js @@ -1,74 +1,74 @@ -var VERSION = '0.4.26' -fetch('https://raw.githack.com/ethanaobrien/emulatorjs/main/data/version.json').then(response => { - if (response.ok) { - response.text().then(body => { - var version = JSON.parse(body); - var usingVersion = VERSION; - if (usingVersion != version.current_version) { - console.log('Using emulatorjs version ' + usingVersion + ' but the newest version is ' + version.current_version + '\n\nopen https://github.com/ethanaobrien/emulatorjs to update'); - }; - }); - }; -}); -var scriptTag = document.getElementsByTagName('script')[0] -var emu_main = document.createElement('script') -emu_main.src = function() { - if ('undefined' != typeof EJS_paths && typeof EJS_paths['emu-main.js'] == 'string') { - return EJS_paths['emu-main.js'] - } else if ('undefined' != typeof EJS_pathtodata) { - return EJS_pathtodata + 'emu-main.js?v=' + VERSION - } else { - return 'emu-main.js?v=' + VERSION; +(async function() { + var VERSION = 1.1; + if (window.location && ['localhost', '127.0.0.1'].includes(location.hostname)) { + fetch('https://raw.githack.com/ethanaobrien/emulatorjs/main/data/version.json').then(response => { + if (response.ok) { + response.text().then(body => { + var version = JSON.parse(body); + if (VERSION < version.current_version) { + console.log('Using emulatorjs version ' + usingVersion + ' but the newest version is ' + version.current_version + '\nopen https://github.com/ethanaobrien/emulatorjs to update'); + } + }) + } + }) } -}(); -scriptTag.parentNode.insertBefore(emu_main, scriptTag) -emu_main.onload = function() { - var emulatorjs = document.createElement('script') - emulatorjs.async = true - emulatorjs.src = function() { - if ('undefined' != typeof EJS_paths && typeof EJS_paths['emulator.js'] == 'string') { - return EJS_paths['emulator.js'] - } else if ('undefined' != typeof EJS_pathtodata) { - return EJS_pathtodata + 'emulator.js?v=' + VERSION - } else { - return 'emulator.js?v=' + VERSION; - } - }(); - scriptTag.parentNode.insertBefore(emulatorjs, scriptTag) - emulatorjs.onload = function() { - var config = {}; - config.gameUrl = EJS_gameUrl + var scriptTag = document.getElementsByTagName('script')[0] + function loadScript(file) { + return new Promise(function (resolve, reject) { + var script = document.createElement('script'); + script.src = function() { + if ('undefined' != typeof EJS_paths && typeof EJS_paths[file] == 'string') { + return EJS_paths[file]; + } else if ('undefined' != typeof EJS_pathtodata) { + return EJS_pathtodata+file+'?v='+VERSION; + } else { + return file+'?v='+VERSION; + } + }(); + scriptTag.parentNode.insertBefore(script, scriptTag); + script.onload = function() { + resolve(); + } + }) + } + if ('undefined' != typeof EJS_DEBUG_XX && true === EJS_DEBUG_XX) { + await loadScript('emu-main.js'); + await loadScript('emulator.js'); + } else { + await loadScript('emu-min.js'); + } + var config = {}; + config.gameUrl = EJS_gameUrl; + 'undefined' != typeof EJS_mameCore && (config.mameCore = EJS_mameCore); + 'undefined' != typeof EJS_biosUrl && (config.biosUrl = EJS_biosUrl); + 'undefined' != typeof EJS_gameID && (config.gameId = EJS_gameID); + 'undefined' != typeof EJS_gameParentUrl && (config.gameParentUrl = EJS_gameParentUrl); + 'undefined' != typeof EJS_gamePatchUrl && (config.gamePatchUrl = EJS_gamePatchUrl); + 'undefined' != typeof EJS_AdUrl && (config.adUrl = EJS_AdUrl); + 'undefined' != typeof EJS_paths && (config.paths = EJS_paths); + 'undefined' != typeof EJS_netplayUrl && (config.netplayUrl = EJS_netplayUrl); + 'undefined' != typeof EJS_startOnLoaded && (config.startOnLoad = EJS_startOnLoaded); + 'undefined' != typeof EJS_core && (config.system = EJS_core); + 'undefined' != typeof EJS_loadStateURL && (config.loadStateOnStart = EJS_loadStateURL); + 'undefined' != typeof EJS_language && (config.lang = EJS_language); + 'undefined' != typeof EJS_oldEJSNetplayServer && (config.oldNetplayServer = EJS_oldEJSNetplayServer); + 'undefined' != typeof EJS_BETA && (config.useBeta = EJS_BETA); + config.onsavestate = null; + config.onloadstate = null; + 'undefined' != typeof EJS_onSaveState && (config.onsavestate = EJS_onSaveState); + 'undefined' != typeof EJS_onLoadState && (config.onloadstate = EJS_onLoadState); + 'undefined' != typeof EJS_lightgun && (config.lightgun = EJS_lightgun); + 'undefined' != typeof EJS_gameName && (config.gameName = EJS_gameName); + 'undefined' != typeof EJS_pathtodata && (config.dataPath = EJS_pathtodata); + 'undefined' != typeof EJS_mouse && (config.mouse = EJS_mouse); + 'undefined' != typeof EJS_multitap && (config.multitap = EJS_multitap); + 'undefined' != typeof EJS_playerName && (config.playerName = EJS_playerName); + 'undefined' != typeof EJS_cheats && (config.cheats = EJS_cheats); + 'undefined' != typeof EJS_color && (config.color = EJS_color); + window.EJS_emulator = new EJS(EJS_player, config); + 'undefined' != typeof EJS_onGameStart && EJS_emulator.on('start-game', EJS_onGameStart); +})(); - 'undefined' != typeof EJS_mameCore && (config.mameCore = EJS_mameCore) - 'undefined' != typeof EJS_biosUrl && (config.biosUrl = EJS_biosUrl) - 'undefined' != typeof EJS_gameID && (config.gameId = EJS_gameID) - 'undefined' != typeof EJS_gameParentUrl && (config.gameParentUrl = EJS_gameParentUrl) - 'undefined' != typeof EJS_gamePatchUrl && (config.gamePatchUrl = EJS_gamePatchUrl) - 'undefined' != typeof EJS_AdUrl && (config.adUrl = EJS_AdUrl) - 'undefined' != typeof EJS_paths && (config.paths = EJS_paths) - 'undefined' != typeof EJS_netplayUrl && (config.netplayUrl = EJS_netplayUrl) - 'undefined' != typeof EJS_startOnLoaded && (config.startOnLoad = EJS_startOnLoaded) - 'undefined' != typeof EJS_core && (config.system = EJS_core) - 'undefined' != typeof EJS_loadStateURL && (config.loadStateOnStart = EJS_loadStateURL) - 'undefined' != typeof EJS_language && (config.lang = EJS_language) - 'undefined' != typeof EJS_oldEJSNetplayServer && (config.oldNetplayServer = EJS_oldEJSNetplayServer) - 'undefined' != typeof EJS_BETA && (config.useBeta = EJS_BETA) - config.onsavestate = null - config.onloadstate = null - 'undefined' != typeof EJS_onSaveState && (config.onsavestate = EJS_onSaveState) - 'undefined' != typeof EJS_onLoadState && (config.onloadstate = EJS_onLoadState) - 'undefined' != typeof EJS_lightgun && (config.lightgun = EJS_lightgun) - 'undefined' != typeof EJS_gameName && (config.gameName = EJS_gameName) - 'undefined' != typeof EJS_pathtodata && (config.dataPath = EJS_pathtodata) - 'undefined' != typeof EJS_mouse && (config.mouse = EJS_mouse) - 'undefined' != typeof EJS_multitap && (config.multitap = EJS_multitap) - 'undefined' != typeof EJS_playerName && (config.playerName = EJS_playerName) - 'undefined' != typeof EJS_cheats && (config.cheats = EJS_cheats) - 'undefined' != typeof EJS_color && (config.color = EJS_color) - window.EJS_emulator = new EJS(EJS_player, config) - 'undefined' != typeof EJS_onGameStart && EJS_emulator.on('start-game', EJS_onGameStart); - }; -}; $(document).ready(function(){ $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); From d2cb635fbe8a736ce7708e7227226a6ad437cf9a Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Tue, 22 Feb 2022 18:57:41 -0700 Subject: [PATCH 09/25] Update loader.js --- data/loader.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/data/loader.js b/data/loader.js index 9ae4daf..b269aca 100644 --- a/data/loader.js +++ b/data/loader.js @@ -68,24 +68,3 @@ window.EJS_emulator = new EJS(EJS_player, config); 'undefined' != typeof EJS_onGameStart && EJS_emulator.on('start-game', EJS_onGameStart); })(); - - -$(document).ready(function(){ - $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); - $(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); - $(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); - $(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); - $("#loding").attr("hidden",""); - $("#loding").hide(); - $("#start").on('touchstart click', function() { - $(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); - $("#loding").show(); - $("#loding").removeAttr("hidden"); - $("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); - setTimeout( - function() - { - $("div").remove(".ejs--cbcfe0a1421cadac9a04c81d6431d6"); - }, 4500); -}); -}); From 41c6c2f47a351af979b388c30a9b98199a7b4316 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 23 Feb 2022 08:03:52 -0700 Subject: [PATCH 10/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dcc75f9..f71550a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Allancoding's Version of Emulatorjs + Self-hosted **Javascript** emulation for various system. From 8786282eff9c9b085745cdddb4d39e6d4e9ead1e Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 23 Feb 2022 08:05:32 -0700 Subject: [PATCH 11/25] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f71550a..bb2a91a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ +

+ +

+# Emulatorjs Self-hosted **Javascript** emulation for various system. From c02882342b7f3164efbb5a4d494dad66d58715c7 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 23 Feb 2022 08:06:16 -0700 Subject: [PATCH 12/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb2a91a..a9c972c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-# Emulatorjs +# Allancoding's Version of Emulatorjs Self-hosted **Javascript** emulation for various system. From 5bcd04c46dc0effc63043837af7916d24f301c55 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 23 Feb 2022 10:06:27 -0700 Subject: [PATCH 13/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9c972c..20ef829 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-# Allancoding's Version of Emulatorjs +# EmulatorJS Self-hosted **Javascript** emulation for various system. From 058eb88f56ffe44eb51e93e6dc84f522f0ffbec7 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 23 Feb 2022 10:07:08 -0700 Subject: [PATCH 14/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20ef829..048268b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-# EmulatorJS +# Allancoding's Version of EmulatorJS Self-hosted **Javascript** emulation for various system. From 29935619dbbdb68946ecb1c6f767cdbe8c877452 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Thu, 3 Mar 2022 20:31:38 -0700 Subject: [PATCH 15/25] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7a7f861..b8dce81 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,18 @@ # Allancoding's Version of EmulatorJS +--- +## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs + +Added code: + +- Background image code +- Remove the ad loader after 4.5 seconds + +--- + + + Self-hosted **Javascript** emulation for various system.
From e4a1622c7d85364376132fa22788b5828c0d8f1c Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Fri, 15 Apr 2022 14:37:27 -0600 Subject: [PATCH 16/25] Update README.md --- README.md | 318 +++++++++++++++++++----------------------------------- 1 file changed, 108 insertions(+), 210 deletions(-) diff --git a/README.md b/README.md index eca69ab..b57fb0c 100644 --- a/README.md +++ b/README.md @@ -1,253 +1,151 @@ -

- -

-# Allancoding's Version of EmulatorJS - ---- -## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs - -Added code: - -- Background image code -- Remove the ad loader after 4.5 seconds - ---- - - - +
+ + + +
+
+ +[![Badge License]][License] + +
+ Self-hosted **Javascript** emulation for various system. + +**⸢ [Website] ⸥**   +**⸢ [Usage] ⸥**   +**⸢ [Example] ⸥**   +**⸢ [Demo] ⸥**   +**⸢ [Beta] ⸥** + +
+
+### Issues + *If something doesn't work, please consider opening an* ***[Issue]***
*with as many details as possible, as well as the console log.* +
+ +### Audio + *The* ***Screen Recording*** *option currently doesn't support* ***Audio*** *.* -The **beta** version of the emulator core files are now avaliable. (For limited systems)
-If you would like to use it, please add the following line to your code. +
+ +### Beta + +The **beta** of the emulator core is now available for *some* systems.
+To use it, please add the following line to your code. ```js EJS_BETA = true; ``` -When reporting bugs, please specify that you are using the beta version +
---- +**>> When reporting bugs, please specify that you are using the beta version** -**⸢ [EmulatorJS Website] ⸥ ⸢ [Example Use] ⸥ ⸢ [Emulator Demo] ⸥ ⸢ [Beta] ⸥** +
+
+
---- - -## Supported Systems - -#### Nintendo - -**[Game Boy Advance][Nintendo Game Boy Advance]** | **[Famicom / NES][NES / Famicom]** | **[Virtual Boy][Virtual Boy]** | **[Game Boy][Nintendo Game Boy]** | **[SNES]** | **[DS][Nintendo DS]** | **[64][Nintendo 64]** - -#### Sega -**[Master System][Sega Master System]** | **[Mega Drive][Sega Mega Drive]** | **[Game Gear][Sega Game Gear]** | **[Saturn][Sega Saturn]** | **[32X][Sega 32X]** | **[CD][Sega CD]** - -#### Atari - -**[Jaguar][Atari Jaguar]** | **[Lynx][Atari Lynx]** | **[7800][Atari 7800]** | **[2600][Atari 2600]** - -#### Other - -**[TurboGrafs 16 PC Engine][TurboGrafs-16 / PC Engine]** | **[WanderSwan Color][WanderSwan / Color]** | **[Neo Geo Poket][Neo Geo Poket]** | **[PlayStation]** | **[Arcade]** | **[MSX]** | **[3DO]** - ---- - - -## Usage - -*For questions please use the* ***[Issue]*** *tab.* +

Supported Systems


-##### Setup +
-1. Download this repository.
- *`Code ➞ Download As Zip`* +### Nintendo -2. Use a **WebServer** to host the emulator. - -3. Use your **Browser** to navigate to `localhost` +**[Game Boy Advance][Nintendo Game Boy Advance]**   |  +**[Famicom / NES][NES / Famicom]**   |  +**[Virtual Boy][Virtual Boy]** + +**[Game Boy][Nintendo Game Boy]**   |  +**[SNES]**   |  +**[DS][Nintendo DS]**   |  +**[64][Nintendo 64]**
- -##### ROMs - -**ROMs** can be used as `zip` / `rar` / `7z` archives. -
-##### Netplay - -By default **Netplay** is ***disabled***,
-to enable it, add the following: - -```js -// ID in your website, required for netplay. Each game in your site should have a different ID -EJS_gameID = 1; -``` +### Sega +**[Master System][Sega Master System]**   |  +**[Mega Drive][Sega Mega Drive]**   |  +**[Game Gear][Sega Game Gear]** + +**[Saturn][Sega Saturn]**   |  +**[32X][Sega 32X]**   |  +**[CD][Sega CD]** + +

-by default, the netplay server url will be `emuserver.emulatorjs.ga`, but to default to the default `ws.emulatorjs.com` server add the following line +### Atari -```js -EJS_oldEJSNetplayServer = true; -``` +**[Jaguar][Atari Jaguar]**   |  +**[Lynx][Atari Lynx]**   |  +**[7800][Atari 7800]**   |  +**[2600][Atari 2600]**
- -*To self host:* - -1. Download the **[Server]**. - -2. Specify the servers address with: - -```js -EJS_netplayUrl = 'http://localhost:3000/'; // Absolute Url To Your Netplay Server -``` -
-##### Custom Save Filename +### Other -To customize the filename of save states
-simply add the following lines of code. - -```js -EJS_gameName = 'Game Name'; -``` - -**➞ Save Filename:** `Game Name.state` +**[TurboGrafs 16 PC Engine][TurboGrafs-16 / PC Engine]**   |  +**[WanderSwan Color][WanderSwan / Color]**   |  +**[Neo Geo Poket][Neo Geo Poket]** + +**[PlayStation]**   |  +**[Arcade]**   |  +**[MSX]**   |  +**[3DO]** + +

-##### AD - -To place an advertisement in front of the
-`play now` screen, include the following line: - -```js -EJS_AdUrl = 'URL'; -``` - -
- -##### Interface Color - -To use a different color for the emulator interface, use: - -```js -EJS_color = '#FF0000'; // Hex Color Code -``` - -
- -##### Direct Start - -To start the emulator immediately, add this line: - -```js -EJS_startOnLoaded = true; -``` - -*For audio to play the user still*
-*needs to interact with the page.* - -
- -##### Custom Paths - -Paths to emulator files can be customized with: - -```js -EJS_paths = { - 'fileName' : '/somepath', - 'emulator.js' : 'https://example.com/emulator.js', - 'n64-asmjs.data' : '/asdfds.data' -}; -``` - -*If a file is not defined, the default is used.* - -
- -##### Localization - -please see [the localization readme] - -
- -##### USING MAME SYSTEM - -you must add the line - -```js -EJS_core = 'mame'; -``` - -and the line - -```js -EJS_mameCore = '' // mame core options (example: '4|0') -``` -set the mame core value to the mame core number (`1` - `6`) + `|` + save states supported (`0` or `1`) - -
- -# LICENSE - -Licenced under the GNU General Public License v3.0 - -Please state changes and the licence when re-distributing - -[Read the whole license here] - -If I find a repository that does not follow the licence, I will report it. - - -[EmulatorJS Website]: https://emulatorjs.ga/ -[Example Use]: https://coldcast.org/games/1/Super-Mario-Bros -[Emulator Demo]: https://emulatorjs.ga/demo/ +[Badge License]: https://img.shields.io/badge/License-GPLv3-blue.svg + +[License]: LICENSE +[Issue]: https://github.com/ethanaobrien/emulatorjs/issues + + +[Example]: https://coldcast.org/games/1/Super-Mario-Bros +[Website]: https://emulatorjs.ga/ +[Usage]: docs/Usage.md +[Demo]: https://emulatorjs.ga/demo/ [Beta]: https://emulatorjs.ga/beta/ -[Issue]: https://github.com/ethanaobrien/emulatorjs/issues -[This repository]: https://github.com/linuxserver/emulatorjs - -[Server]: https://github.com/ethanaobrien/emuserver/releases - -[the localization readme]: data/localization/ -[Read the whole license here]: LICENSE - -[NES / Famicom]: docs/NES-Famicom.md -[SNES]: docs/SNES.md -[Nintendo 64]: docs/Nintendo%2064.md -[Nintendo Game Boy]: docs/Nintendo%20Game%20Boy.md -[Nintendo Game Boy Advance]: docs/Nintendo%20Game%20Boy%20Advance.md -[Nintendo DS]: docs/Nintendo%20DS.md -[PlayStation]: docs/PlayStation.md -[Virtual Boy]: docs/Virtual%20Boy.md -[Sega Mega Drive]: docs/Sega%20Mega%20Drive.md -[Sega Master System]: docs/Sega%20Master%20System.md -[Sega CD]: docs/Sega%20CD.md -[Atari Lynx]: docs/Atari%20Lynx.md -[MSX]: docs/MSX.md -[3DO]: docs/3DO.md -[Sega 32X]: docs/Sega%2032X.md -[Atari Jaguar]: docs/Atari%20Jaguar.md -[Neo Geo Poket]: docs/Neo%20Geo%20Poket.md -[Sega Game Gear]: docs/Sega%20Game%20Gear.md -[Sega Saturn]: docs/Sega%20Saturn.md -[Atari 7800]: docs/Atari%207800.md -[WanderSwan / Color]: docs/WanderSwan-Color.md -[TurboGrafs-16 / PC Engine]: docs/TurboGrafs%2016-PC%20Engine.md -[Arcade]: docs/Arcade.md -[Atari 2600]: docs/Atari%202600.md +[NES / Famicom]: docs/Systems/NES-Famicom.md +[SNES]: docs/Systems/SNES.md +[Nintendo 64]: docs/Systems/Nintendo%2064.md +[Nintendo Game Boy]: docs/Systems/Nintendo%20Game%20Boy.md +[Nintendo Game Boy Advance]: docs/Systems/Nintendo%20Game%20Boy%20Advance.md +[Nintendo DS]: docs/Systems/Nintendo%20DS.md +[PlayStation]: docs/Systems/PlayStation.md +[Virtual Boy]: docs/Systems/Virtual%20Boy.md +[Sega Mega Drive]: docs/Systems/Sega%20Mega%20Drive.md +[Sega Master System]: docs/Systems/Sega%20Master%20System.md +[Sega CD]: docs/Systems/Sega%20CD.md +[Atari Lynx]: docs/Systems/Atari%20Lynx.md +[MSX]: docs/Systems/MSX.md +[3DO]: docs/Systems/3DO.md +[Sega 32X]: docs/Systems/Sega%2032X.md +[Atari Jaguar]: docs/Systems/Atari%20Jaguar.md +[Neo Geo Poket]: docs/Systems/Neo%20Geo%20Poket.md +[Sega Game Gear]: docs/Systems/Sega%20Game%20Gear.md +[Sega Saturn]: docs/Systems/Sega%20Saturn.md +[Atari 7800]: docs/Systems/Atari%207800.md +[WanderSwan / Color]: docs/Systems/WanderSwan-Color.md +[TurboGrafs-16 / PC Engine]: docs/Systems/TurboGrafs%2016-PC%20Engine.md +[Arcade]: docs/Systems/Arcade.md +[Atari 2600]: docs/Systems/Atari%202600.md From a5d213e92edf3ff2fc1aae50d484cdf2e4e12a96 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Fri, 15 Apr 2022 14:40:46 -0600 Subject: [PATCH 17/25] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b57fb0c..7df4619 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
- +

@@ -23,6 +23,18 @@ Self-hosted **Javascript** emulation for various system.
+# Allancoding's Version of EmulatorJS + +--- +## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs + +Added code: + +- Background image code +- Remove the ad loader after 4.5 seconds + +--- + ### Issues *If something doesn't work, please consider opening an* ***[Issue]***
From 7100213b0f7f40d7dafb45f4e8eb2659d02db11a Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Fri, 15 Apr 2022 15:26:01 -0600 Subject: [PATCH 18/25] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7df4619..96ceb3c 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,9 @@ Self-hosted **Javascript** emulation for various system. **⸢ [Website] ⸥**   **⸢ [Usage] ⸥**   -**⸢ [Example] ⸥**   -**⸢ [Demo] ⸥**   +**⸢ [Old Example] ⸥**   +**⸢ [Demo] ⸥**  +**⸢ [Code Creater] ⸥**  **⸢ [Beta] ⸥**
@@ -135,6 +136,7 @@ EJS_BETA = true; [Website]: https://emulatorjs.ga/ [Usage]: docs/Usage.md [Demo]: https://emulatorjs.ga/demo/ +[Code Creater]: https://emulatorjs.ga/codehelper [Beta]: https://emulatorjs.ga/beta/ [NES / Famicom]: docs/Systems/NES-Famicom.md From 1852e1c5980c6b881b8b17d27473a0beba702647 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Fri, 15 Apr 2022 15:27:13 -0600 Subject: [PATCH 19/25] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 96ceb3c..18f4a18 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ Self-hosted **Javascript** emulation for various system. **⸢ [Website] ⸥**   **⸢ [Usage] ⸥**   -**⸢ [Old Example] ⸥**   +**⸢ [Example] ⸥**   **⸢ [Demo] ⸥**  -**⸢ [Code Creater] ⸥**  **⸢ [Beta] ⸥** @@ -136,7 +135,6 @@ EJS_BETA = true; [Website]: https://emulatorjs.ga/ [Usage]: docs/Usage.md [Demo]: https://emulatorjs.ga/demo/ -[Code Creater]: https://emulatorjs.ga/codehelper [Beta]: https://emulatorjs.ga/beta/ [NES / Famicom]: docs/Systems/NES-Famicom.md From 839ad810bf43aa77eefa37619fd5f5a6f9629da5 Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Tue, 10 May 2022 22:07:08 -0600 Subject: [PATCH 20/25] Update README.md --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index 18f4a18..de68b93 100644 --- a/README.md +++ b/README.md @@ -23,18 +23,6 @@ Self-hosted **Javascript** emulation for various system.
-# Allancoding's Version of EmulatorJS - ---- -## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs - -Added code: - -- Background image code -- Remove the ad loader after 4.5 seconds - ---- - ### Issues *If something doesn't work, please consider opening an* ***[Issue]***
From 2884314d99067ceae3aa799250da7ca8141c8cbd Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Tue, 10 May 2022 22:08:48 -0600 Subject: [PATCH 21/25] Create changes.md --- changes.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 changes.md diff --git a/changes.md b/changes.md new file mode 100644 index 0000000..cb355b3 --- /dev/null +++ b/changes.md @@ -0,0 +1,12 @@ + +# Allancoding's Version of EmulatorJS + +--- +## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs + +Added code: + +- Background image code +- Remove the ad loader after 4.5 seconds + +--- From 830a6f97d3dbcd88f81174d5ff31ae9f1f59944f Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Tue, 10 May 2022 22:14:52 -0600 Subject: [PATCH 22/25] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index de68b93..2a5e582 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ [![Badge License]][License] -
Self-hosted **Javascript** emulation for various system. From b24c7bc36015b544634a1765b260df410010b07f Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Wed, 11 May 2022 16:50:59 -0600 Subject: [PATCH 23/25] Update README.md --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 564b963..47f396f 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,6 @@

- - # Allancoding's Version of EmulatorJS - ---- -## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs - -Added code: - -- Background image code -- Remove the ad loader after 4.5 seconds - ---- - - [![Badge License]][License] @@ -38,6 +24,18 @@ Self-hosted **Javascript** emulation for various system.
+# Allancoding's Version of EmulatorJS + +--- +## *These are the things that were change*d from: https://github.com/ethanaobrien/emulatorjs + +Added code: + +- Background image code +- Remove the ad loader after 4.5 seconds + +--- + ### Issues *If something doesn't work, please consider opening an* ***[Issue]***
From 0b5f4425c3f24871dad02ce836188cf4a139e57d Mon Sep 17 00:00:00 2001 From: Allan Niles <74841470+allancoding@users.noreply.github.com> Date: Mon, 16 May 2022 18:01:37 -0600 Subject: [PATCH 24/25] Update --- data/emu-main.js | 22 +--------------------- data/emu-min.js | 2 +- data/emulator.js | 2 +- data/minify/package-lock.json | 22 +++++++++++++++++++++- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/data/emu-main.js b/data/emu-main.js index ecc7e64..7613a7a 100644 --- a/data/emu-main.js +++ b/data/emu-main.js @@ -6529,24 +6529,4 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) { }(); _0x3dbc76.defaults = {}; _0x17edbf.default = _0x3dbc76; -} - -$(document).ready(function(){ - $(".ejs--73f9b4e94a7a1fe74e11107d5ab2ef").attr("id","start"); - $(".ejs--cbcfe0a1421cadac9a04c81d6431d6").attr("id","loding"); - $(".ejs--71527b6509aa48afce3ce1a11c02f0").attr("id","naming"); - $(".ejs--057800d021995e1347ec07cb748672").addClass("backg"); - $("#loding").attr("hidden",""); - $("#loding").hide(); - $("#start").on('touchstart click', function() { - $(".ejs--057800d021995e1347ec07cb748672").removeClass("backg"); - $("#loding").show(); - $("#loding").removeAttr("hidden"); - $("div").remove(".ejs--f3a1903d935f6cf720d4a0498db62a"); - setTimeout( - function() - { - $("div").remove(".ejs--cbcfe0a1421cadac9a04c81d6431d6"); - }, 4500); -}); -}); +} \ No newline at end of file diff --git a/data/emu-min.js b/data/emu-min.js index a62568c..f3dc224 100644 --- a/data/emu-min.js +++ b/data/emu-min.js @@ -1 +1 @@ -var EJS=function(n){window.EJS_MODULES=n;var o={},a=[];function i(e){if(o[e])return o[e].exports;a.push(e);var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return window.aba=function(){return a.sort(function(e,t){return t'+n.localization("CORS Error")+"":t.innerHTML=''+n.localization("Network Error")+""}},null,null,null,null,null,function(e,t,n){!function(e){"use strict";function o(){}function t(e){var t=this,n=window;this.update=o,this.requestAnimationFrame=e||n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,this.tickFunction=function(){t.update(),t.startTicker()},this.startTicker=function(){t.requestAnimationFrame.apply(n,[t.tickFunction])}}function n(){}function a(e,t){this.listener=e,this.gamepadGetter=t,this.knownGamepads=[]}function i(t){this.listener=t,window.addEventListener("gamepadconnected",function(e){t._connect(e.gamepad)}),window.addEventListener("gamepaddisconnected",function(e){t._disconnect(e.gamepad)})}function l(e){this.updateStrategy=e||new t,this.gamepads=[],this.listeners={},this.platform=r,this.deadzone=.03,this.maximizeThreshold=.97}var r={getType:function(){return"null"},isSupported:function(){return!1},update:o};t.prototype.start=function(e){this.update=e||o,this.startTicker()},n.prototype.update=o,n.prototype.start=function(e){this.update=e||o},a.factory=function(e){var t=r,n=window&&window.navigator;return n&&(void 0!==n.getGamepads?t=new a(e,function(){return n.getGamepads()}):void 0!==n.webkitGamepads?t=new a(e,function(){return n.webkitGamepads()}):void 0!==n.webkitGetGamepads&&(t=new a(e,function(){return n.webkitGetGamepads()}))),t},a.getType=function(){return"WebKit"},a.prototype.getType=function(){return a.getType()},a.prototype.isSupported=function(){return!0},a.prototype.update=function(){for(var e,t=Array.prototype.slice.call(this.gamepadGetter(),0),n=this.knownGamepads.length-1;0<=n;n--)e=this.knownGamepads[n],t.indexOf(e)<0&&(this.knownGamepads.splice(n,1),this.listener._disconnect(e));for(n=0;ne.length)&&(n=e.length),n-=t.length;e=e.indexOf(t,n);return-1!==e&&e===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);0>16&255,a[i++]=t>>8&255,a[i++]=255&t;return 2===n&&(t=c[e.charCodeAt(s)]<<2|c[e.charCodeAt(s+1)]>>4,a[i++]=255&t),1===n&&(t=c[e.charCodeAt(s)]<<10|c[e.charCodeAt(s+1)]<<4|c[e.charCodeAt(s+2)]>>2,a[i++]=t>>8&255,a[i++]=255&t),a},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],i=0,r=n-o;i>18&63]+s[o>>12&63]+s[o>>6&63]+s[63&o]);return a.join("")}(e,i,r>2]+s[t<<4&63]+"==")):2==o&&(t=(e[n-2]<<8)+e[n-1],a.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),a.join("")};for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,i=o.length;a>>1;case"base64":return S(e).length;default:if(a)return o?-1:_(e).length;t=(""+t).toLowerCase(),a=!0}}function n(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function s(e,t,n,o,a){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):2147483647=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=u.from(t,o)),u.isBuffer(t))return 0===t.length?-1:c(e,t,n,o,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(a?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):c(e,[t],n,o,a);throw new TypeError("val must be string, number or Buffer")}function c(e,t,n,o,a){var i=1,r=e.length,s=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;r/=i=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a)for(var l=-1,d=n;d>>10&1023|55296),d=56320|1023&d),o.push(d),a+=u}var f=o,p=f.length;if(p<=g)return String.fromCharCode.apply(String,f);for(var h="",m=0;mthis.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var i=this,r=t,s=n,c=i.length;(!s||s<0||ct&&(e+=" ... "),""},u.prototype.compare=function(e,t,n,o,a){if(A(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),(t=void 0===t?0:t)<0||n>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(a<=o&&n<=t)return 0;if(a<=o)return-1;if(n<=t)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(o>>>=0),r=(n>>>=0)-(t>>>=0),s=Math.min(i,r),c=this.slice(o,a),l=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var a=this.length-t;if((void 0===n||athis.length)throw new RangeError("Attempt to write outside buffer bounds");o=o||"utf8";for(var i,r,s,c,l,d=!1;;)switch(o){case"hex":var u=this,f=e,p=t,h=n,m=(p=Number(p)||0,u.length-p);(!h||(h=Number(h))>m)&&(h=m),(m=f.length)/2>8,a.push(n%256),a.push(o);return a}(e,(i=this).length-s),i,s,r);default:if(d)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),d=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var g=4096;function l(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(ne.length)throw new RangeError("Index out of range")}function b(e,t,n,o){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function y(e,t,n,o,a){return t=+t,n>>>=0,a||b(e,0,n,4),i.write(e,t,n,o,23,4),n+4}function w(e,t,n,o,a){return t=+t,n>>>=0,a||b(e,0,n,8),i.write(e,t,n,o,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],a=1,i=0;++i>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e+--t],a=1;0>>=0,t||l(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||l(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=this[e],a=1,i=0;++i=(a*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||l(e,t,this.length);for(var o=t,a=1,i=this[e+--o];0=(a*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||l(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt16BE=function(e,t){e>>>=0,t||l(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||l(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||l(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||l(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||l(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||l(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,o||m(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[t+a]=255&e;0<=--a&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=0,i=1,r=0;for(this[t]=255&e;++a>0)-r&255;return t+n},u.prototype.writeIntBE=function(e,t,n,o){e=+e,t>>>=0,o||m(this,e,t,n,(o=Math.pow(2,8*n-1))-1,-o);var a=n-1,i=1,r=0;for(this[t+a]=255&e;0<=--a&&(i*=256);)e<0&&0===r&&0!==this[t+a+1]&&(r=1),this[t+a]=(e/i>>0)-r&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return y(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return y(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return w(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return w(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,o){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,o||0===o||(o=this.length),t>=e.length&&(t=e.length),(o=0=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length);var a=(o=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(i=t;i>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function S(e){return T.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,n,o){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function k(e){return e!=e}}.call(this)}.call(this,M("buffer").Buffer)},{"base64-js":2,buffer:3,ieee754:4}],4:[function(e,t,n){n.read=function(e,t,n,o,a){var i,r,s=8*a-o-1,c=(1<>1,d=-7,u=n?a-1:0,f=n?-1:1,a=e[t+u];for(u+=f,i=a&(1<<-d)-1,a>>=-d,d+=s;0>=-d,d+=o;0>1,u=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:i-1,p=o?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,r=l):(r=Math.floor(Math.log(t)/Math.LN2),t*(o=Math.pow(2,-r))<1&&(r--,o*=2),2<=(t+=1<=r+d?u/o:u*Math.pow(2,1-d))*o&&(r++,o/=2),l<=r+d?(s=0,r=l):1<=r+d?(s=(t*o-1)*Math.pow(2,a),r+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),r=0));8<=a;e[n+f]=255&s,f+=p,s/=256,a-=8);for(r=r<=this._reconnectionAttempts?(d("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(e=this.backoff.duration(),d("will wait %dms before reconnect attempt",e),this.reconnecting=!0,t=setTimeout(function(){n.skipReconnect||(d("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect||n.open(function(e){e?(d("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",e.data)):(d("reconnect success"),n.onreconnect())}))},e),this.subs.push({destroy:function(){clearTimeout(t)}}))},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(106),s=n(381),c=n(390),n=n(391);t.polling=function(e){var t,n,o=!1,a=!1,i=!1!==e.jsonp;if("undefined"!=typeof location&&(t="https:"===location.protocol,n=(n=location.port)||(t?443:80),o=e.hostname!==location.hostname||n!==e.port,a=e.secure!==t),e.xdomain=o,e.xscheme=a,"open"in new r(e)&&!e.forceJSONP)return new s(e);if(i)return new c(e);throw new Error("JSONP disabled")},t.websocket=n},function(e,t,n){var o=n(107),a=n(75),i=n(51),r=n(76),s=n(152),c=n(77)("engine.io-client:polling"),l=(e.exports=d,null!=new(n(106))({xdomain:!1}).responseType);function d(e){var t=e&&e.forceBase64;l&&!t||(this.supportsBinary=!1),o.call(this,e)}r(d,o),d.prototype.name="polling",d.prototype.doOpen=function(){this.poll()},d.prototype.pause=function(e){var t,n=this;function o(){c("paused"),n.readyState="paused",e()}this.readyState="pausing",this.polling||!this.writable?(t=0,this.polling&&(c("we are currently polling - waiting to pause"),t++,this.once("pollComplete",function(){c("pre-pause polling complete"),--t||o()})),this.writable||(c("we are currently writing - waiting to pause"),t++,this.once("drain",function(){c("pre-pause writing complete"),--t||o()}))):o()},d.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},d.prototype.onData=function(e){var o=this;c("polling got data %s",e),i.decodePayload(e,this.socket.binaryType,function(e,t,n){if("opening"===o.readyState&&o.onOpen(),"close"===e.type)return o.onClose(),!1;o.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},d.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},d.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;i.encodePayload(e,this.supportsBinary,function(e){n.doWrite(e,t)})},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=s()),this.supportsBinary||e.sid||(e.b64=1),e=a.encode(e),this.port&&("https"==t&&443!==Number(this.port)||"http"==t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(t,e,n){!function(i){var e=Object.prototype.toString,r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===e.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===e.call(File);t.exports=function e(t){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(var n=0,o=t.length;nthis.options.threshold){var s={};for(c in this.direction)this.direction.hasOwnProperty(c)&&(s[c]=this.direction[c]);var c,l={};for(c in this.direction={x:n,y:o,angle:t},e.direction=this.direction,s)s[c]===this.direction[c]&&(l[c]=!0);if(l.x&&l.y&&l.angle)return e;l.x&&l.y||this.trigger("plain",e),l.x||this.trigger("plain:"+n,e),l.y||this.trigger("plain:"+o,e),l.angle||this.trigger("dir dir:"+t,e)}return e},o.prototype=new e,(o.constructor=o).id=0,o.prototype.prepareNipples=function(){var e=this,o=e.nipples;o.on=e.on.bind(e),o.off=e.off.bind(e),o.options=e.options,o.destroy=e.destroy.bind(e),o.ids=e.ids,o.id=e.id,o.processOnMove=e.processOnMove.bind(e),o.processOnEnd=e.processOnEnd.bind(e),o.get=function(e){if(void 0===e)return o[0];for(var t=0,n=o.length;t