Skip to content

Commit

Permalink
Fix decrypt page
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar1jn committed Aug 30, 2023
1 parent c9e74b6 commit 2b3f621
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/skylanders/decrypt.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Layout from "@layouts/Layout.astro";
<label for="file">File</label>
<input id="file" type="file">
<input type="submit" value="Decrypt">
<a id="file-download" style="display: none;" data-astro-reload />
</form>
</Section>
<Section>
Expand Down Expand Up @@ -124,13 +125,10 @@ import Layout from "@layouts/Layout.astro";
fileName += `${(k == 0)? "" : "."}${fileParts[k]}`;
}

const a = document.createElement("a");
let a = document.getElementById("file-download") as HTMLAnchorElement;
a.href = url;
a.download = fileName;
document.body.appendChild(a);
a.style.display = "none";
a.click();
a.remove();

setTimeout(() => window.URL.revokeObjectURL(url), 1000);

Expand Down

0 comments on commit 2b3f621

Please sign in to comment.