PageSourceSearch

https://www.granhotellaperla.com/templates/cadenas/corporativaair/js/data-scroll.js

js granhotellaperla.com collected 2026-09-25 21:48:39 UTC 957 bytes, 28 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2  const scrollElements = document.querySelectorAll('[data-scroll]');
3  scrollElements.forEach((element, index) => {
4    element.setAttribute('data-scroll', index + 1);
5  });
6
7  const params = new URLSearchParams(window.location.search);
8  const scrollValue = params.get('scroll');
9  if (scrollValue) {
10    const target = document.querySelector(`[data-scroll="${scrollValue}"]`);
11    if (target) {
12      setTimeout(() => {
13        const top = target.getBoundingClientRect().top + window.scrollY - 90;
14        window.scrollTo({ top, behavior: 'smooth' });
15      }, 100);
16    }
17  }
18
19  window.listId = () => {
20    const data = [...document.querySelectorAll('[data-scroll]')].map(el => ({
21      dataScroll: el.dataset.scroll,
22      primeraClase: el.classList[0] || '(sin clase)',
23      url: `${window.location.pathname}?scroll=${el.dataset.scroll}`
24    }));
25    console.table(data);
26    return data;
27  };
28});

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.