From 412b1f45ac39ee68f8812ae23df729d86d913e55 Mon Sep 17 00:00:00 2001 From: SimolZimol <70102430+SimolZimol@users.noreply.github.com> Date: Thu, 11 Dec 2025 22:34:10 +0100 Subject: [PATCH] modified: script.js --- script.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/script.js b/script.js index 9195b41..3d6cd56 100644 --- a/script.js +++ b/script.js @@ -548,25 +548,19 @@ class MinecraftChatParser { } const mapInfo = this.currentChatInfo.mapDownload; - const mapUrl = `./maps/${mapInfo.filename}`; + // Nutze mapInfo.url, falls vorhanden, sonst lokalen Pfad + const mapUrl = mapInfo.url ? mapInfo.url : `./maps/${mapInfo.filename}`; + const downloadName = mapInfo.url ? mapInfo.url.split('/').pop() : mapInfo.filename; // Create temporary download link const downloadLink = document.createElement('a'); downloadLink.href = mapUrl; - downloadLink.download = mapInfo.filename; + downloadLink.download = downloadName; downloadLink.style.display = 'none'; document.body.appendChild(downloadLink); downloadLink.click(); document.body.removeChild(downloadLink); - - // Show feedback - const originalText = this.downloadMap.innerHTML; - this.downloadMap.innerHTML = '⬇️ Downloading...'; - - setTimeout(() => { - this.downloadMap.innerHTML = originalText; - }, 2000); } }