PageSourceSearch

https://www.pastamancini.com/wp-content/themes/pastamancini-child/js/clock.js?ver=0.5.5

js pastamancini.com collected 2026-10-04 00:06:51 UTC 1,664 bytes, 43 lines download raw bytes

1function updateTime() {
2  if(document.getElementsByClassName("time").length > 0){
3    const dateInfo = new Date();
4
5    /* time */
6    let hr,
7      _min = (dateInfo.getMinutes() < 10) ? "0" + dateInfo.getMinutes() : dateInfo.getMinutes(),
8      sec = (dateInfo.getSeconds() < 10) ? "0" + dateInfo.getSeconds() : dateInfo.getSeconds(),
9      ampm = (dateInfo.getHours() >= 12) ? "PM" : "AM";
10    /* date */
11    const day = (dateInfo.getDay() < 10) ? "0" + dateInfo.getDay() : dateInfo.getDay(),
12      _month = (dateInfo.getMonth() < 10) ? "0" + dateInfo.getMonth() : dateInfo.getMonth();
13
14    // replace 0 with 12 at midnight, subtract 12 from hour if 13–23
15    if (dateInfo.getHours() == 0) {
16      hr = 24;
17    } else if (dateInfo.getHours()) {
18      hr = dateInfo.getHours();
19    } else {
20      hr = dateInfo.getHours();
21    }
22    hr = (hr<10) ? "0" + hr : hr;
23
24    const currentTime = hr + ":" + _min + ":" + sec;
25
26    // print time
27    document.getElementsByClassName("hms")[0].innerHTML = currentTime;
28    //document.getElementsByClassName("ampm")[0].innerHTML = ampm;
29    // store date
30    var today = new Date();
31    day_today = (today.getDate() < 10) ? "0" +  today.getDate() : today.getDate(),
32    month_today = ((today.getMonth()+1) < 10) ? "0" + (today.getMonth()+1) : (today.getMonth()+1);
33    var currentDate = day_today + '.' + month_today + '.' +today.getFullYear();
34    //var currentDate = day + "." + _month + "." + dateInfo.getFullYear();
35    document.getElementsByClassName("date")[0].innerHTML = currentDate;
36  }
37};
38
39// print time and date once, then update them every second
40updateTime();
41setInterval(function() {
42  updateTime();
43}, 1000);

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.