PageSourceSearch

https://dr0n1.github.io/js/duration.js

js dr0n1.github.io collected 2026-10-03 09:03:47 UTC 1,054 bytes, 31 lines download raw bytes

1!(function() {
2  /** 计时起始时间,自行修改 **/
3  var start = new Date("2021/06/01 00:00:00");
4
5  function update() {
6    var now = new Date();
7    now.setTime(now.getTime()+250);
8    days = (now - start) / 1000 / 60 / 60 / 24;
9    dnum = Math.floor(days);
10    hours = (now - start) / 1000 / 60 / 60 - (24 * dnum);
11    hnum = Math.floor(hours);
12    if(String(hnum).length === 1 ){
13      hnum = "0" + hnum;
14    }
15    minutes = (now - start) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
16    mnum = Math.floor(minutes);
17    if(String(mnum).length === 1 ){
18      mnum = "0" + mnum;
19    }
20    seconds = (now - start) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
21    snum = Math.round(seconds);
22    if(String(snum).length === 1 ){
23      snum = "0" + snum;
24    }
25    document.getElementById("timeDate").innerHTML = "本站安全运行&nbsp"+dnum+"&nbsp天";
26    document.getElementById("times").innerHTML = hnum + "&nbsp小时&nbsp" + mnum + "&nbsp分&nbsp" + snum + "&nbsp秒";
27  }
28
29  update();
30  setInterval(update, 1000);
31})();

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.