PageSourceSearch

https://anambasferry.com/promo.js

js anambasferry.com collected 2026-09-26 16:43:52 UTC 1,425 bytes, 48 lines download raw bytes

1var curday;
2var secTime;
3var ticker;
4 
5function getSeconds() {
6 var nowDate = new Date();
7 var dy = 6 ; //Sunday through Saturday, 0 to 6
8 var countertime = new Date(nowDate.getFullYear(),nowDate.getMonth(),nowDate.getDate(),20,0,0); //20 out of 24 hours = 8pm
9 
10 var curtime = nowDate.getTime(); //current time
11 var atime = countertime.getTime(); //countdown time
12 var diff = parseInt((atime - curtime)/1000);
13 if (diff > 0) { curday = dy - nowDate.getDay() }
14 else { curday = dy - nowDate.getDay() -1 } //after countdown time
15 if (curday < 0) { curday += 7; } //already after countdown time, switch to next week
16 if (diff <= 0) { diff += (86400 * 7) }
17 startTimer (diff);
18}
19 
20function startTimer(secs) {
21 secTime = parseInt(secs);
22 ticker = setInterval("tick()",1000);
23 tick(); //initial count display
24}
25 
26function tick() {
27 var secs = secTime;
28 if (secs>0) {
29  secTime--;
30 }
31 else {
32  clearInterval(ticker);
33  getSeconds(); //start over
34 }
35 
36 var days = Math.floor(secs/86400);
37 secs %= 86400;
38 var hours= Math.floor(secs/3600);
39 secs %= 3600;
40 var mins = Math.floor(secs/60);
41 secs %= 60;
42 
43 //update the time display
44 document.getElementById("days").innerHTML = curday;
45 document.getElementById("hours").innerHTML = ((hours < 10 ) ? "0" : "" ) + hours;
46 document.getElementById("minutes").innerHTML = ( (mins < 10) ? "0" : "" ) + mins;
47 document.getElementById("seconds").innerHTML = ( (secs < 10) ? "0" : "" ) + secs;
48}

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.