Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +4 -5
static/script.js
CHANGED
|
@@ -31,6 +31,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 31 |
const panelSeq = document.getElementById("panel-seq");
|
| 32 |
const panelFasta = document.getElementById("panel-fasta");
|
| 33 |
const downloadBtn = document.getElementById("downloadCsvBtn");
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
if (tabSeq && tabFasta && panelSeq && panelFasta) {
|
| 36 |
tabSeq.addEventListener("click", () => {
|
|
@@ -46,10 +49,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 46 |
panelFasta.classList.remove("hidden");
|
| 47 |
panelSeq.classList.add("hidden");
|
| 48 |
});
|
| 49 |
-
|
| 50 |
-
(downloadBtn) {
|
| 51 |
-
downloadBtn.addEventListener("click", downloadCSV);
|
| 52 |
-
});
|
| 53 |
}
|
| 54 |
|
| 55 |
// Buttons
|
|
@@ -423,4 +422,4 @@ function downloadCSV() {
|
|
| 423 |
.catch(err => {
|
| 424 |
alert("Download error: " + err.message);
|
| 425 |
});
|
| 426 |
-
}
|
|
|
|
| 31 |
const panelSeq = document.getElementById("panel-seq");
|
| 32 |
const panelFasta = document.getElementById("panel-fasta");
|
| 33 |
const downloadBtn = document.getElementById("downloadCsvBtn");
|
| 34 |
+
if (downloadBtn) {
|
| 35 |
+
downloadBtn.addEventListener("click", downloadCSV);
|
| 36 |
+
}
|
| 37 |
|
| 38 |
if (tabSeq && tabFasta && panelSeq && panelFasta) {
|
| 39 |
tabSeq.addEventListener("click", () => {
|
|
|
|
| 49 |
panelFasta.classList.remove("hidden");
|
| 50 |
panelSeq.classList.add("hidden");
|
| 51 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
// Buttons
|
|
|
|
| 422 |
.catch(err => {
|
| 423 |
alert("Download error: " + err.message);
|
| 424 |
});
|
| 425 |
+
}
|