This commit is contained in:
Will Scullin 2019-06-15 15:59:02 -07:00
parent ea8766f370
commit c5ca5ee132
No known key found for this signature in database
GPG Key ID: 9092A5C0A673416B
6 changed files with 12 additions and 12 deletions

View File

@ -12,7 +12,7 @@
import { base64_decode, base64_encode } from '../base64';
import { bytify, debug } from '../util';
export const DISK_TYPES = ['dsk','d13','do','po','raw','nib','2mg'];
export var DISK_TYPES = ['dsk','d13','do','po','raw','nib','2mg'];
export default function DiskII(io, slot, callbacks)
{

View File

@ -1,3 +1,3 @@
const Apple2 = require('./main2');
var Apple2 = require('./main2');
module.exports = { Apple2 };
module.exports = { Apple2: Apple2 };

View File

@ -1,3 +1,3 @@
const Apple2 = require('./main2e');
var Apple2 = require('./main2e');
module.exports = { Apple2 };
module.exports = { Apple2: Apple2 };

View File

@ -149,7 +149,7 @@ function loadAjax(drive, url) {
}).then(function(data) {
if (data.type == 'binary') {
loadBinary(drive, data);
} else if (DISK_TYPES.includes(data.type)) {
} else if (DISK_TYPES.indexOf(data.type) > -1) {
loadDisk(drive, data);
}
initGamepad(data.gamepad);
@ -214,9 +214,9 @@ export function doDelete(name) {
function doLoadLocal(drive, file) {
var parts = file.name.split('.');
var ext = parts[parts.length - 1].toLowerCase();
if (DISK_TYPES.includes(ext)) {
if (DISK_TYPES.indexOf(ext) > -1) {
doLoadLocalDisk(drive, file);
} else if (TAPE_TYPES.includes(ext)) {
} else if (TAPE_TYPES.indexOf(ext) > -1) {
tape.doLoadLocalTape(file);
} else {
window.alert('Unknown file type: ' + ext);

View File

@ -144,7 +144,7 @@ function loadAjax(drive, url) {
}).then(function(data) {
if (data.type == 'binary') {
loadBinary(drive, data);
} else if (DISK_TYPES.includes(data.type)) {
} else if (DISK_TYPES.indexOf(data.type) > -1) {
loadDisk(drive, data);
}
initGamepad(data.gamepad);
@ -210,9 +210,9 @@ export function doDelete(name) {
function doLoadLocal(drive, file) {
var parts = file.name.split('.');
var ext = parts[parts.length - 1].toLowerCase();
if (DISK_TYPES.includes(ext)) {
if (DISK_TYPES.indexOf(ext) > -1) {
doLoadLocalDisk(drive, file);
} else if (TAPE_TYPES.includes(ext)) {
} else if (TAPE_TYPES.indexOf(ext) > -1) {
tape.doLoadLocalTape(file);
} else {
window.alert('Unknown file type: ' + ext);

View File

@ -12,7 +12,7 @@
import { debug } from '../util';
export const TAPE_TYPES = ['wav','aiff','aif','mp3','m4a'];
export var TAPE_TYPES = ['wav','aiff','aif','mp3','m4a'];
export default function Tape(io) {
var AudioContext = window.AudioContext || window.webkitAudioContext;