Hi there Stackers, I stumbled upon this script and wanted to ask you what does it generally does. I've seen similar versions of it in several landing pages. My guess is it fires a pixel and reports to the owner that the lp was stolen? I'm cluless here.
Here's what the clean organized version looks like:
window.NREUM || (NREUM = {}), __nr_require = function(t, e, n) {
function r(n) {
if (!e[n]) {
var o = e[n] = {
exports: {}
};
t[n][0].call(o.exports, function(e) {
var o = t[n][1][e];
return r(o ? o : e)
}, o, o.exports)
}
return e[n].exports
}
if ("function" == typeof __nr_require) return __nr_require;
for (var o = 0; o < n.length; o++) r(n[o]);
return r
}({
QJf3ax: [function(t, e) {
function n(t) {
function e(e, n, a) {
t && t(e, n, a), a || (a = {});
for (var c = u(e), f = c.length, s = i(a, o, r), p = 0; f > p; p++) c[p].apply(s, n);
return s
}
function a(t, e) {
f[t] = u(t).concat(e)
}
function u(t) {
return f[t] || []
}
function c() {
return n(e)
}
var f = {};
return {
on: a,
emit: e,
create: c,
listeners: u,
_events: f
}
}
function r() {
return {}
}
var o = "nr@context",
i = t("gos");
e.exports = n()
}, {
gos: "7eSDFh"
}],
ee: [function(t, e) {
e.exports = t("QJf3ax")
}, {}],
gos: [function(t, e) {
e.exports = t("7eSDFh")
}, {}],
"7eSDFh": [function(t, e) {
function n(t, e, n) {
if (r.call(t, e)) return t[e];
var o = n();
if (Object.defineProperty && Object.keys) try {
return Object.defineProperty(t, e, {
value: o,
writable: !0,
enumerable: !1
}), o
} catch (i) {}
return t[e] = o, o
}
var r = Object.prototype.hasOwnProperty;
e.exports = n
}, {}],
D5DuLP: [function(t, e) {
function n(t, e, n) {
return r.listeners(t).length ? r.emit(t, e, n) : (o[t] || (o[t] = []), void o[t].push(e))
}
var r = t("ee").create(),
o = {};
e.exports = n, n.ee = r, r.q = o
}, {
ee: "QJf3ax"
}],
handle: [function(t, e) {
e.exports = t("D5DuLP")
}, {}],
XL7HBI: [function(t, e) {
function n(t) {
var e = typeof t;
return !t || "object" !== e && "function" !== e ? -1 : t === window ? 0 : i(t, o, function() {
return r++
})
}
var r = 1,
o = "nr@id",
i = t("gos");
e.exports = n
}, {
gos: "7eSDFh"
}],
id: [function(t, e) {
e.exports = t("XL7HBI")
}, {}],
loader: [function(t, e) {
e.exports = t("G9z0Bl")
}, {}],
G9z0Bl: [function(t, e) {
function n() {
var t = l.info = NREUM.info;
if (t && t.agent && t.licenseKey && t.applicationID && c && c.body) {
l.proto = "https" === p.split(":")[0] || t.sslForHttp ? "https://" : "http://", a("mark", ["onload", i()]);
var e = c.createElement("script");
e.src = l.proto + t.agent, c.body.appendChild(e)
}
}
function r() {
"complete" === c.readyState && o()
}
function o() {
a("mark", ["domContent", i()])
}
function i() {
return (new Date).getTime()
}
var a = t("handle"),
u = window,
c = u.document,
f = "addEventListener",
s = "attachEvent",
p = ("" + location).split("?")[0],
l = e.exports = {
offset: i(),
origin: p,
features: {}
};
c[f] ? (c[f]("DOMContentLoaded", o, !1), u[f]("load", n, !1)) : (c[s]("onreadystatechange", r), u[s]("onload", n)), a("mark", ["firstbyte", i()])
}, {
handle: "D5DuLP"
}]
}, {}, ["G9z0Bl"]);
Heh yeah false alarm bro, just real-user monitoring injected by NewRelic on to the page (to track user network timings, page load speed etc.). Nothing malicious or that the page owner has any control over.
aww that's a bummer. Thanks for letting me know!