Update index.html

This commit is contained in:
The Ghost of FOSS' Future 2024-09-17 19:11:54 -05:00 committed by GitHub
parent ae036b662b
commit 53f2a80ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -333,13 +333,17 @@
};
function quickSaveFile(content) {
const fileName = prompt("File name to quick save as:", `${currentFile}`) || `${currentFile}`;
const fileName = prompt("File name to quick save as:", `${currentFile}`);
if (fileName) {
const blob = new Blob([content], { type: "text/plain" });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = fileName;
a.click();
URL.revokeObjectURL(a.href);
} else {
alert("No filename provided. Canceling save...")
}
}
async function saveAs(content) {