From 8ab5faee8e686f79bca9f77c02fe2354bb5cb586 Mon Sep 17 00:00:00 2001 From: Will Scullin Date: Sun, 3 Oct 2021 11:08:46 -0700 Subject: [PATCH] Consistenly use hup to read hash --- js/ui/apple2.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ui/apple2.ts b/js/ui/apple2.ts index f168f91..4fb3988 100644 --- a/js/ui/apple2.ts +++ b/js/ui/apple2.ts @@ -195,7 +195,7 @@ export function handleDrop(drive: number, event: DragEvent) { for (let idx = 0; idx < dt.items.length; idx++) { if (dt.items[idx].type === 'text/uri-list') { dt.items[idx].getAsString(function (url) { - const parts = document.location.hash.split('|'); + const parts = hup().split('|'); parts[drive - 1] = url; document.location.hash = parts.join('|'); }); @@ -295,7 +295,7 @@ export function doLoad(event: MouseEvent|KeyboardEvent) { } else { filename = url; } - const parts = document.location.hash.split('|'); + const parts = hup().split('|'); parts[_currentDrive - 1] = filename; document.location.hash = parts.join('|'); } @@ -384,7 +384,7 @@ function doLoadLocalDisk(drive: DriveNumber, file: File) { const name = parts.join('.'); // Remove any json file reference - const files = document.location.hash.split('|'); + const files = hup().split('|'); files[drive - 1] = ''; document.location.hash = files.join('|');