PageSourceSearch

https://nglandscapingllc.com/js/principal/layout/footer.js

js nglandscapingllc.com collected 2026-10-08 09:44:28 UTC 1,835 bytes, 77 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2
3  /* ============= Update Opening Hours ============= */
4
5  const workingHoursFooter = {
6    monday: {
7      startTime: '7:00',
8      endTime: '18:00'
9    },
10    tuesday: {
11      startTime: '7:00',
12      endTime: '18:00'
13    },
14    wednesday: {
15      startTime: '7:00',
16      endTime: '18:00'
17    },
18    thursday: {
19      startTime: '7:00',
20      endTime: '18:00'
21    },
22    friday: {
23      startTime: '7:00',
24      endTime: '18:00'
25    },
26    saturday: {
27      startTime: '7:00',
28      endTime: '18:00'
29    },
30    sunday: {
31      startTime: '7:00',
32      endTime: '7:00',
33    },
34  };
35
36  const formatTimeFooter = (time24Hours) => {
37    const [hours, minutes] = time24Hours.split(':');
38    const formattedHours = hours % 12 || 12;
39    const period = hours >= 12 ? 'pm' : 'am';
40    return `${formattedHours}:${minutes} ${period}`;
41  };
42
43  const getCurrentUserDateFooter = () => {
44    const now = new Date();
45    const dayOfWeek = now.toLocaleDateString('en-US', {
46      weekday: 'long'
47    }).toLowerCase();
48    return {
49      dayOfWeek,
50      currentHour: now.getHours()
51    };
52  };
53
54
55  const updateServiceHours = () => {
56    const { dayOfWeek, currentHour } = getCurrentUserDateFooter();
57    const { startTime, endTime } = workingHoursFooter[dayOfWeek] || {};
58
59    const serviceHoursElement = document.getElementById('service_hours');
60
61    if (!startTime || !endTime) {
62      serviceHoursElement.textContent = 'Closed';
63      return;
64    }
65
66    const startHour = parseInt(startTime.split(':')[0]);
67    const endHour = parseInt(endTime.split(':')[0]);
68
69    serviceHoursElement.textContent =
70      currentHour < startHour || currentHour >= endHour
71        ? 'Closed'
72        : `${formatTimeFooter(startTime)} - ${formatTimeFooter(endTime)}`;
73  };
74
75  updateServiceHours();
76
77});

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.