From 7624a449dbca6d40fec6e616dacd4d34bb40be19 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 1 Oct 2023 21:09:38 +0200 Subject: web --- web/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'web/index.js') diff --git a/web/index.js b/web/index.js index d7c7d69..e7c619d 100644 --- a/web/index.js +++ b/web/index.js @@ -1,11 +1,9 @@ // python3 -m http.server const data_dir = 'data'; -//const index_file = "pmsl_t850.index.json"; const index_file = "index.json"; var index = null; -var product_index = null; var mapframe = null; function httpGetAsync(url, callback) @@ -26,13 +24,13 @@ function loadIndexFromJson(raw_text) { } function build_indexlist(index_obj) { - //if (index_obj==null) { - // return; - //} - div = document.createElement('div'); div.classList.add('index'); + title = document.createElement('h4'); + title.innerText = 'INIT+'; + div.appendChild(title); + list = document.createElement('ul'); for (const i in index_obj) { @@ -101,6 +99,10 @@ function build_product_index(raw_text) { div = document.createElement('div'); div.classList.add('product_index'); + title = document.createElement('h4'); + title.innerText = 'Products'; + div.appendChild(title); + list = document.createElement('ul'); for (const i in product_index) { -- cgit v1.2.3