From 5b2404da3a15e2fb1f1604dfba70c8a7178614dd Mon Sep 17 00:00:00 2001 From: The Ghost of FOSS' Future <163201376+sneedgroup-holder@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:41:37 -0500 Subject: [PATCH] Update index.html --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4fd20f3..9b071fe 100644 --- a/index.html +++ b/index.html @@ -342,11 +342,12 @@ async function saveAs(content) { const blob = new Blob([content], { type: "text/plain" }); + const extension = currentFile.split(".").pop().toLowerCase(); const fileHandle = await window.showSaveFilePicker({ types: [ { description: "Source code", - accept: { "text/plain": [".txt"] }, + accept: { "text/plain": [`.${extension || "txt"}`] }, }, ], });