PageSourceSearch

https://www.toptechrivals.com/_upload/tpl/01/38/312/template312/js/time.js

js toptechrivals.com collected 2026-10-04 09:08:40 UTC 4,028 bytes, 79 lines download raw bytes

1(function(y, g) {
2    Date.prototype.format = function(a) {
3        var d = {
4            "M+": this.getMonth() + 1,
5            "d+": this.getDate(),
6            "h+": this.getHours(),
7            "m+": this.getMinutes(),
8            "s+": this.getSeconds(),
9            "q+": Math.floor((this.getMonth() + 3) / 3),
10            S: this.getMilliseconds()
11        };
12        /(y+)/.test(a) && (a = a.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
13        for (var c in d)(new RegExp("(" + c + ")")).test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? d[c] : ("00" + d[c]).substr(("" + d[c]).length)));
14        return a
15    };
16    g.leftTime = function(a, d, c) {
17        function w(a) {
18            return -1 !=
19                a.indexOf("-") || -1 != a.indexOf("/") ? !0 : !1
20        }
21
22        function g(a) {
23            return /^(20|21|22|23|[0-1]\d):[0-5]\d$/.test(y.trim(a)) ? !0 : !1
24        }
25
26        function r(a) {
27            10 > a && c && (a = "0" + a);
28            return a
29        }
30
31        function z() {
32            if ("string" === typeof a || "number" === typeof a) {
33                var b = (new Date).getTime(),
34                    c;
35                "string" === typeof a || 12 <= a.toString().length ? (a = "string" === typeof a && 1 == w(a) ? a.replace(/-/g, "/") : a, c = (new Date(a)).getTime(), b = c - b) : (c = a - A.count, b = 1E3 * c, A.count++);
36                0 < b ? (h = Math.floor(b / 1E3 / 60 / 60 / 24), k = Math.floor(b / 1E3 / 60 / 60 % 24), l = Math.floor(b / 1E3 / 60 % 60), m =
37                    Math.floor(b / 1E3 % 60), n = !0) : (window.clearInterval(e), m = l = k = h = 0, n = !1)
38            } else "object" === typeof a && (b = (new Date).getTime() + (0 < t ? -1 * t : Math.abs(t)), c = 0, u < f ? (c = f, v = 1) : u >= f && u < p ? (c = p, v = 2) : u >= p && (v = 3), b = c - b, 0 < b ? (h = Math.floor(b / 1E3 / 60 / 60 / 24), k = Math.floor(b / 1E3 / 60 / 60 % 24), l = Math.floor(b / 1E3 / 60 % 60), m = Math.floor(b / 1E3 % 60), n = !0) : (window.clearInterval(e), m = l = k = h = 0, n = !1));
39            b = {
40                d: r(h),
41                h: r(k),
42                m: r(l),
43                s: r(m)
44            };
45            b.status = n;
46            b.step = v;
47            if (d && "function" === typeof d) return d(b)
48        }
49        var e = this.timer;
50        c || 0 == c || (c = !0);
51        var A = {
52                count: 0
53            },
54            h = 0,
55            k = 0,
56            l = 0,
57            m = 0,
58            v = 0,
59            n = !1;
60        if ("object" === typeof a) {
61            a.init || 1 == a.init || (a.init = !1);
62            var t = 0,
63                x, q = 0;
64            if (0 != a.setday || "0" != a.setday) q = 864E5 * parseInt(a.setday);
65            a.nowdate && null != a.nowdate && void 0 != a.nowdate && "undefined" != a.nowdate ? (t = (new Date).getTime() - parseInt(a.nowdate), x = new Date(a.nowdate)) : (a.nowdate = (new Date).getTime(), x = new Date);
66            var q = new Date(parseInt(a.nowdate) + q),
67                f = 0,
68                p = 0;
69            0 == a.startdate || "0" == a.startdate || a.init || ("string" === typeof a.startdate ? w(a.startdate) ? f = (new Date(a.startdate.replace(/-/g, "/"))).getTime() :
70                g(a.startdate) && (f = (new Date(q.format("yyyy/MM/dd") + " " + a.startdate)).getTime()) : "number" === typeof a.startdate && (f = a.startdate));
71            if (0 != a.enddate || "0" != a.enddate) "string" === typeof a.enddate ? w(a.enddate) ? p = (new Date(a.enddate.replace(/-/g, "/"))).getTime() : g(a.enddate) && (p = (new Date(q.format("yyyy/MM/dd") + " " + a.enddate)).getTime()) : "number" === typeof a.enddate && (f = a.enddate);
72            var u = x.getTime()
73        }
74        z();
75        e = setInterval(z, 1E3);
76        if ("undefined" != e || null != e || void 0 != e) return e
77    };
78    y.extend(g)
79})(jQuery || zepto, {});

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.