From d43ffbaefb30ad2630c30c29c1799a572f7d12dc Mon Sep 17 00:00:00 2001 From: dm5wk Date: Sun, 26 May 2024 20:21:38 +0200 Subject: [PATCH] change variable scope to block --- band-plan.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/band-plan.html b/band-plan.html index fe64d6c..7c9e358 100644 --- a/band-plan.html +++ b/band-plan.html @@ -39,7 +39,7 @@ div>label { function create_element_link(element, href) { element.addEventListener("click", () => { - var lnk = document.createElement('a'); + let lnk = document.createElement('a'); if (typeof href === "function") { lnk.href = href(); @@ -127,9 +127,9 @@ div>label { } function update_table(bases, extensions) { - var tdata = []; - var base_header = {}; - var ext_header = {}; + let tdata = []; + let base_header = {}; + let ext_header = {}; // first, fill base_header bases.forEach((base) => { @@ -208,7 +208,7 @@ div>label { // require in tabular-tables // eslint-disable-next-line no-undef - var table = new Tabulator("#data-table", { + let table = new Tabulator("#data-table", { layout: "fitDataTable", initialSort: [ {column: "frequency", dir: "asc"}, @@ -257,7 +257,7 @@ div>label { }); table.on("tableBuilt", () => { - var div_togglebuttons = document.getElementById("togglebuttons"); + let div_togglebuttons = document.getElementById("togglebuttons"); div_togglebuttons.innerHTML = "Toggle column:"; table.getColumns().forEach((col) => { let col_name = col.getField();