PageSourceSearch

https://www.lomax.dk/dist/assets/search-pagination-Bjr7kicv.js

js lomax.dk collected 2026-10-02 19:37:42 UTC 1,658 bytes, 1 lines download raw bytes

1import{c as v}from"./main-MrFUfNQl.js";function w(r){r.querySelectorAll(".search-pagination-size").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.dataset.pagesize;if(!o)return;const i=new URL(window.location.href);i.searchParams.set("hits",o),i.searchParams.delete("page"),window.location.href=i.toString()})});const n=r.querySelector(".search-pagination-dropdown");if(!n)return r;const a=n.querySelector(".search-pagination-dropdown-toggle"),s=n.querySelector(".dropdown-menu"),g=n.querySelector(".search-pagination-choose-page"),f=n.querySelector(".search-pagination-input-template"),c=n.querySelector(".search-pagination-error"),p=parseInt(n.dataset.totalPages||"1");s?.querySelectorAll(".dropdown-item[data-page]").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const o=e.dataset.page;o&&d(o)})}),g?.addEventListener("click",()=>{a?.setAttribute("hidden","");const e=f?.content.cloneNode(!0);n.insertBefore(e,s);const t=n.querySelector(".search-pagination-page-input");t&&(t.focus(),h(t))});function h(e){e.addEventListener("keydown",t=>{t.key==="Enter"&&(t.preventDefault(),l(e)),t.key==="Escape"&&u(e)}),e.addEventListener("focusout",()=>{const t=e.value.trim();!t||t==="0"?u(e):l(e)})}function l(e){const t=parseInt(e.value);if(!Number.isInteger(t)||t<1||t>p){c?.removeAttribute("hidden"),e.focus();return}d(String(t))}function d(e){const t=new URL(window.location.href);t.searchParams.set("page",e),window.location.href=t.toString()}function u(e){e.remove(),a?.removeAttribute("hidden"),c?.setAttribute("hidden",""),a?.focus()}return r}function y(){v('[data-init="search-pagination"]',w)}export{y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.