PageSourceSearch

https://villademerlo.com/wp-content/plugins/grid-rotativa/js/grid-rotativa.js?ver=2.0

js villademerlo.com collected 2026-09-24 13:35:02 UTC 965 bytes, 33 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2  const grid = document.getElementById("gridRotativa");
3  if (!grid) return;
4
5  const items = Array.from(grid.children);
6  const total = items.length;
7  if (!total) return;
8
9  // Pedimos al servidor el contador global (equidad real)
10  const form = new FormData();
11  form.append("action", GridRotativa.action);
12
13  fetch(GridRotativa.ajaxurl, {
14    method: "POST",
15    body: form,
16    credentials: "same-origin",
17  })
18    .then(r => r.json())
19    .then(data => {
20      if (!data || !data.success) return;
21
22      const counter = parseInt(data.data.counter, 10) || 0;
23      const offset = counter % total;
24
25      const ordenado = items.slice(offset).concat(items.slice(0, offset));
26
27      grid.innerHTML = "";
28      ordenado.forEach(item => grid.appendChild(item));
29    })
30    .catch(() => {
31      // Si falla la llamada, no hacemos nada (queda el orden original)
32    });
33});

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.