Skip to content

Instantly share code, notes, and snippets.

@ivarvong
Created September 7, 2015 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ivarvong/32599c1d0982c2df089e to your computer and use it in GitHub Desktop.
Save ivarvong/32599c1d0982c2df089e to your computer and use it in GitHub Desktop.
(function() {
function sendAccounting(o, t) {
o = o || 1;
t = t || 0;
var e = new Image;
11 == t || C && 6 == t || (e.src = "http://107.14.53.76:80/" + o + "-148/60cc0b86-ca19-46a7-a583-8d0313a6999a_10.144.164.16/" + t + "." + (f + u));
return e
}
function o(o) {
return C ? "http://107.14.53.76/Check/2/148/60cc0b86-ca19-46a7-a583-8d0313a6999a/10.144.164.16/nubyrq" : 1 == o && "http://107.14.53.76/CheckUrl/1/148"
}
function t(t) {
var r, i = Math.floor(1e3 * u),
n = "fp",
s = n + i,
l = "158f29b47d38bec034f5206de4356f6342c752e9",
a = "_!$[]fp60cc0b86-ca19-46a7-a583-8d0313a6999a[]$!_";
if (C && g - C > 54e5) return 11;
"string" == typeof t.jsURI && (t.jsURI = [t.jsURI]);
if (B[a] === l) return 1;
B[a] = l;
if (t.requireTopWindow && B != top) return 2;
if (t.requireObjectHasOwnProperty && !Object.prototype.hasOwnProperty) return 3;
if (t.json) {
if ("string" == typeof t.json) try {
t.json = B.eval("(" + t.json + ")")
} catch (_) {
return 4
}
t.json.minimum_width = t.minWidth = t.json.minimum_width || t.minWidth;
t.json.minimum_height = t.minHeight = t.json.minimum_height || t.minHeight;
t.json._accounting = {
stopTime: c,
sendAccounting: sendAccounting,
uri: "http://107.14.53.44/static",
check: o("%TOPURLMATCH%"),
direct: !1
}
}
if (!(t.json && "" === t.json.sprite_img || e(t.minHeight, t.minWidth))) return 5;
if (t.json2uri) {
for (; void 0 !== B[s];) s = n + ++i;
B[s] = t.json;
for (r = 0; t.jsURI.length > r; r++) t.jsURI[r] += (-1 !== t.jsURI[r].indexOf("?") ? "&" : "?") + s
}
}
function e(o, t) {
var e = T.documentElement || T.body || {},
r = B.innerWidth || e.clientWidth || 0,
i = B.innerHeight || e.clientHeight || 0;
return r >= o && i >= t || !(r + i)
}
function r() {
var o, e, r, i, l, a, _, d = (new Date).getTime(),
f = {
requireTopWindow: !0,
requireObjectHasOwnProperty: !0,
minWidth: 550,
minHeight: 400
};
r = function(o, t) {
return o === "@" + t ? null : o
};
i = function(o, t) {
if (null === r(o, t)) return null;
o = o.toLowerCase();
if ("true" == o) return !0;
if ("false" == o) return !1;
o = l(o, t);
null !== o && (o = !!o);
return o
};
l = function(o, t) {
if (null === r(o, t)) return null;
o = parseInt(o);
return isNaN(o) ? null : o
};
a = function(o, t) {
if (null === r(o, t)) return null;
o = parseFloat(o);
return isNaN(o) ? null : o
};
_ = function(o, t) {
return null === r(o, t) ? null : o.split(",")
};
f.jsURI = "http://107.14.53.44/static/FloatingContent/BIFFOQOnv5e8ZK7aEW-Oag/floating-frame.js";
f.json = {
allow_content_scroll: i("0", "AllowContentScroll"),
allow_content_transparency: i("1", "AllowContentTransparency"),
anchor_corner: r("se", "AnchorCorner"),
animate_in_duration: a("0.5", "AnimateInDuration"),
animate_out_duration: a("0.5", "AnimateOutDuration"),
animation_properties: _("position", "AnimationProperties"),
auto_scale_mobile: i("1", "AutoScaleMobile"),
allow_mobile_app: i("1", "AllowMobileApp"),
border_bottom_color: r("", "BorderBottomColor"),
border_bottom_position: r("", "BorderBottomPosition"),
border_bottom_repeat: r("", "BorderBottomRepeat"),
border_bottom_width: l("0", "BorderBottomWidth"),
border_left_color: r("", "BorderLeftColor"),
border_left_position: r("", "BorderLeftPosition"),
border_left_repeat: r("", "BorderLeftRepeat"),
border_left_width: l("0", "BorderLeftWidth"),
border_right_color: r("", "BorderRightColor"),
border_right_position: r("", "BorderRightPosition"),
border_right_repeat: r("", "BorderRightRepeat"),
border_right_width: l("0", "BorderRightWidth"),
border_top_color: r("", "BorderTopColor"),
border_top_position: r("", "BorderTopPosition"),
border_top_repeat: r("", "BorderTopRepeat"),
border_top_width: l("0", "BorderTopWidth"),
bottom_align: r("", "BottomAlign"),
bottom_color: r("", "BottomColor"),
bottom_decoration: r("", "BottomDecoration"),
bottom_font_size: r("", "BottomFontSize"),
bottom_font_weight: r("", "BottomFontWeight"),
bottom_letter_spacing: a("0", "BottomLetterSpacing"),
bottom_offset_left: l("0", "BottomOffsetLeft"),
bottom_offset_right: l("0", "BottomOffsetRight"),
bottom_offset_vertical: l("0", "BottomOffsetVertical"),
bottom_text: r("", "BottomText"),
bottom_word_spacing: a("0", "BottomWordSpacing"),
close_align: r("", "CloseAlign"),
close_alt_text: r("", "CloseWindowText"),
close_height: l("0", "CloseHeight"),
close_horizontal_padding: l("0", "CloseHorizontalPadding"),
close_hover_position: r("", "CloseHoverPosition"),
close_position: r("", "ClosePosition"),
close_vertical_offset: l("0", "CloseVerticalOffset"),
close_width: l("0", "CloseWidth"),
content_url: r(s("http://twccontent.nnu.com/214773d9-c72f-45ba-9d06-bdfdd3fdc0c7/index.html"), "ContentURL"),
delay_duration: a("6", "DelayDuration"),
horizontal_offset: l("10", "HorizontalOffset"),
message_html: r('', "MessageHTML"),
minimum_height: l("200", "MinimumHeight"),
minimum_width: l("200", "MinimumWidth"),
ne_corner_position: r("", "NeCornerPosition"),
ne_corner_width: l("0", "NeCornerWidth"),
nw_corner_position: r("", "NwCornerPosition"),
nw_corner_width: l("0", "NwCornerWidth"),
opaque_outer_frame: i("0", "OpaqueOuterFrame"),
outer_height: l("200", "Height"),
outer_width: l("320", "Width"),
require_full_page_load: i("0", "RequireFullPageLoad"),
se_corner_position: r("", "SeCornerPosition"),
se_corner_width: l("0", "SeCornerWidth"),
sprite_img: r("", "SpriteImg"),
sw_corner_position: r("", "SwCornerPosition"),
sw_corner_width: l("0", "SwCornerWidth"),
top_align: r("", "TopAlign"),
top_color: r("", "TopColor"),
top_decoration: r("", "TopDecoration"),
top_font_size: r("", "TopFontSize"),
top_font_weight: r("", "TopFontWeight"),
top_letter_spacing: a("0", "TopLetterSpacing"),
top_offset_left: l("0", "TopOffsetLeft"),
top_offset_right: l("0", "TopOffsetRight"),
top_offset_vertical: l("0", "TopOffsetVertical"),
top_text: r("", "WindowTitle"),
top_word_spacing: a("0", "TopWordSpacing"),
vertical_offset: l("10", "VerticalOffset"),
visible_duration: a("31", "VisibleDuration")
};
var h = r("", "TextColor"),
g = r("", "FrameColor");
g && (f.json.border_top_color = f.json.border_right_color = f.json.border_bottom_color = f.json.border_left_color = g);
h && (f.json.top_color = f.json.bottom_color = h);
f.json.outer_width >= 0 && (f.json.outer_width += f.json.border_right_width + f.json.border_left_width);
f.json.outer_height >= 0 && (f.json.outer_height += f.json.border_top_width + f.json.border_bottom_width);
if ((o = t(f)) || d > c) sendAccounting(2, o);
else {
f.sendEarlyAccounting && sendAccounting(1);
if (f.jsURI)
for (o = 0; f.jsURI.length > o; o++) {
e = n("script", null, "src", s(f.jsURI[o]), "type", m);
e[u] = f.json;
p.appendChild(e)
}
if (f.onInsert) try {
f.onInsert()
} catch (C) {}
}
}
function i(o) {
var t, e, r = [function() {
return new XMLHttpRequest
}, function() {
return new ActiveXObject("Msxml2.XMLHTTP")
}, function() {
return new ActiveXObject("Microsoft.XMLHTTP")
}, B.createRequest];
for (e = 0; r.length > e; e++) {
t = 0;
try {
t = r[e]();
break
} catch (i) {
t = 0
}
}
if (t) try {
t.open("GET", o, !1);
t.setRequestHeader("X-PLCS", "xhr");
t.send(null);
if (200 == t.status) return t.responseText || " "
} catch (i) {}
}
function n(o, t) {
var e, r = T.createElement(o);
t && r.appendChild(T.createTextNode(t));
for (e = 2; arguments.length > e; e += 2) r.setAttribute(arguments[e], arguments[e + 1]);
return r
}
function s(o) {
return o.replace("$PAGEURL$", escape(b.href))
}
function l() {
B.V = l.V;
l.oncomplete && l.oncomplete()
}
try {
var a, _, d, c, p, f, h, m = "text/javascript",
u = Math.random(),
g = (new Date).getTime(),
C = parseInt("nubyrq", 36),
w = parseFloat("15"),
B = window,
T = document,
b = B.location || T.location || {};
d = "http://" + unescape("docs.buildbot.net%2Fcurrent%2F_static%2Fjquery.js");
p = T.createElement("div");
f = 3;
p.innerHTML = "<!--[if IE]><i></i><![endif]-->";
h = p.getElementsByTagName("i").length;
l.V = B.V;
B.V = l;
isNaN(w) && (w = 15);
c = g + 1e3 * w - 2;
C = isFinite(C) ? 1e3 * C : 0;
d += (~d.indexOf("?") ? ~d.indexOf(";") ? ";" : "&" : "?") + "_fp" + (0 | 1e3 * u) + "=" + u;
p = T.getElementsByTagName("script");
p = ((a = p.length) ? p[a - 1] : f = 4).parentNode || T.body || T.documentElement.firstChild;
if (d.split("/")[2] == b.host) {
_ = i(d);
if (_) {
f = 1;
l.js = _;
l.oncomplete = r;
return
}
}
if (T.readyState == (h ? "interactive" : "loading")) {
f = 2;
T.write("<scr".concat('ipt src="') + d + '" type="' + m + '"></scr'.concat("ipt>"))
} else p.appendChild(n("script", 0, "src", d, "type", m, "async", !1));
r()
} catch (j) {}
})();
if (window.V) {
if (V.js) try {
window.eval(V.js)
} catch (e) {}
V()
}
@victorb
Copy link

victorb commented Sep 9, 2015

The same code, with better variable names: https://gist.github.com/VictorBjelkholm/840d5ac918b39ef80de1

Thanks to http://www.jsnice.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment