From d891afbdf4f641c415dc352c46f72f47f787ba98 Mon Sep 17 00:00:00 2001 From: Zhora Shalyapin Date: Thu, 20 Mar 2025 12:34:22 +0000 Subject: [PATCH] colspan for finish message --- main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.js b/main.js index 0c83f54..19d359e 100644 --- a/main.js +++ b/main.js @@ -1894,10 +1894,19 @@ document.querySelector(`#content table table tr:nth-child(2) `).remove() } + function useColspanForFinishWarning() { + let rows = [...document.querySelectorAll(`#content > form > table > tbody > tr:nth-child(3) tr`)] + let finishRow = rows.find(el => el.querySelector(`td`)?.textContent.trim() == "Финиш маршрута") + + finishRow.querySelectorAll(`td:not(:nth-child(2))`).forEach(el => el.remove()) + finishRow.querySelector(`td`).colSpan = 4 + } + function prettifyRouteBuildPage() { changeColumnWidthForRouteBuildPage() hideDescriptionFromRouteBuildPage() hideStartRowFromRouteBuildPage() + useColspanForFinishWarning() } function matchNumberFromSelect(select) {