From 6c45d14d213cd369b993a2797bd0a7229307ba1c Mon Sep 17 00:00:00 2001 From: Zhora Shalyapin Date: Wed, 19 Mar 2025 10:41:48 +0000 Subject: [PATCH] fix if not found --- main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 0db8c0a..3e160bf 100644 --- a/main.js +++ b/main.js @@ -746,7 +746,7 @@ } function toggleRows(rows, from, to, cycle, showIndex) { - for (let i = from; i < to; i = i + cycle) { + for (let i = from; i < to; i += cycle) { for (let j = 0; j < cycle; j++) { if (!showIndex.includes(j)) { rows[i + j]?.classList.toggle("collapsed") @@ -1849,6 +1849,9 @@ function toggleStagePageRows(rows) { let showIndex = [0, 3] let to = rows.findIndex(el => el.querySelector("th")?.textContent.trim() == "Бонусы") + if (to == -1) + to = rows.length + toggleRows(rows, 3, to, 8, showIndex) toggleRows(rows, to, rows.length, 1, []) }