10 lines
481 B
JavaScript
10 lines
481 B
JavaScript
const kanjiTSVButton = document.getElementById("kanji-tsv-download-button");
|
|
const kotobaTSVButton = document.getElementById("kotoba-tsv-download-button");
|
|
const databaseButton = document.getElementById("database-download-button");
|
|
|
|
for (const button of [kanjiTSVButton, kotobaTSVButton, databaseButton]) {
|
|
button.addEventListener("click", () => {
|
|
const fileName = button.getAttribute("data-filename");
|
|
location.assign(`/static/download/${fileName}`);
|
|
});
|
|
} |