PageSourceSearch

https://detallesorballo.com/wp-content/plugins/detallesorballo/assets/js/frontend.js?ver=1.0.0

js detallesorballo.com collected 2026-09-26 14:40:32 UTC 1,732 bytes, 64 lines download raw bytes

1(function () {
2	'use strict';
3
4	const paginate = (pages, selector) => {
5		const currentPageIndex = pages.findIndex(page => page.current);
6		const previousHtml = currentPageIndex === 0 ? '' : `<li class="previous">
7			${pages[0].current ? `
8				<span>←</span>
9			` : `
10				<a href="${pages[currentPageIndex - 1].url}">←</a>
11			`}</li>`;
12		const nextHtml = currentPageIndex === pages.length ? '' : `<li class="next">
13			${pages[pages.length - 1].current ? `
14				<span>→</span>
15			` : `
16				<a href="${pages[currentPageIndex + 1].url}">→</a>
17			`}</li>`;
18		const html = `
19			<ul class="pagination-list">
20				${previousHtml}
21				${pages.map((item, index) => {
22			if (index < currentPageIndex - 1 || index > currentPageIndex + 1) {
23				return '';
24			}
25			return `<li${item.current ? ' class="current"' : ''}>
26						${item.current ? `
27							<span>${index + 1}</span>
28						` : `
29							<a href="${item.url}">${index + 1}</a>
30						`}
31					</li>`;
32		}).join('')}
33				${nextHtml}
34			</ul>
35		`
36
37		document.querySelector(selector).innerHTML = html
38	}
39
40	document.addEventListener('DOMContentLoaded', function () {
41		if ('undefined' === typeof detallesOrballoPagination) {
42			return;
43		}
44
45		const recordsFiltered = parseInt(detallesOrballoPagination.total);
46		const pageSize = parseInt(detallesOrballoPagination.pageSize);
47		const page = parseInt(detallesOrballoPagination.current);
48		const totalPages = recordsFiltered ? Math.ceil(recordsFiltered / pageSize) : 1;
49
50		const pages = [];
51		for (let i = 1; i <= totalPages; i++) {
52
53			const url = new URL(window.location);
54			url.searchParams.set('pagenumber', i);
55
56			pages.push({
57				current: i === page,
58				url: url.href
59			});
60		}
61		paginate(pages, '.pagination-links');
62	});
63
64})();

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.