一起分析下这段代码
本帖最后由 踏雪寻梅 于 2017-8-5 19:41 编辑<script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n){var o=n={exports:{}};e.call(o.exports,function(n){var o=e;return r(o||n)},o,o.exports)}return n.exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t);return r}({1:.concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(2),u=e(3),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined"==typeof window.newrelic&&(newrelic=s);var p=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],d="api-",l=d+"ixn-";a(p,function(e,n){s=o(d+n,!0,"api")}),s.addPageAction=o(d+"addPageAction",!0),s.setCurrentRouteName=o(d+"routeName",!0),n.exports=newrelic,s.interaction=function(){return(new r).get()};var m=r.prototype={createTracer:function(e,n){var t={},r=this,o="function"==typeof n;return i(l+"tracer",,r),function(){if(f.emit((o?"":"no-")+"fn-start",,t),o)try{return n.apply(this,arguments)}finally{f.emit("fn-end",,t)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,n){m=o(l+n)}),newrelic.noticeError=function(e){"string"==typeof e&&(e=new Error(e)),i("err",)}},{}],2:,r="",i=0;for(r in e)o.call(e,r)&&(t=n(r,e),i+=1);return t}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],3:=e;return i}n.exports=r},{}],4:,ee:.apply(a,r);var p=s];return p&&p.push(),a}}function l(e,n){v=m(e).concat(n)}function m(e){return v||[]}function w(e){return p=p||o(t)}function g(e,n){c(e,function(e,t){n=n||"feature",y=n,n in s||(s=[])})}var v={},y={},b={on:l,emit:t,get:w,listeners:m,context:n,buffer:g,abort:a,aborted:!1};return b}function i(){return new r}function a(){(s.api||s.feature)&&(d.aborted=!0,s=d.backlog={})}var u="nr@context",f=e("gos"),c=e(2),s={},p={},d=n.exports=o();d.backlog=s},{}],gos:;var r=t();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e=r,r}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],handle:,r),o.emit(e,n,t)}var o=e("ee").get("handle");n.exports=r,r.ee=o},{}],id:,loader:;if(setTimeout(s.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&n))return s.abort();c(y,function(n,t){e||(e=t)}),f("mark",["onload",a()+h.offset],null,"api");var t=d.createElement("script");t.src="https://"+e.agent,n.parentNode.insertBefore(t,n)}}function o(){"complete"===d.readyState&&i()}function i(){f("mark",["domContent",a()+h.offset],null,"api")}function a(){return E.exists&&performance.now?Math.round(performance.now()):(u=Math.max((new Date).getTime(),u))-h.offset}var u=(new Date).getTime(),f=e("handle"),c=e(2),s=e("ee"),p=window,d=p.document,l="addEventListener",m="attachEvent",w=p.XMLHttpRequest,g=w&&w.prototype;NREUM.o={ST:setTimeout,SI:p.setImmediate,CT:clearTimeout,XHR:w,REQ:p.Request,EV:p.Event,PR:p.Promise,MO:p.MutationObserver};var v=""+location,y={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1044.min.js"},b=w&&g&&g&&!/CriOS/.test(navigator.userAgent),h=n.exports={offset:u,now:a,origin:v,features:{},xhrWrappable:b};e(1),d?(d("DOMContentLoaded",i,!1),p("load",r,!1)):(d("onreadystatechange",o),p("onload",r)),f("mark",["firstbyte",u],null,"api");var x=0,E=e(4)},{}]},{},["loader"]);</script> 就不能格式化一下再发吗= - <script type="text/javascript">window.NREUM || (NREUM = {}),
__nr_require = function(e, n, t) {
function r(t) {
if (!n) {
var o = n = {
exports: {}
};
e.call(o.exports,
function(n) {
var o = e;
return r(o || n)
},
o, o.exports)
}
return n.exports
}
if ("function" == typeof __nr_require) return __nr_require;
for (var o = 0; o < t.length; o++) r(t);
return r
} ({
1 : [function(e, n, t) {
function r() {}
function o(e, n, t) {
return function() {
return i(e, .concat(u(arguments)), n ? null: this, t),
n ? void 0 : this
}
}
var i = e("handle"),
a = e(2),
u = e(3),
f = e("ee").get("tracer"),
c = e("loader"),
s = NREUM;
"undefined" == typeof window.newrelic && (newrelic = s);
var p = ["setPageViewName", "setCustomAttribute", "setErrorHandler", "finished", "addToTrace", "inlineHit", "addRelease"],
d = "api-",
l = d + "ixn-";
a(p,
function(e, n) {
s = o(d + n, !0, "api")
}),
s.addPageAction = o(d + "addPageAction", !0),
s.setCurrentRouteName = o(d + "routeName", !0),
n.exports = newrelic,
s.interaction = function() {
return (new r).get()
};
var m = r.prototype = {
createTracer: function(e, n) {
var t = {},
r = this,
o = "function" == typeof n;
return i(l + "tracer", , r),
function() {
if (f.emit((o ? "": "no-") + "fn-start", , t), o) try {
return n.apply(this, arguments)
} finally {
f.emit("fn-end", , t)
}
}
}
};
a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),
function(e, n) {
m = o(l + n)
}),
newrelic.noticeError = function(e) {
"string" == typeof e && (e = new Error(e)),
i("err", )
}
},
{}],
2 : [function(e, n, t) {
function r(e, n) {
var t = [],
r = "",
i = 0;
for (r in e) o.call(e, r) && (t = n(r, e), i += 1);
return t
}
var o = Object.prototype.hasOwnProperty;
n.exports = r
},
{}],
3 : [function(e, n, t) {
function r(e, n, t) {
n || (n = 0),
"undefined" == typeof t && (t = e ? e.length: 0);
for (var r = -1,
o = t - n || 0,
i = Array(o < 0 ? 0 : o); ++r < o;) i = e;
return i
}
n.exports = r
},
{}],
4 : [function(e, n, t) {
n.exports = {
exists: "undefined" != typeof window.performance && window.performance.timing && "undefined" != typeof window.performance.timing.navigationStart
}
},
{}],
ee: [function(e, n, t) {
function r() {}
function o(e) {
function n(e) {
return e && e instanceof r ? e: e ? f(e, u, i) : i()
}
function t(t, r, o, i) {
if (!d.aborted || i) {
e && e(t, r, o);
for (var a = n(o), u = m(t), f = u.length, c = 0; c < f; c++) u.apply(a, r);
var p = s];
return p && p.push(),
a
}
}
function l(e, n) {
v = m(e).concat(n)
}
function m(e) {
return v || []
}
function w(e) {
return p = p || o(t)
}
function g(e, n) {
c(e,
function(e, t) {
n = n || "feature",
y = n,
n in s || (s = [])
})
}
var v = {},
y = {},
b = {
on: l,
emit: t,
get: w,
listeners: m,
context: n,
buffer: g,
abort: a,
aborted: !1
};
return b
}
function i() {
return new r
}
function a() { (s.api || s.feature) && (d.aborted = !0, s = d.backlog = {})
}
var u = "nr@context",
f = e("gos"),
c = e(2),
s = {},
p = {},
d = n.exports = o();
d.backlog = s
},
{}],
gos: [function(e, n, t) {
function r(e, n, t) {
if (o.call(e, n)) return e;
var r = t();
if (Object.defineProperty && Object.keys) try {
return Object.defineProperty(e, n, {
value: r,
writable: !0,
enumerable: !1
}),
r
} catch(i) {}
return e = r,
r
}
var o = Object.prototype.hasOwnProperty;
n.exports = r
},
{}],
handle: [function(e, n, t) {
function r(e, n, t, r) {
o.buffer(, r),
o.emit(e, n, t)
}
var o = e("ee").get("handle");
n.exports = r,
r.ee = o
},
{}],
id: [function(e, n, t) {
function r(e) {
var n = typeof e;
return ! e || "object" !== n && "function" !== n ? -1 : e === window ? 0 : a(e, i,
function() {
return o++
})
}
var o = 1,
i = "nr@id",
a = e("gos");
n.exports = r
},
{}],
loader: [function(e, n, t) {
function r() {
if (!x++) {
var e = h.info = NREUM.info,
n = d.getElementsByTagName("script");
if (setTimeout(s.abort, 3e4), !(e && e.licenseKey && e.applicationID && n)) return s.abort();
c(y,
function(n, t) {
e || (e = t)
}),
f("mark", ["onload", a() + h.offset], null, "api");
var t = d.createElement("script");
t.src = "https://" + e.agent,
n.parentNode.insertBefore(t, n)
}
}
function o() {
"complete" === d.readyState && i()
}
function i() {
f("mark", ["domContent", a() + h.offset], null, "api")
}
function a() {
return E.exists && performance.now ? Math.round(performance.now()) : (u = Math.max((new Date).getTime(), u)) - h.offset
}
var u = (new Date).getTime(),
f = e("handle"),
c = e(2),
s = e("ee"),
p = window,
d = p.document,
l = "addEventListener",
m = "attachEvent",
w = p.XMLHttpRequest,
g = w && w.prototype;
NREUM.o = {
ST: setTimeout,
SI: p.setImmediate,
CT: clearTimeout,
XHR: w,
REQ: p.Request,
EV: p.Event,
PR: p.Promise,
MO: p.MutationObserver
};
var v = "" + location,
y = {
beacon: "bam.nr-data.net",
errorBeacon: "bam.nr-data.net",
agent: "js-agent.newrelic.com/nr-1044.min.js"
},
b = w && g && g && !/CriOS/.test(navigator.userAgent),
h = n.exports = {
offset: u,
now: a,
origin: v,
features: {},
xhrWrappable: b
};
e(1),
d ? (d("DOMContentLoaded", i, !1), p("load", r, !1)) : (d("onreadystatechange", o), p("onload", r)),
f("mark", ["firstbyte", u], null, "api");
var x = 0,
E = e(4)
},
{}]
},
{},
["loader"]);</script> 这种光找字母就头疼死 函数和变量全是单字母,看的想死 头大,结合使用环境还好理解点... 帮你顶上,寻求大佬看吧 看着就头痛啊。
页:
[1]