h5-cli
Version:
hello
502 lines (500 loc) • 14.2 kB
JavaScript
"use strict";
(function () {
function k() {
this.c = "1256805535";
this.R = "z";
this.N = "";
this.K = "";
this.M = "";
this.r = "1474270176";
this.P = "z11.cnzz.com";
this.L = "";
this.u = "CNZZDATA" + this.c;
this.t = "_CNZZDbridge_" + this.c;
this.F = "_cnzz_CV" + this.c;
this.G = "CZ_UUID" + this.c;
this.v = "0";
this.A = {};
this.a = {};
this.la();
}
function _g(a, b) {
// try {
// var c = [];
// c.push("siteid=1256805535");
// c.push("name=" + f(a.name));
// c.push("msg=" + f(a.message));
// c.push("r=" + f(h.referrer));
// c.push("page=" + f(e.location.href));
// c.push("agent=" + f(e.navigator.userAgent));
// c.push("ex=" + f(b));
// c.push("rnd=" + Math.floor(2147483648 * Math.random()));
// (new Image).src = "http://jserr.cnzz.com/log.php?" + c.join("&")
// } catch (d) {}
}
var h = document,
e = window,
f = encodeURIComponent,
l = decodeURIComponent,
n = unescape;
k.prototype = {
la: function la() {
try {
this.U(), this.J(), this.ia(), this.H(), this.o(), this.ga(), this.fa(), this.ja(), this.j(), this.ea(), this.ha(), this.ka(), this.ca(), this.aa(), this.da(), this.pa(), e[this.t] = e[this.t] || {}, this.ba("_cnzz_CV");
} catch (a) {
_g(a, "i failed");
}
},
na: function na() {
try {
var a = this;
e._czc = {
push: function push() {
return a.B.apply(a, arguments);
}
};
} catch (b) {
_g(b, "oP failed");
}
},
aa: function aa() {
try {
var a = e._czc;
if ("[object Array]" === {}.toString.call(a)) for (var b = 0; b < a.length; b++) {
var c = a[b];
switch (c[0]) {
case "_setAccount":
e._cz_account = "[object String]" === {}.toString.call(c[1]) ? c[1] : String(c[1]);
break;
case "_setAutoPageview":
"boolean" === typeof c[1] && (e._cz_autoPageview = c[1]);
}
}
} catch (d) {
_g(d, "cS failed");
}
},
pa: function pa() {
try {
if ("undefined" === typeof e._cz_account || e._cz_account === this.c) {
e._cz_account = this.c;
if ("[object Array]" === {}.toString.call(e._czc)) for (var a = e._czc, b = 0, c = a.length; b < c; b++) {
this.B(a[b]);
}this.na();
}
} catch (d) {
_g(d, "pP failed");
}
},
B: function B(a) {
try {
if ("[object Array]" === {}.toString.call(a)) switch (a[0]) {
case "_trackPageview":
if (a[1]) {
this.a.d = "https://" + e.location.host;
"/" !== a[1].charAt(0) && (this.a.d += "/");
this.a.d += a[1];
if ("" === a[2]) this.a.e = "";else if (a[2]) {
var b = a[2];
"http" !== b.substr(0, 4) && (b = "https://" + e.location.host, "/" !== a[2].charAt(0) && (b += "/"), b += a[2]);
this.a.e = b;
}
this.k();
"undefined" !== typeof this.a.e && delete this.a.e;
"undefined" !== typeof this.a.d && delete this.a.d;
}
break;
case "_trackEvent":
var c = [];
a[1] && a[2] && (c.push(f(a[1])), c.push(f(a[2])), c.push(a[3] ? f(a[3]) : ""), a[4] = parseFloat(a[4]), c.push(isNaN(a[4]) ? 0 : a[4]), c.push(a[5] ? f(a[5]) : ""), this.m = c.join("|"), this.k(), delete this.m);
break;
case "_setCustomVar":
if (3 <= a.length) {
if (!a[1] || !a[2]) return !1;
var d = a[1],
q = a[2],
h = a[3] || 0;
a = 0;
for (var l in this.a.b) {
a++;
}if (5 <= a) return !1;
var k;
k = 0 == h ? "p" : -1 == h || -2 == h ? h : new Date().getTime() + 1E3 * h;
this.a.b[d] = {};
this.a.b[d].S = q;
this.a.b[d].f = k;
this.w();
}
break;
case "_deleteCustomVar":
2 <= a.length && (d = a[1], this.a.b[d] && (delete this.a.b[d], this.w()));
break;
case "_trackPageContent":
a[1] && (this.s = a[1], this.k(), delete this.s);
case "_trackPageAction":
c = [];
a[1] && a[2] && (c.push(f(a[1])), c.push(f(a[2])), this.l = c.join("|"), this.k(), delete this.l);
break;
case "_setUUid":
var m = a[1];
if (128 < m.length) return !1;
var n = new Date();
n.setTime(n.getTime() + 157248E5);
this.sa(this.G, m, n);
}
} catch (p) {
_g(p, "aC failed");
}
},
da: function da() {
try {
var a = this.n(this.F),
b,
c;
this.a.b = {};
if (a) for (var d = a.split("&"), a = 0; a < d.length; a++) {
c = l(d[a]), b = c.split("|"), this.a.b[l(b[0])] = {}, this.a.b[l(b[0])].S = l(b[1]), this.a.b[l(b[0])].f = l(b[2]);
}
} catch (f) {
_g(f, "gCV failed");
}
},
V: function V() {
try {
var a = new Date().getTime(),
b;
for (b in this.a.b) {
"p" === this.a.b[b].f ? this.a.b[b].f = 0 : "-1" !== this.a.b[b].f && a > this.a.b[b].f && delete this.a.b[b];
}this.w();
} catch (c) {
_g(c, "cCV failed");
}
},
w: function w() {
try {
var a = [],
b,
c,
d;
for (d in this.a.b) {
var e = [];
e.push(d);
e.push(this.a.b[d].S);
e.push(this.a.b[d].f);
b = e.join("|");
a.push(b);
}
if (0 === a.length) return !0;
var k = new Date();
k.setTime(k.getTime() + 157248E5);
c = this.F + "=";
this.b = f(a.join("&"));
c += this.b;
c += "; expires=" + k.toUTCString();
h.cookie = c + "; path=/";
} catch (l) {
_g(l, "sCV failed");
}
},
ca: function ca() {
try {
if ("" !== e.location.hash) return this.D = e.location.href;
} catch (a) {
_g(a, "gCP failed");
}
},
j: function j() {
try {
return this.a.qa = h.referrer || "";
} catch (a) {
_g(a, "gR failed");
}
},
ea: function ea() {
try {
return this.a.p = e.navigator.systemLanguage || e.navigator.language, this.a.p = this.a.p.toLowerCase(), this.a.p;
} catch (a) {
_g(a, "gL failed");
}
},
ha: function ha() {
try {
return this.a.Q = e.screen.width && e.screen.height ? e.screen.width + "x" + e.screen.height : "0x0", this.a.Q;
} catch (a) {
_g(a, "gS failed");
}
},
o: function o() {
try {
return this.a.ma = this.g("ntime") || "none";
} catch (a) {
_g(a, "gLVST failed");
}
},
I: function I() {
try {
return this.a.T = this.g("ltime") || new Date().getTime();
} catch (a) {
_g(a, "gFVBT failed");
}
},
ga: function ga() {
try {
var a = this.g("cnzz_a");
if (null === a) a = 0;else {
var b = 1E3 * this.o(),
c = new Date();
c.setTime(b);
new Date().getDate() === c.getDate() ? a++ : a = 0;
}
return this.a.va = a;
} catch (d) {
_g(d, "gRT failed");
}
},
fa: function fa() {
try {
return this.a.q = this.g("rtime"), null === this.a.q && (this.a.q = 0), 0 < this.I() && 432E5 < new Date().getTime() - this.I() && (this.a.q++, this.a.T = new Date().getTime()), this.a.q;
} catch (a) {
_g(a, "gRVT failed");
}
},
ja: function ja() {
try {
return "none" === this.o() ? this.a.ua = 0 : this.a.ua = parseInt((new Date().getTime() - 1E3 * this.o()) / 1E3);
} catch (a) {
_g(a, "gST failed");
}
},
ia: function ia() {
try {
var a = this.g("sin") || "none";
if (!h.domain) return this.a.ta = "none";
this.j().split("/")[2] !== h.domain && (a = this.j());
return this.a.ta = a;
} catch (b) {
_g(b, "gS failed");
}
},
H: function H() {
try {
return this.a.i = this.g("cnzz_eid") || "none";
} catch (a) {
_g(a, "gC failed");
}
},
ra: function ra() {
try {
var a = "https://c.cnzz.com/core.php?",
b = [];
b.push("web_id=" + f(this.c));
this.N && b.push("show=" + f(this.N));
this.M && b.push("online=" + f(this.M));
this.K && b.push("l=" + f(this.K));
this.R && b.push("t=" + this.R);
a += b.join("&");
this.Y(a, "utf-8");
} catch (c) {
_g(c, "rN failed");
}
},
U: function U() {
try {
return !1 === e.navigator.cookieEnabled ? this.a.X = !1 : this.a.X = !0;
} catch (a) {
_g(a, "cCE failed");
}
},
sa: function sa(a, b, c, d, e, g) {
a = f(a) + "=" + f(b);
c instanceof Date && (a += "; expires=" + c.toGMTString());
d && (a += "; path=" + d);
e && (a += "; domain=" + e);
g && (a += "; secure");
h.cookie = a;
},
n: function n(a) {
try {
a += "=";
var b = h.cookie,
c = b.indexOf(a),
d = "";
if (-1 < c) {
var e = b.indexOf(";", c);-1 === e && (e = b.length);
d = l(b.substring(c + a.length, e));
}
return d ? d : "";
} catch (f) {
_g(f, "gAC failed");
}
},
ba: function ba(a) {
try {
h.cookie = a + "=; expires=" + new Date(0).toUTCString() + "; path=/";
} catch (b) {
_g(b, "dAC failed");
}
},
ka: function ka() {
try {
var a = h.title;
40 < a.length && (a = a.substr(0, 40), a += "...");
this.a.oa = a;
} catch (b) {
_g(b, "gT failed");
}
},
C: function C(a) {
try {
return "http" !== a.substr(0, 4) ? "" : /https:\/\/.*?\//i.exec(a);
} catch (b) {
_g(b, "cH failed");
}
},
J: function J() {
try {
var a = this.u,
b = {},
c = this.n(this.u);
if (0 < c.length) if (1E8 < this.c) {
var d = c.split("|");
b.cnzz_eid = l(d[0]);
b.ntime = l(d[1]);
} else for (var d = c.split("&"), e = 0, f = d.length; e < f; e++) {
var h = d[e].split("=");
b[l(h[0])] = l(h[1]);
}
this.A = b;
} catch (k) {
_g(k, "iC failed:" + a + ":" + c);
}
},
O: function O() {
try {
var a = this.u + "=",
b = [],
c = new Date();
c.setTime(c.getTime() + 157248E5);
if (1E8 < this.c) {
if ("none" !== this.a.i) b.push(f(this.a.i));else {
var d = Math.floor(2147483648 * Math.random()) + "-" + this.r + "-" + this.C(this.j());
b.push(f(d));
}
b.push(this.r);
0 < b.length ? (a += f(b.join("|")), a += "; expires=" + c.toUTCString(), a += "; path=/") : a += "; expires=" + new Date(0).toUTCString();
} else "none" !== this.a.i ? b.push("cnzz_eid=" + f(this.a.i)) : (d = Math.floor(2147483648 * Math.random()) + "-" + this.r + "-" + this.C(this.j()), b.push("cnzz_eid=" + f(d))), b.push("ntime=" + this.r), 0 < b.length ? (a += f(b.join("&")), a += "; expires=" + c.toUTCString(), a += "; path=/") : a += "; expires=" + new Date(0).toUTCString();
h.cookie = a;
} catch (e) {
_g(e, "sS failed");
}
},
g: function g(a) {
try {
return "undefined" !== typeof this.A[a] ? this.A[a] : null;
} catch (b) {
_g(b, "gCPa failed");
}
},
Y: function Y(a, b) {
try {
if (b = b || "utf-8", "1" === this.v) {
var c = h.createElement("script");
c.type = "text/javascript";
c.async = !0;
c.charset = b;
c.src = a;
var d = h.getElementsByTagName("script")[0];
d.parentNode && d.parentNode.insertBefore(c, d);
} else {
// \u4e3a\u4e86\u4e0d\u5f71\u54cd\u9875\u9762onload\u65f6\u95f4
var script = document.createElement("script");
script.src = a;
script.charset = b;
script.type = "text/javascript";
document.appendChild(script);
// h.write(n("%3Cscript src='" + a + "' charset='" + b + "' type='text/javascript'%3E%3C/script%3E"))
}
} catch (e) {
_g(e, "cAS failed");
}
},
$: function $(a, b) {
try {
var c = h.getElementById("cnzz_stat_icon_" + this.c);
if (c) {
var d = h.createElement("script");
d.type = "text/javascript";
d.async = !0;
d.charset = b;
d.src = a;
c.appendChild(d);
} else "0" === this.v && h.write(n("%3Cscript src='" + a + "' charset='" + b + "' type='text/javascript'%3E%3C/script%3E"));
} catch (e) {
_g(e, "cSI failed");
}
},
Z: function Z(a) {
try {
for (var b = a.length, c = "", d = 0; d < b; d++) {
a[d] && (c += n(a[d]));
}var e = h.getElementById("cnzz_stat_icon_" + this.c);
e ? e.innerHTML = c : "0" === this.v && h.write(c);
} catch (f) {
_g(f, "cI failed");
}
},
k: function k() {
try {
this.O();
this.J();
this.H();
this.V();
var a = this.n(this.G),
b = [];
b.push("id=" + f(this.c));
this.a.e || "" === this.a.e ? b.push("r=" + f(this.a.e)) : b.push("r=" + f(this.a.qa));
b.push("lg=" + f(this.a.p));
b.push("ntime=" + f(this.a.ma));
b.push("cnzz_eid=" + f(this.a.i));
b.push("showp=" + f(this.a.Q));
this.a.d ? b.push("p=" + f(this.a.d)) : "[object String]" === {}.toString.call(this.D) && b.push("p=" + f(this.D));
"[object String]" === {}.toString.call(this.m) && b.push("ei=" + f(this.m));
"[object String]" === {}.toString.call(this.b) && b.push("cv=" + this.b);
"[object String]" === {}.toString.call(this.s) && b.push("pc=" + f(this.s));
"[object String]" === {}.toString.call(this.l) && b.push("ai=" + this.l);
a && b.push("uuid=" + f(a));
b.push("t=" + f(this.a.oa));
b.push("h=1");
var c = b.join("&");
"[object String]" === {}.toString.call(this.m) ? this.h(["https://ei.cnzz.com/stat.htm?" + c]) : this.s || this.l ? this.h(["https://ca.cnzz.com/stat.htm?" + c]) : (this.L && this.h(["https://" + this.L + "/stat.htm?" + c]), this.P && this.h(["https://" + this.P + "/stat.htm?" + c]));
} catch (d) {
_g(d, "sD failed");
}
},
h: function h(a) {
try {
for (var b = a.length, c = null, d = 0; d < b; d++) {
a[d] && (c = "cnzz_image_" + Math.floor(2147483648 * Math.random()), e[c] = new Image(), e[c].W = c, e[c].onload = e[c].onerror = e[c].onabort = function () {
try {
this.onload = this.onerror = this.onabort = null, e[this.W] = null;
} catch (a) {}
}, e[c].src = a[d] + "&rnd=" + Math.floor(2147483648 * Math.random()));
}
} catch (f) {
_g(f, "cR failed");
}
}
};
try {
var m = new k();
e[m.t].bobject = m;
!1 !== e._cz_autoPageview ? m.k() : m.O();
k.prototype.getACookie = k.prototype.n;
k.prototype.callRequest = k.prototype.h;
k.prototype.createScriptIcon = k.prototype.$;
k.prototype.createIcon = k.prototype.Z;
m.ra();
} catch (p) {
_g(p, "main failed");
}
})();