PageSourceSearch

https://jacyzhotel.com/wp-content/plugins/Custom2/assets/js/book-with-us-mobile.js?ver=1.0.0

js jacyzhotel.com collected 2026-10-05 06:05:11 UTC 1,265 bytes, 35 lines download raw bytes

1/**
2 * BookWithUs Mobile Slider Helper
3 * Calculates the distance the feature line needs to slide so that the first and last items are fully visible.
4 */
5(function () {
6  function calculateSlideDistance() {
7    const lines = document.querySelectorAll('.mobile-content-line');
8    lines.forEach((line) => {
9      const container = line.closest('.book-with-us-carousel');
10      if (!container) return;
11      
12      const contentWidth = line.scrollWidth;
13      const containerWidth = container.clientWidth;
14      const diff = contentWidth - containerWidth;
15      const distance = diff > 0 ? diff + 80 : 120;
16      line.style.setProperty('--slide-distance', distance + 'px');
17
18      const baseDuration = 16;
19      const extraDuration = Math.max(0, Math.round(distance / 80));
20      const totalDuration = baseDuration + extraDuration;
21      line.style.setProperty('--slide-duration', totalDuration + 's');
22    });
23  }
24
25  if (document.readyState === 'loading') {
26    document.addEventListener('DOMContentLoaded', calculateSlideDistance);
27  } else {
28    calculateSlideDistance();
29  }
30  
31  window.addEventListener('resize', function() {
32    clearTimeout(window.bookWithUsResizeTimer);
33    window.bookWithUsResizeTimer = setTimeout(calculateSlideDistance, 250);
34  });
35})(); 

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.