// ========================== // Merge pagination fixes // ========================== document.addEventListener("DOMContentLoaded", function () { const fixPagination = () => { const container = document.querySelector("#s-srch-paginate-0-top"); if (!container) return; const ul = container.querySelector("ul[aria-label='Pagination of search results']"); if (ul) ul.removeAttribute("aria-label"); container.querySelectorAll("a[data-page]").forEach(link => { const text = link.textContent.trim(); let label = ""; if (text === ">") label = "Next page"; else if (text === "<") label = "Previous page"; else if (!isNaN(text)) label = "Go to page " + text; if (label && link.getAttribute("aria-label") !== label) { link.setAttribute("aria-label", label); } }); }; // Run once after short delay setTimeout(fixPagination, 500); // Observe for asynchronous changes const observer = new MutationObserver(fixPagination); observer.observe(document.body, { childList: true, subtree: true }); });
Skip to Main Content©2025 Houston Community College Libraries