From cf7a72242929544b8c80689e699f2d9aa3b72673 Mon Sep 17 00:00:00 2001 From: Zhora Shalyapin Date: Thu, 20 Mar 2025 12:52:08 +0000 Subject: [PATCH] refactor --- main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 19d359e..409276e 100644 --- a/main.js +++ b/main.js @@ -2015,13 +2015,19 @@ `) } - function prettifyRouteEditPage() { + function makeTextareasOneRowInRouteEditPage() { document.querySelectorAll(`textarea:is([name="track[comment_int]"], [name="track[comment_ext]"])`).forEach(el => { el.rows = 1 }) - + } + + function hideRedundantRowsInRouteEditPage() { document.querySelectorAll(`table tr:is(:nth-child(3), :nth-child(4), :nth-child(5))`).forEach(el => el.classList.add("hidden")) + } + function prettifyRouteEditPage() { + makeTextareasOneRowInRouteEditPage() + hideRedundantRowsInRouteEditPage() createPointsInpitForRouteEditPage() }