const currentSearchParams = .location.search;

      document.addEventListener("DOMContentLoaded", () => {
        if (currentSearchParams) {
          const links = document.querySelectorAll("a");

          links.forEach((link) => {
            const hasParams = link.href.includes("?");
            link.href += (hasParams ? "&" : "?") + currentSearchParams.slice(1);
          });
        }
      });