From 197d52964df96db7b0b03546a7647cd609e1dab2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 28 Jun 2022 05:07:00 +0400 Subject: [PATCH] These getElementsByTagName can be replaced with children field. --- web/assets/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/assets/js/main.js b/web/assets/js/main.js index 54ae859..c6c39ef 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -61,7 +61,7 @@ file_links.forEach(f => f.addEventListener('click', e => { //// SORT BY COLUMN const [thead_name, thead_date, thead_size] = document.getElementsByTagName('thead')[0] - .getElementsByTagName('tr')[0].getElementsByTagName('th'); + .children[0].children; const tbody = document.getElementsByTagName('tbody')[0]; let g_sort_reverse = false;