diff --git a/src/components/DownloadButton.astro b/src/components/DownloadButton.astro
index 248a9f6..010d22f 100644
--- a/src/components/DownloadButton.astro
+++ b/src/components/DownloadButton.astro
@@ -15,13 +15,17 @@ const { t } = await getI18n(Astro.locals.currentLocale);
{/* ------------------------------------------- HTML ------------------------------------------- */}
-
-
-
+{
+ useBlob ? (
+
+
+
+ ) : (
+
+
+
+ )
+}
{/* ------------------------------------------- JS --------------------------------------------- */}
@@ -31,19 +35,13 @@ const { t } = await getI18n(Astro.locals.currentLocale);
customElement("download-button", (elem) => {
const href = elem.getAttribute("href");
const filename = elem.getAttribute("filename");
- const useBlob = elem.hasAttribute("data-use-blob");
if (!href || !filename) return;
elem.addEventListener("click", async () => {
- let url;
- if (useBlob) {
- const res = await fetch(href);
- const blob = await res.blob();
- url = window.URL.createObjectURL(blob);
- } else {
- url = href;
- }
+ const res = await fetch(href);
+ const blob = await res.blob();
+ const url = window.URL.createObjectURL(blob);
var link = document.createElement("a");
link.download = filename;