feat: update index.html

This commit is contained in:
2025-09-12 10:33:40 -07:00
parent 1a0eb0c612
commit 65be667527

View File

@@ -111,17 +111,17 @@
.then(data => {
const a = document.createElement('a');
a.href = data.current_version.file.url;
a.download = a.href.split('/').pop();
a.download = a.href.split('/').pop().replace(/\.xpi$/, '.zip');
document.body.appendChild(a).click();
document.body.removeChild(a);
status.className = 'success';
status.textContent = `Download initiated for ${a.download}.`;
})
.catch(err => { status.className = 'error'; status.textContent = `Error: ${err.message}.`; })
.finally(() => setTimeout(() => { status.textContent = ''; status.className = ''; }, 5000));
.finally(() => setTimeout(() => status.textContent = status.className = '', 5000));
} catch (err) {
status.className = 'error'; status.textContent = 'Error: Invalid URL format.';
setTimeout(() => { status.textContent = ''; status.className = ''; }, 5000);
setTimeout(() => status.textContent = status.className = '', 5000);
}
});
</script>