From 923676455ec3a22890150e9915004ea7dbb638d2 Mon Sep 17 00:00:00 2001 From: Kumi Date: Thu, 14 Nov 2024 16:54:16 +0100 Subject: [PATCH] fix(ui): hide "Previous page" inputs Replaces logic for hiding certain buttons with logic to hide inputs that start with "Previous page," avoiding redundant hiding of buttons. This refines UI behavior and improves code maintainability by correctly targeting elements to be hidden. --- global.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/global.js b/global.js index 9c46c78..f40f093 100644 --- a/global.js +++ b/global.js @@ -74,11 +74,15 @@ document.addEventListener("DOMContentLoaded", function () { $("button").each(function () { if ($(this).text().startsWith("Check")) { $(this).hide(); - } else if ($(this).text().startsWith("Previous page")) { - $(this).hide(); } }); + $("input").each(function () { + if ($(this).val().startsWith("Previous page")) { + $(this).hide(); + } + } + $("form").each(function () { const form = $(this);