PageSourceSearch

https://f1analytic.com/lib/countdown.js

js f1analytic.com collected 2026-10-03 17:53:46 UTC 1,814 bytes, 58 lines download raw bytes

1function calcage(secs, num1, num2) {
2  s = ((Math.floor(secs/num1))%num2).toString();
3  if (LeadingZero && s.length < 2)
4    s = "0" + s;
5  return "<b>" + s + "</b>";
6}
7
8function CountBack(secs) {
9  if (secs < 0) {
10    document.getElementById("cntdwn").innerHTML = FinishMessage;
11    return;
12  }
13  DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
14  DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
15  DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
16  DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
17
18  document.getElementById("cntdwn").innerHTML = DisplayStr;
19  if (CountActive)
20    setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod);
21}
22
23function putspan(backcolor, forecolor) {
24 document.write("<span id='cntdwn' style='background-color:" + backcolor + 
25                "; color:" + forecolor + "'></span>");
26}
27
28if (typeof(BackColor)=="undefined")
29  BackColor = "white";
30if (typeof(ForeColor)=="undefined")
31  ForeColor= "black";
32if (typeof(TargetDate)=="undefined")
33  TargetDate = "12/31/2020 5:00 AM";
34if (typeof(DisplayFormat)=="undefined")
35  DisplayFormat = "%%D%% äí. %%H%% : %%M%% : %%S%% ";
36if (typeof(CountActive)=="undefined")
37  CountActive = true;
38if (typeof(FinishMessage)=="undefined")
39  FinishMessage = "";
40if (typeof(CountStepper)!="number")
41  CountStepper = -1;
42if (typeof(LeadingZero)=="undefined")
43  LeadingZero = true;
44
45
46CountStepper = Math.ceil(CountStepper);
47if (CountStepper == 0)
48  CountActive = false;
49var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
50putspan(BackColor, ForeColor);
51var dthen = new Date(TargetDate);
52var dnow = new Date();
53if(CountStepper>0)
54  ddiff = new Date(dnow-dthen);
55else
56  ddiff = new Date(dthen-dnow);
57gsecs = Math.floor(ddiff.valueOf()/1000);
58CountBack(gsecs);

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.