1
0

Make prev an next buttons to ignore hidden rows.

This commit is contained in:
Alexander Andreev 2022-10-18 22:22:04 +04:00
parent ed17b83aae
commit d29eb84c3f
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -83,7 +83,8 @@ b_prev.addEventListener("click", e => {
g_current_row = g_last_row; g_current_row = g_last_row;
else else
g_current_row = g_current_row.previousSibling; g_current_row = g_current_row.previousSibling;
} while (!send_to_overlay(g_current_row.firstChild.firstChild.pathname, } while (g_current_row.classList.contains("hidden")
|| !send_to_overlay(g_current_row.firstChild.firstChild.pathname,
determine_media_element(g_current_row.firstChild.firstChild.pathname))); determine_media_element(g_current_row.firstChild.firstChild.pathname)));
e.preventDefault(); e.preventDefault();
}); });
@ -94,7 +95,9 @@ b_next.addEventListener("click", () => {
g_current_row = g_first_row; g_current_row = g_first_row;
else else
g_current_row = g_current_row.nextSibling; g_current_row = g_current_row.nextSibling;
} while (!send_to_overlay(g_current_row.firstChild.firstChild.pathname,
} while (g_current_row.classList.contains("hidden")
|| !send_to_overlay(g_current_row.firstChild.firstChild.pathname,
determine_media_element(g_current_row.firstChild.firstChild.pathname))); determine_media_element(g_current_row.firstChild.firstChild.pathname)));
}); });