don't break new users by relying on undocumented hacks

The 'gofullscreen' element and 'unmute' cookies are hold-overs from
when this was written specifically for archive.org; I need to get them
to improve their code so that we can remove these rather than just
making them special cases.

Fixes #6
This commit is contained in:
Daniel Brooks
2016-10-10 12:33:38 -07:00
parent a8fbd36252
commit 8a35866e84
6 changed files with 193 additions and 6 deletions
@@ -0,0 +1,50 @@
{
"creator": "Daniel Brooks <db48x@db48x.net>",
"reporter": "Daniel Brooks <db48x@db48x.net>",
"severity": "minor",
"status": "fixed",
"summary": "hide the archive.org-specific hacks so that they don't break other users",
"time": "Mon, 10 Oct 2016 19:21:07 +0000"
}
@@ -0,0 +1,50 @@
{
"creator": "Daniel Brooks <db48x@db48x.net>",
"reporter": "Daniel Brooks <db48x@db48x.net>",
"severity": "minor",
"status": "open",
"summary": "add a status bar underneath the canvas to show cpu/disk state",
"time": "Thu, 11 Aug 2016 16:57:53 +0000"
}
@@ -0,0 +1,3 @@
ReferenceError: jsmess_set_mastervolume is not defined
http://localhost/emulators/jsmess/messexidy.js line 407 > eval
Line 1
@@ -0,0 +1,29 @@
{
"Author": "Daniel Brooks <db48x@db48x.net>",
"Content-type": "text/plain",
"Date": "Mon, 10 Oct 2016 19:24:31 +0000"
}
@@ -0,0 +1,50 @@
{
"creator": "Daniel Brooks <db48x@db48x.net>",
"reporter": "Alexandre Torres <alexandre.torres@gmail.com>",
"severity": "minor",
"status": "open",
"summary": "Cannot run the arcade example",
"time": "Mon, 10 Oct 2016 19:24:00 +0000"
}
+11 -6
View File
@@ -142,13 +142,16 @@ var Module = null;
cfgr.fileSystemKey(game),
cfgr.nativeResolution(nr[0], nr[1]),
cfgr.aspectRatio(nr[0] / nr[1]),
cfgr.sampleRate(SAMPLE_RATE),
cfgr.muted(!(typeof $ !== 'undefined' && $.cookie && $.cookie('unmute')))];
cfgr.sampleRate(SAMPLE_RATE)];
if (/archive\.org$/.test(document.location.hostname)) {
cfgr.muted(!(typeof $ !== 'undefined' && $.cookie && $.cookie('unmute')))
}
if (module && module.indexOf("dosbox") === 0) {
config_args.push(cfgr.startExe(metadata.getElementsByTagName("emulator_start")
.item(0)
.textContent));
config_args.push(cfgr.startExe(metadata.getElementsByTagName("emulator_start")
.item(0)
.textContent));
} else if (module && module.indexOf("sae-") === 0) {
config_args.push(cfgr.model(modulecfg.driver),
cfgr.rom(modulecfg.bios_filenames));
@@ -730,7 +733,9 @@ var Module = null;
e.gamepad.index, e.gamepad.id);
});
document.getElementById("gofullscreen").addEventListener("click", this.requestFullScreen);
if (/archive\.org$/.test(document.location.hostname)) {
document.getElementById("gofullscreen").addEventListener("click", this.requestFullScreen);
}
var css_resolution, scale, aspectRatio;
// right off the bat we set the canvas's inner dimensions to