Skip to content

Instantly share code, notes, and snippets.

@SomeKittens
Created July 3, 2016 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SomeKittens/9823800f4c208a4ce6fa92ab3fcb6ec8 to your computer and use it in GitHub Desktop.
Save SomeKittens/9823800f4c208a4ce6fa92ab3fcb6ec8 to your computer and use it in GitHub Desktop.
Comcast injection code
! function(t, e, i) {
function o(t) {
return t
}
function n(t) {
var e, i = [],
o = function() {
var o = arguments,
n = o.length;
if (i) i.push.apply(i, o);
else
for (; n--;) o[n].apply(t, e);
return t
};
o.r = function() {
e = arguments;
if (i) {
for (var o; o = i.shift();) o.apply(t, e);
i = 0
}
return t
};
return o
}
function r() {
var t, e, i = arguments,
o = i.length,
r = n();
t = o;
for (; o--;)(e = i[o]) ? e(function() {
--t || r.r()
}) : --t;
t || r.r();
return r
}
function a(t) {
return t.split(" ")
}
function l(t) {
var e = 1,
i = arguments;
return t.replace(/%s/g, function() {
return i[e++]
})
}
function s(t, e) {
return Math.max(t, e)
}
function c(t, e, i) {
if (e) {
i = i || {};
for (var o in e) e.hasOwnProperty(o) && (t[o] = o in i ? e[o] + i[o] : e[o])
}
return t
}
function h(t, e, i) {
for (var o = e.length; o--;) t[e[o]] *= i
}
function f(t, e) {
return !(typeof t).indexOf(e)
}
function d(t, e) {
return (t || "").indexOf(e) + 1
}
function p(t, e, i) {
i = parseInt(t, 10);
return isNaN(i) ? t : e ? i * e : i
}
function u(t) {
var e, i, o = a("HandheldFriendly MobileOptimized viewport"),
n = 3,
r = "querySelector";
if (t[r])
for (; n--;) {
e = (t[r]("meta[name=" + o[n] + "]") || "").content;
if (e) {
e = 2 == n && (i = d(e, "width=")) ? p(e.substr(5 + i)) : 0;
return s(isFinite(e) && e, 320)
}
}
}
function _(t, e) {
return /\(ip(hone|ad|od( touch)?);/.test(t) && !d(e.appVersion, "Safari")
}
function g() {
return (new Date).getTime()
}
function m(e, i, o, r, a) {
function s(t, e, i) {
function o() {
t.removeEventListener(e, o, !1);
i()
}
t.addEventListener(e, o, !1)
}
function h(t) {
return t
}
function f(t, e, i, o) {
function n() {
var e = t.style;
if (2 > w) {
c(e, w ? g : m, w && v);
if (w) {
if (u) {
t.zoom = 1;
e.filter = "alpha(opacity=" + 100 * g.filter + ")"
}
_.b.r()
}
w++;
r = +new Date;
a = r + i
} else {
for (var o, s, h = b.length, f = +new Date, d = f > a ? 1 : (f - r) / i; h--;) {
s = b[h];
o = (g[s] + y[s] * (-Math.cos(d * Math.PI) / 2 + .5)).toFixed(3) + v[s];
"filter" == s && (o = "alpha(opacity=" + 100 * o + ")");
e[s] = o
}
if (f > a) {
l && (e.filter = "");
return _.a.r()
}
}
k(n)
}
var r, a, l, s, h, f, p, u, _ = this,
g = {},
m = {},
w = 0,
b = [],
y = {},
v = {};
for (s in e)
if (e.hasOwnProperty(s) && !d("hvXY", s)) {
h = e[s];
f = {
x: e.h || "left",
y: e.v || "top",
opacity: 9 > lt ? "filter" : 0
}[s] || s;
p = "opacity" == s ? "" : "px";
if (h.splice) {
if (o) {
w = h[0];
h[0] = h[1];
h[1] = w
}
if ("filter" == f) {
l = 1 == h[1];
u = 1
}
b.push(f);
v[f] = p;
h[1] = h[1] + (e[s.toUpperCase()] || 0);
h[0] = h[0] + (e[s.toUpperCase()] || 0);
y[f] = h[1] - h[0];
g[f] = h[0]
} else m[f] = h
}
w = 0;
k(n)
}
function p(e, i, o, r) {
function a() {
if (v) {
m[_ + "Property"] = "all";
m[_ + "Duration"] = o + "ms";
m[_ + "TimingFunction"] = "ease-in-out";
s(e, x + "TransitionEnd", C.r);
s(e, "transitionend", C.r);
c(m, y);
t(C.r, 2 * o)
} else {
c(m, b);
v++;
p.b.r();
k(a)
}
}
var h, f, p = this,
m = e.style,
w = {},
b = {},
y = {},
v = 0,
C = n();
r = !!r + 0;
for (h in i)
if (i.hasOwnProperty(h) && !d("XYhv", h)) {
f = i[h];
if (f.splice)
if (d("xy", h)) {
w[u] = l(g, i.x && i.x[0 + r] * ("right" == i.h ? -1 : 1) || 0, i.y && i.y[0 + r] * ("bottom" == i.v ? -1 : 1) || 0);
y[u] = l(g, i.x && i.x[1 - r] * ("right" == i.h ? -1 : 1) || 0, i.y && i.y[1 - r] * ("bottom" == i.v ? -1 : 1) || 0);
delete i.x;
delete i.y
} else {
w[h] = f[0 + r];
y[h] = f[1 - r]
} else b[h] = f
}
c(m, w);
C(function() {
m[_ + "Property"] = "none";
m[_ + "Duration"] = "0s";
p.a.r()
});
k(a)
}
for (var u, _, g, m, w, b = "Khtml O ms Moz webkit ".split(" "), y = i.createElement("dcxk"), v = y.style, x = "", k = "equestAnimationFrame", C = b.length; C--;) {
u = b[C] + "Transform";
_ = b[C] + "Transition";
if (v[_] !== a && v[u] !== a) {
x = b[C];
o.t3 = v[x + "Perspective"] !== a;
g = o.t3 ? "translate3d(%spx,%spx,0)" : "translate(%spx,%spx)";
break
}
}
v = y = null;
m = C >= 0;
c(o, m && {
tr: m,
tm: u,
tn: _,
vd: x,
vc: "-" + x.toLowerCase()
});
o.tc = m && o.vc + "-transform";
k = e["r" + k] || e[x.toLowerCase() + "R" + k] || function(e) {
t(e, 13)
};
w = r || !m ? f : p;
return function(e, i, o, r, a) {
var l = {
c: function() {
k = h
},
o: c({}, i)
};
l.a = n(l);
l.b = n(l);
r && l.a(r);
1 > o ? t(function() {
l.b.r();
l.a.r()
}, 1) : w.call(l, e, i, o, a);
return l
}
}
function w() {
var t, e, i, o, n, r = it.getElementsByTagName("script");
for (i = 0; i < r.length; i++)
if (r[i].src && -1 !== r[i].src.indexOf("/floating-frame.")) {
X = e = r[i];
for (t in e)
if (!isNaN(parseFloat(t)) && e[t] && f(e[t].sprite_img, "s")) {
o = e[t];
e[t] = 0;
return o
}
o = e.src;
n = d(o, "?");
if (n) {
o = o.substring(n);
if (o && ot[o] && f(ot[o].sprite_img, "s")) return ot[o]
}
}
}
function b() {
var t, e = $.concat(["message_html", "content_url", "allow_content_transparency", "allow_content_scroll", "animate_out_duration", "animate_in_duration", "visible_duration", "delay_duration", "ok_to_show", "on_ready_to_show", "opaque_outer_frame", "animation_properties"]),
i = w();
if (i) {
i.fp = i._accounting;
if (i.fp && i.fp.stopTime && !isNaN(i.fp.stopTime) && !(g() > i.fp.stopTime) && i.fp.sendAccounting) {
t = e.length;
for (; t--;) i[e[t]] || (i[e[t]] = 0);
t = i.animation_properties;
i.animation_properties = i.animate_in_duration || i.animate_out_duration ? t[0] : 0;
f(i.close_horizontal_padding, "n") || (i.close_horizontal_padding = i["border_" + i.close_align + "_width"]);
if (i.outer_width < 0) {
i.anchor_corner = i.anchor_corner.charAt(0) + "c";
2 ^ ft || (i.outer_width = ft > 2.1 ? 320 : tt / ot.devicePixelRatio)
}
i.outer_height < 0 && (i.anchor_corner = "c" + i.anchor_corner.charAt(1));
if ("" === i.sprite_img) {
wt = c({}, i);
i.outer_width = i.outer_height = -1;
i.anchor_corner = "cc"
}
return i
}
}
}
function y() {
for (var t; !t || t in ot || it.getElementById(t); t = Math.random().toString(36).replace(/[\d.]+/, ""));
return t
}
function v(t, e, i, o, n) {
n = n || it;
var r, a, l = n.createElement(t);
if (i) {
a = n.createTextNode(i);
l.appendChild(a)
}
if (o)
for (r in o) o.hasOwnProperty(r) && l.setAttribute(r, o[r]);
e.appendChild(l);
return l
}
function x(t, e) {
Et && k(Et + "/%s/" + t.join(";"), e)
}
function k(t, e) {
var o = n(),
r = y(),
a = it.createElement("script");
ot[r] = o.r;
o(e, function() {
ot[r] = i;
a.parentNode.removeChild(a)
});
t = l(t, r);
t.length > 2048 && (t = t.substr(0, 2048));
a.src = t;
X.parentNode.insertBefore(a, X)
}
function C(t, e) {
e = e || it;
e.createStyleSheet ? e.createStyleSheet("").cssText = t : v("style", e.getElementsByTagName("head")[0], t)
}
function z(t) {
c(t.style, {
display: "none",
background: "transparent none",
borderWidth: 0,
width: "auto",
outlineWidth: 0
})
}
function T(t) {
C("@media print{#" + t + "{display:none}}")
}
function E() {
function t() {
return h[it.readyState] >= f
}
function e() {
s = !0;
clearInterval(d);
c.r()
}
function o() {
ht(it, "readystatechange", function() {
t() && e()
})
}
function r() {
ht(window, "load", e)
}
var a, l, s, c = n(),
h = {
complete: 4,
interactive: 3,
4: 4,
3: 3
},
f = Ct.require_full_page_load ? 4 : 3,
d = setInterval(function() {
if (!(s || g() < Ct.fp.stopTime)) {
clearInterval(d);
zt(2, 20)
}
}, 1e3);
if (t()) c.r();
else if (ct) {
o();
ht(it, "DOMContentLoaded", e);
r()
} else {
o();
r();
if (!requireFullLoad) {
a = it.documentElement;
a && (a = a.doScroll)
}
var p = setInterval(function() {
if (l || t() || it.readyState === i) {
clearInterval(p);
e()
} else if (a) try {
a("left");
l = 1
} catch (o) {}
}, 100)
}
return c
}
function W(t, i, o, n, r, a) {
function l() {
if (!l.gone) {
l.gone = !0;
clearInterval(s);
h.onload = null;
h.onreadystatechange = null;
if (a) try {
a.contentWindow = h.contentWindow
} catch (t) {}
if (wt && i.src) {
try {
h.contentWindow.opener = a
} catch (t) {}
h.src = i.src
}
o(h.contentWindow)
}
}
r = r || "";
var s, c, h = n.createElement(8 > lt ? '<iframe name="' + r + '">' : "iframe"),
f = h.style,
d = e;
h.name = r;
h.setAttribute("style", ["display:block", "border:none", "padding:0", "border-radius:0", ""].join("!important;"));
at && d.hostname != document.domain && (h.src = d.protocol + "//" + d.host);
if (lt >= 7) {
f.width = f.height = "100%";
f.backgroundColor = "transparent"
}
for (c in i)(i.hasOwnProperty(c) && !wt || "src" != c) && h.setAttribute(c, i[c]);
7 === lt && "100%" === i.height && ht(t, "resize", function() {
f.height = t.offsetHeight + "px"
});
"frameBorder" in i && (f.borderWidth = i.frameBorder + "px");
if (o) {
h.onload = l;
h.onreadystatechange = function() {
"complete" === h.readyState && l()
};
at || (s = setInterval(function() {
h.contentWindow && l()
}, 200))
}
t.appendChild(h);
return h
}
function A(e, i, n) {
var r, l, c, h, d, p, u, _, g, m, w = [],
b = 31,
y = Q,
k = 10 * y,
C = xt.vc,
z = xt.tc;
if (!at || at > 6) {
u = e.style;
u.position = "relative";
u.zIndex = st - 1;
for (; u.zIndex != st - 1 && b > 0;) {
st = Math.pow(2, --b) - 1;
u.zIndex = st - 1
}
u.position = "static"
}
g = a("ne se sw nw");
b = g.length;
for (; b--;) {
r = g[b];
if (Ct[r + "_corner_position"]) {
h = ["position:absolute;overflow:hidden"];
if ("n" == r.charAt(0)) {
h.push("top:0;z-index:" + (st - 4));
_ = "border_top_width"
} else {
h.push("bottom:0;z-index:" + (st - 5));
_ = "border_bottom_width"
}
if ("e" == r.charAt(1)) {
h.push("right:0");
d = "border_right_width"
} else {
h.push("left:0");
d = "border_left_width"
}
c = r + "_corner_width";
Ct[c] ? d = Ct[c] : Ct[c] = d = Ct[d];
h.push("background-image:url(" + Ct.sprite_img + ");background-position:" + Ct[r + "_corner_position"] + ";width:" + d / y + "px;height:" + Ct[_] / y + "px");
w.push("." + r + "{" + h.join(";") + "}");
p = v("div", e, 0, 0, n);
p.className = r
} else Ct[r + "_corner_width"] = 0
}
g = a("left bottom right top");
b = g.length;
for (; b--;) {
r = "border_" + g[b] + "_";
h = [];
_ = !1;
l = r + "width";
if (Ct[l]) {
d = Ct[l];
l = r + "color";
Ct[l] && h.push("background-color:" + Ct[l]);
l = r + "position";
if (Ct[l]) {
h.push("background-position:" + Ct[l]);
h.push("background-image:url(" + Ct.sprite_img + ")");
l = r + "repeat";
Ct[l] && h.push("background-repeat:" + Ct[l])
}
c = !1;
l = r.split("_")[1];
if ("top" == l) {
_ = !0;
c = "n";
h.push("z-index:2")
} else if ("bottom" == l) {
_ = !0;
c = "s"
} else "right" != l && "left" != l || (c = !0);
c && (c = _ ? l + ":0;left:" + Ct[c + "w_corner_width"] + "px;" + (Ct.outer_width < 0 ? "right:" + Ct[c + "e_corner_width"] : "width:" + (Ct.outer_width - Ct[c + "w_corner_width"] - Ct[c + "e_corner_width"])) + "px;" : l + ":0;top:" + Ct.border_top_width + "px;" + (Ct.outer_height < 0 ? "bottom:" + Ct.border_bottom_width : "height:" + (Ct.outer_height - Ct.border_top_width - Ct.border_bottom_width)) + "px;");
h.push("z-index:" + (st - (_ ? "top" == l ? 5 : 6 : 2)));
if (c) {
w.push("." + l + "{position:absolute;" + (_ ? "height" : "width") + ":" + d + "px;" + c + h.join(";") + "}");
p = v("div", e, 0, 0, n);
p.className = l
}
}
}
if (Ct.border_top_width && Ct.close_position) {
c = Math.floor((Ct.border_top_width - Ct.close_height) / 2);
Ct.close_vertical_offset && f(Ct.close_vertical_offset, "n") && (c += Ct.close_vertical_offset);
p = v("a", e, 0, !q && {
href: "#"
}, n);
p.className = "close";
if (q) {
p = v("span", e, 0, 0, n);
p.className = "target";
w.push(".target{position:absolute;" + Ct.close_align + ":0;top:0;width:" + s(y * Ct.close_width + Ct.close_horizontal_padding, k) + "px;height:" + s(Ct.border_top_width, k) + "px;z-index:" + st + ";}")
}
p.onclick = function() {
this.blur();
this.onclick = null;
x([2], o);
i();
return !1
};
w.push(".close{overflow:hidden;position:absolute;top:" + c + "px;" + Ct.close_align + ":" + Ct.close_horizontal_padding + "px;width:" + Ct.close_width + "px;height:" + Ct.close_height + "px;background-image:url(" + Ct.sprite_img + ");background-position:" + Ct.close_position + ";zoom:" + (q && !z && y || 1) + ";z-index:" + (st - 1) + ";}");
Ct.close_hover_position && !q && w.push(".close:hover,.close:active{background-position:" + Ct.close_hover_position + ";}");
Ct.close_alt_text && (p.title = Ct.close_alt_text)
}
if (q && z && 1 != y) {
m = pt > 38;
w.push((m ? ".topText,.bottomText,#cd,#ad," : "") + ".close,.top,.right,.bottom,.left,.nw,.sw,.ne,.se{" + z + ":scale(" + y + ");" + z + "-origin:0 0;}.se,.sw{" + z + "-origin-y:100%}.se,.ne{" + z + "-origin-x:100%}.top,.bottom{" + z + ":scale(1," + y + ")}.right,.left{" + z + ":scale(" + y + ",1)}" + (m ? "" : ".topText,.bottomText,#cd,#ad{" + C + "-text-size-adjust:" + 100 * y + "%}") + ".close{" + z + "-origin:" + Ct.close_align + " 50%}")
}
g = a("bottom top");
b = g.length;
for (; b--;) {
l = g[b];
if (Ct["border_" + l + "_width"])
if (Ct[l + "_text"]) {
p = v("div", e, Ct[l + "_text"], 0, n);
p.className = l + "Text";
h = [l + ":" + Ct[l + "_offset_vertical"] + "px;z-index:" + (st - 3)];
u = {
color: "color",
align: "text-align",
direction: "text-direction",
decoration: "text-decoration",
font_size: "font-size",
font_weight: "font-weight"
};
for (r in u)
if (u.hasOwnProperty(r)) {
c = l + "_" + r;
Ct[c] && h.push(u[r] + ":" + Ct[c])
}
u = {
letter_spacing: "letter-spacing",
word_spacing: "word-spacing",
offset_right: "right",
offset_left: "left"
};
for (r in u)
if (u.hasOwnProperty(r)) {
c = l + "_" + r;
f(Ct[c], "n") && h.push(u[r] + ":" + Ct[c] + "px")
}
c = 0;
if ("top" == l && Ct.top_align == Ct.close_align) {
c = Ct.close_horizontal_padding + Ct.close_width + 2;
lt > 6 ? h.push("padding-" + Ct.close_align + ":" + c + "px") : "left" == Ct.top_align && h.push("left:" + (c + Ct.top_offset_left) + "px")
}
7 > lt && h.push("width:" + (Ct.outer_width - Ct[l + "_offset_right"] - Ct[l + "_offset_left"] - c) + "px");
if (f(Ct.interstitial, "f")) {
p.onclick = D;
w.push("#cd,#ad,.topText{float:right;position:relative;color:" + Ct.top_color + ";z-index:" + st + "}#ad{font-weight:bold;float:left;padding:11px 6px;font-size:77%}#cd{font-size: 138.5%;padding:7px 6px 0 0}.topText{cursor:pointer;padding:9px 2px;font-size:108%}#rq{padding:0 4px}");
Ct.narrow && w.push("#ad{padding:4px 7px}.topText{float:left;clear:both;padding:4px 7px;font-size:93%}#cd{top:1px;right:6px;padding:0;position:absolute}");
if (Ct.link_delay) {
p.style.display = "none";
ut(function() {
t(function() {
kt(p, {
opacity: [0, 1],
display: "block"
}, 250)
}, 1e3 * Ct.link_delay)
})
}
if (Ct.iab) {
var T = v("div", e, "ADVERTISEMENT", {
id: "ad"
}, n);
e.insertBefore(T, p)
}
ut(function() {
var t = v("span", e, 0, {
id: "cd",
style: "display:none"
});
e.insertBefore(t, p);
Ct.interstitial(t, p, D)
})
} else w.push("." + l + "Text{position:absolute;" + h.join(";") + "}")
} else 7 > at && w.push("." + l + "{font-size: 0;}")
}
w.push("#iwrap{position:absolute;top:" + Ct.border_top_width + "px;right:" + Ct.border_right_width + "px;bottom:" + Ct.border_bottom_width + "px;left:" + Ct.border_left_width + "px;}iframe{overflow:hidden;border:none;position:relative;overflow-x:" + (Ct.allow_content_scroll ? "auto" : "hidden") + ";overflow-y:" + (Ct.allow_content_scroll ? "auto" : "hidden") + ";z-index:" + st + ";width:100%;height:100%;}");
return w
}
function H(t) {
var e, i, o, n, r, a, l, s = !1,
c = !1,
h = Ct.anchor_corner,
f = !1,
d = !1,
p = lt >= 6 ? it.documentElement : it.body,
u = this,
_ = Q,
g = "px",
m = dt && Y;
this.place = function() {
u.setVinit();
u.setHinit();
t.style.top = e + (s ? p.clientHeight : 0) + p.scrollTop + g;
t.style.left = (d ? p.clientWidth / 2 + i : i + (c ? p.clientWidth : 0) + p.scrollLeft) + g;
f && (t.style.height = p.clientHeight + g)
};
this.addListeners = function() {
ht(ot, "scroll", this.place);
ht(ot, "resize", o)
};
this.removeListeners = function() {
detachEvent("onscroll", this.place);
detachEvent("onresize", o)
};
this.init = function() {
var w = t.firstChild.contentWindow.document,
b = w.getElementsByTagName("iframe")[0];
t.style.position = "absolute";
if (Ct.outer_width < 0) {
h = h.charAt(0) + "w";
r = [];
r.push(t, 0, b, Ct.border_left_width + Ct.border_right_width);
a = w.getElementsByTagName("div");
for (l = 0; l < a.length; l++) "top" === a[l].className ? r.push(a[l], Ct.ne_corner_width + Ct.nw_corner_width) : "bottom" === a[l].className && r.push(a[l], Ct.se_corner_width + Ct.sw_corner_width);
a = null
} else b.style.width = Ct.outer_width - Ct.border_left_width - Ct.border_right_width + g;
if (Ct.outer_height < 0) {
h = "n" + h.charAt(1);
n = [];
n.push(t, 0, b, Ct.border_top_width + Ct.border_bottom_width);
a = w.getElementsByTagName("div");
for (l = 0; l < a.length; l++) "right" !== a[l].className && "left" !== a[l].className || n.push(a[l], Ct.border_top_width + Ct.border_bottom_width);
a = null
} else b.style.height = Ct.outer_height - Ct.border_top_width - Ct.border_bottom_width + g;
if (r || n) {
o = function(t) {
var e, i;
if (r) {
i = p.clientWidth - 2 * Ct.horizontal_offset;
for (e = 0; e < r.length; e += 2) r[e].style.width = i - r[e + 1] + g
}
if (n) {
i = p.clientHeight - 2 * Ct.vertical_offset;
for (e = 0; e < n.length; e += 2) n[e].style.height = i - n[e + 1] + g
}
"noplace" !== t && u.place()
};
o("noplace")
} else o = u.place;
this.setVinit = function() {
outer_height = Ct.outer_height;
switch (h.charAt(0)) {
case "s":
e = -1 * Ct.vertical_offset - Ct.outer_height;
m && (e -= (1 - _) * p.clientHeight);
s = !0;
break;
case "n":
e = Ct.vertical_offset;
break;
case "c":
e = 0;
m && (e += _ * (p.clientHeight / 2));
t.style.height = "100%";
t.firstChild.style.position = "relative";
t.firstChild.style.top = "50%";
t.firstChild.style.marginTop = -1 * Math.floor(Ct.outer_height / 2) + g;
7 > lt && (f = !0)
}
};
this.setVinit();
this.setHinit = function() {
outer_width = Ct.outer_width;
switch (h.charAt(1)) {
case "e":
i = -1 * Ct.horizontal_offset - Ct.outer_width;
c = !0;
break;
case "w":
i = Ct.horizontal_offset;
break;
case "c":
d = !0;
i = -1 * Ct.outer_width / 2
}
};
this.setHinit()
}
}
function N(e, n) {
function r() {
y = Ct.outer_height;
p.minHeight = y + "px !important";
if ("c" === C) {
n.marginTop = 0;
A = d / 2 - y / 2
} else "s" === C && (A = d - y - k)
}
function a() {
b = Ct.outer_width;
if ("c" === z) {
E = ot.innerWidth / 2 - b / 2;
W = 0
} else "e" == z && (W = ot.innerWidth - b - v);
n.left = ("c" == z ? E : W) + "px"
}
function l() {
"n" != C && Ct.outer_height != y && r();
"w" != z && Ct.outer_width != b && a();
var t, e;
p.opacity = 1;
H = 1;
E = h;
T = f;
t = W + E;
e = A + T;
p[_ + "Duration"] = 0;
N && (p[u] = "");
p.left = t + "px";
p.top = e + "px"
}
function s(e) {
var i = ot.innerWidth / g.clientWidth;
if (D.ran || I > i || i > O) {
D.ran || x([7], o);
return D(!0)
}
var n, r, a = !e || "scroll" === e.type,
w = ot.innerHeight - d;
clearTimeout(c);
p.opacity = N && H && !ft && !a ? .95 : 1;
H = 0;
n = ot.pageYOffset;
r = ot.pageXOffset;
!n && ft && t(s, 1e3);
"s" == C ? n += w : y > 0 && "c" === C && (n += w / 2);
b > 0 && "c" === z && (r += ot.innerWidth / 2 - b / 2);
p[_ + "Duration"] = (a && e ? 0 : 300) + "ms";
p[_ + "TimingFunction"] = "linear";
N && (p[u] = m ? "translate3d(" + (r - E) + "px, " + (n - T) + "px, 0)" : "translate(" + (r - E) + "px, " + (n - T) + "px)");
a && (c = t(l, 13));
h = r;
f = n
}
U = e.firstChild.contentWindow.onhashchange === i;
var c, h, f, d, p = e.style,
u = xt.tm,
_ = xt.tn,
g = it.documentElement,
m = xt.t3,
w = +new Date,
b = Ct.outer_width,
y = Ct.outer_height,
v = Ct.horizontal_offset,
k = Ct.vertical_offset,
C = Ct.anchor_corner.charAt(0),
z = Ct.anchor_corner.charAt(1),
T = 0,
E = 0,
W = v,
A = k,
H = 1,
N = !U && !ft,
M = 0 === vt && !Ct.animate_in_duration,
I = .95 * Z,
O = 1.05 * Z;
n.position = "absolute";
p[_ + "Property"] = xt.tc;
0 > b ? e.style.width = Math.min(it.body.scrollWidth, g.clientWidth * Z) - 2 * v + "px" : a();
d = ot.innerHeight;
if (0 > y) {
e.firstChild.height = d - 2 * k;
e.firstChild.style.height = ""
} else r();
n.top = A + "px";
N && ht(it, "touchmove", function(t) {
var e = +new Date;
if (e - w > 200) {
w = e;
t.stopPropagation();
s(t)
}
});
ht(it, "scroll", s);
vt = function() {
t(s, 500)
};
M && vt();
this.place = s
}
function M() {
return s(tt, et) > 999 && !ft || ft >= 3
}
function I(t, e) {
for (var i, o, n, r, a, l = e.length, s = t.hostname, c = t.pathname; l--;) {
r = e[l];
a = r.indexOf("/");
i = r.substr(0, a);
o = r.substr(a);
n = 0;
if (i.indexOf("*.")) {
if (!i.indexOf("www.")) {
e[l] = r.substr(4);
l++
}
} else {
i = i.substr(2);
n = 1
}
if (i == s || n && s.substr(s.length - i.length - 1) == "." + i) {
n = 0;
a = o.length - 1;
if ("*" == o.charAt(a)) {
o = o.substr(0, a);
n = 1
}
if (o == c || n && !c.indexOf(o)) return 1
}
}
}
function O() {
var t = ot.orientation;
if (!f(t, "n") && ot.matchMedia) {
t = ot.matchMedia("(orientation: portrait)");
t && (t = t.matches ? 0 : 90)
}
f(t, "n") || (t = screen.width > screen.height ? 90 : 0);
return t
}
function B() {
var t = O(),
e = q && R ? ot.innerWidth : 0,
i = 1.05 * e,
n = "onorientationchange" in ot ? "orientationchange" : "resize";
e *= .95;
ht(ot, n, function() {
var r = O(),
a = ot.innerWidth;
if (r != t || e && (a > i || e > a)) {
D.ran || x(["orientationchange" === n ? 5 : 6], o);
D(!0)
}
})
}
function S() {
var i = n(),
o = new Image,
r = Tt,
a = e.hostname;
if (wt) ut.r();
else {
o.onload = function() {
i(ut.r)
};
o.src = Ct.sprite_img;
t(i.r, 1e3 * Ct.delay_duration || 13)
}
if (Ct.fp.direct) Tt = 0;
else if (r) {
Tt = n();
/^[^[].*:/.test(a) && (a = "[" + a + "]");
a.length < 65 && "http:" == e.protocol ? k(r + "/%s/" + a + (e.pathname || "/"), function(t) {
t ? Tt.r() : zt(2, 6)
}) : zt(2, 10)
}
}
function L(t, e) {
var i, o = {},
n = Ct.anchor_corner,
r = mt,
a = e ? p(r.style.width) : Ct.outer_width,
l = e ? p(r.style.height) : Ct.outer_height;
o.position = "relative";
if ("position" == t)
if ("cc" === n && 7 > lt)
if (Ct.outer_height < 0) {
o.y = [-1 * (it.documentElement.clientHeight || it.body.clientHeight), 0];
o.top = -1 * (it.documentElement.clientHeight || it.body.clientHeight)
} else {
o.y = [-1 * Ct.outer_height / 2, (it.documentElement.clientHeight || it.body.clientHeight) / 2];
Ct.animate_in_duration && (o.top = -1 * l)
} else if ("cc" == n) {
i = ot.innerHeight || it.documentElement.clientHeight;
Ct.outer_height > 0 && (i = (i + l) / 2);
o.y = [i, 0];
o.v = "bottom"
} else if ("c" == n.charAt(0)) {
o.x = [a + Ct.horizontal_offset, 0];
o.h = "w" == n.charAt(1) && "right"
} else {
o.y = [-1 * (l + Ct.vertical_offset), 0];
o.v = "s" == n.charAt(0) && "bottom"
} else "opacity" == t && (o.opacity = [0, 1]);
7 > lt && "ce" === n && (r.style.overflow = "hidden");
return o
}
function D(e, i, o, n) {
function r() {
D.again = 0;
l.style.display = "none";
if (n) {
n();
D.ran = 0
} else {
Ct.fixIE && Ct.fixIE.removeListeners();
try {
var t = l.parentNode.removeChild(l);
t = null
} catch (e) {}
Ct.fp.allowNext.d();
J && J()
}
}
if (D.ran) {
if (!(D.again && D.again <= g())) return;
e = !0
}
D.ran = 1;
var a = Ct.animation || {
c: p
},
l = mt;
i = i || a.o;
if (e === !0) {
a.c();
D.again = g() + 25;
return t(r, 0)
}
a.a(function() {
i.position = "relative";
kt(l.firstChild, i, o || 1e3 * Ct.animate_out_duration, r, 1)
})
}
function F(t) {
t = it[lt > 5 ? "documentElement" : "body"];
if (Ct.minimum_width > t.clientWidth || Ct.minimum_height > t.clientHeight) {
zt(2, 5);
D(!0);
return 1
}
}
function P(e, i, a) {
function l() {
lt > 6 && (u.firstChild.style[xt.tm || "position"] = "");
if (b && Ct.visible_duration > 0) {
G = t(gt.r, 1e3 * Ct.visible_duration);
r(gt, K)(function() {
if (!D.ran) {
x([3], o);
D()
}
})
}
Ct.fixWebkit && Ct.fixWebkit.place();
if (b) {
B();
Ct.allow_replace && Ct.fp.allowNext.s(function() {
var t = n();
J = t.r;
D.ran || x([3], o);
D();
return t
})
}
}
function s() {
var t, e, i = ot.innerHeight;
s.t = g();
if (s.h != i) {
s.h = i;
i -= 2 * Ct.vertical_offset;
if (i != u.offsetHeight) {
u.firstChild.contentDocument.getElementById("fpid").style.height = u.style.height = i + "px";
i -= Ct.border_top_width + Ct.border_bottom_width;
t = u.firstChild.contentDocument.querySelectorAll(".right,.left,#iwrap");
for (e = 0; e < t.length; e++) t[e].style.height = i
}
}
}
function h() {
if (b && ot.opera && Ct.outer_height < 0 && it.querySelectorAll) {
ht(ot, "resize", function() {
s.t - g() < -100 && s()
});
var e = u.firstChild.contentDocument.getElementById("fpid").style;
t(function() {
e.position = "absolute";
e.width = "100%";
e.height = "100%"
}, 50)
}
d = Ct.animation = kt(u.firstChild, d, p(i) || 1e3 * Ct.animate_in_duration, l);
d.b(function() {
var e = {},
i = u.firstChild.contentWindow.document,
o = Ct.fixWebkit;
u.style.display = i.getElementsByTagName("iframe")[0].style.display = "block";
if (!b) {
o && o.place();
if ("position" == m) {
e.opacity = 1;
9 > lt && (e.filter = "alpha(opacity=100)")
} else {
(f || R) && (e = {
top: "auto",
right: "auto",
bottom: "auto",
left: "auto"
});
e[xt.tc] = ""
}
c(u.firstChild.style, e)
}
U && t(function() {
i.body.style.borderRight = "1px solid transparent"
}, 100)
});
a && d.a(a)
}
var f, d, u = mt,
_ = {
zIndex: st,
top: "auto",
right: "auto",
bottom: "auto",
left: "auto"
},
m = e || Ct.animation_properties,
w = Ct.anchor_corner,
b = 0 !== P.ran;
if (!P.ran) {
P.ran = !0;
if (!F()) {
zt(1);
b && ct && u.firstChild && u.firstChild.contentWindow && ht(u.firstChild.contentWindow, "unload", function() {});
Ct.outer_width < 0 ? _.left = _.right = Ct.horizontal_offset + "px" : _.width = Ct.outer_width + "px";
Ct.outer_height < 0 ? _.top = _.bottom = Ct.vertical_offset + "px" : _.height = Ct.outer_height + "px";
if (R) {
_.position = "fixed";
if (Ct.outer_height > 0)
if ("c" == w.charAt(0)) {
_.top = "50%";
_.marginTop = -1 * Math.floor(Ct.outer_height / 2) + "px"
} else _["n" == w.charAt(0) ? "top" : "bottom"] = Ct.vertical_offset + "px";
if (Ct.outer_width > 0)
if ("c" == w.charAt(1)) {
_.left = "50%";
_.marginLeft = -1 * Math.floor(Ct.outer_width / 2) + "px"
} else _["e" == w.charAt(1) ? "right" : "left"] = Ct.horizontal_offset + "px"
} else if (b)
if (xt.tr) Ct.fixWebkit = new N(u, _);
else {
Ct.fixIE = f = new H(u);
f.init();
f.addListeners()
} else f = Ct.fixIE;
c(u.style, _);
f && f.place();
m && (d = L(m));
s.t = 0;
s.h = ot.innerHeight;
ut(h)
}
}
}
function j(t, e) {
function i(t) {
function e() {
var t = [n[0]];
t.push.apply(t, arguments);
a(t.join("&"))
}
var i, o, n = t.split("&"),
r = Ct.anchor_corner,
s = r.charAt(1),
c = {};
if (h) {
h = 0;
mt.style.display = "none";
mt.firstChild.style.filter = ""
}
bt && bt();
switch (n[1]) {
case "ready":
if (F()) return;
zt(1);
a(n[0]);
break;
case "set":
c = [n[0]];
for (i = 2, o = n.length; o > i; i += 2) {
!Ct.v && n[i + 1] && (Ct[n[i]] = p(n[i + 1], Q));
c.push(n[i] + "=" + escape(Ct[n[i]]))
}
a(c.join("&"));
break;
case "show":
Ct.v = 1;
P(n[2], n[3], function() {
l = Ct.animation;
a(n[0])
});
break;
case "interaction":
x(n.slice(2), e);
break;
case "cancelAutoClose":
clearTimeout(G);
a(n[0]);
break;
case "remove":
D(!0);
break;
case "hide":
c = L(n[2], !0);
delete c.position;
D(0, c, p(n[3]), function() {
P.ran = 0;
a(n[0])
});
break;
case "autoclose":
K.r();
break;
case "negativeAccounting":
zt(2, 16);
D(!0);
break;
case "jsonp":
k(Ct.fp.comm + decodeURIComponent(n[2]) + "%s", e);
break;
case "anim":
var f = mt,
d = xt.tn ? "px" : 0,
u = f.style,
_ = p(u.width),
g = p(u.height),
m = p(u.top),
w = p(u.left),
b = p(n[2]),
y = p(n[3]),
v = parseFloat(n[4]),
C = p(n[5]),
z = Ct.fixIE || Ct.fixWebkit,
T = r.charAt(0),
E = f.firstChild.contentWindow.document.getElementsByTagName("iframe")[0],
W = ot.innerWidth || it.body.clientWidth,
A = ot.innerHeight || it.body.clientHeight;
if (b && Ct.outer_width > 0) {
b = Math.min(b, W);
c.width = [_ + d, b + d];
if (7 > lt) {
kt(E, {
width: [_, b]
}, C);
kt(f.firstChild, {
width: [_, b]
}, C)
}
z && "w" != s && ("e" == s ? c.left = [w + d, w - b + _ + d] : c.left = [w + d, (W - b) / 2 + d]);
z || "c" != s || (c.marginLeft = [p(u.marginLeft) + d, b / -2 + d])
}
if (y && Ct.outer_height > 0) {
y = Math.min(y, A);
c.height = [g + d, y + d];
if (7 > lt) {
kt(E, {
height: [g, y]
}, C);
kt(f.firstChild, {
height: [g, y]
}, C)
}
z && "n" != T && ("s" == T ? c.top = [m + d, m - y + g + d] : c.top = [m + d, (A - y) / 2 + d]);
z || "c" != T || (c.marginTop = [p(u.marginTop) + d, y / -2 + d])
}
v && (c.opacity = [parseFloat(u.opacity) || 1, v]);
l.a(function() {
l = kt(f, c, C);
l.a(function() {
b && (Ct.outer_width = b);
if (y) {
Ct.outer_height = y;
rt && (E.style.height = y + "px")
}
z && z.place();
a(n[0])
})
})
}
}
var o, r, a, l, s = e.createElement("a"),
h = !t.postMessage && at;
if (wt) {
K = n();
gt(function() {
a("autoclose")
})
} else bt = h = 0;
s.href = Ct.content_url;
o = s.protocol + "//" + s.hostname;
s.port > 0 && 80 != s.port && (o += ":" + s.port);
a = function(t) {
r.postMessage(t, o)
};
ht(t, "message", function(t) {
if (l.contentWindow == t.source || t.origin === o) {
r = t.source;
i(t.data)
}
});
l = {
token: y(),
xd: Ct.fp.uri + "/FloatingContent/245/xd.js",
postMessage: i,
setCallback: function(t) {
a = t
}
};
if (h) {
s = v("script", e.body, 0, {
src: l.xd
}, e);
s.fct = l;
mt.firstChild.style.filter = "alpha(opacity=0)";
c(mt.style, {
display: "block",
position: "absolute"
})
}
return l
}
try {
var q, V, R, U, Y, X, K, G, J, Q = 1,
Z = 1,
$ = a("border_bottom_width border_left_width border_right_width border_top_width bottom_offset_left bottom_offset_right bottom_offset_vertical close_horizontal_padding close_vertical_offset horizontal_offset outer_height outer_width top_offset_left top_offset_right top_offset_vertical vertical_offset nw_corner_width ne_corner_width sw_corner_width se_corner_width"),
tt = screen.width,
et = screen.height,
it = document,
ot = window,
nt = navigator.userAgent.toLowerCase(),
rt = d(nt, "opera") && parseFloat(navigator.appVersion),
at = it.all && !rt ? parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]) : 0,
lt = at ? it.documentMode ? it.documentMode : "CSS1Compat" == it.compatMode ? at : "CSS1Compat" != it.compatMode ? 5 : at : 1024,
st = 2147483647,
ct = it.addEventListener,
ht = ct ? function(t, e, i) {
t.addEventListener(e, i, !1)
} : function(t, e, i) {
t.attachEvent("on" + e, i)
},
ft = /android (\d+\.\d+)/.exec(nt),
dt = /iemobile|wpdesktop/.exec(nt),
pt = /chrome\/(\d+)/.exec(nt),
ut = n(),
_t = "*.groupon.com/* *.adobe.com/*",
gt = n();
pt = pt ? parseFloat(pt[1]) : 0;
if (d(nt, "fennec/")) q = R = 1;
else if (ft) {
q = ft = parseFloat(ft[1]);
R = ft >= 3 && !pt
} else if (d(navigator.platform, "BlackBerry")) {
q = 1;
R = d(nt, "tablet")
} else if (dt) {
q = 1;
R = (at || 10) > 9
} else {
q = /webkit\b.*mobile\b/.test(nt);
R = !q && lt > 6
}
var mt, wt, bt, yt, vt, xt = {},
kt = m(ot, it, xt),
Ct = b(),
zt = function(t, e) {
1 == t && !e && V && (e = "i4");
Ct.a || (Ct.a = Ct.fp.sendAccounting(t, e))
},
Tt = Ct.fp.check,
Et = Tt && !d(Tt, "/CheckUrl/") ? Tt.replace("Check/2", "Interaction/1") : "";
Array.prototype.indexOf || (Array.prototype.indexOf = function(t, e) {
e = e || 0;
var i, o = this.length;
0 > e && (e += o);
for (i = e; o > i; i++)
if (this[i] === t) return i;
return -1
});
if (q && 320 == tt) {
yt = ot.scrollTo;
ot.scrollTo = function() {
vt ? vt() : vt = 0;
return yt.apply(ot, arguments)
}
}
bt = function() {
bt = 0;
Ct.outer_width = wt.outer_width;
Ct.outer_height = wt.outer_height;
Ct.anchor_corner = wt.anchor_corner
};
ht(ot, "unload", function() {
zt(2, 17)
});
ht(ot, "beforeunload", function() {
zt(2, 17)
});
S();
r(E(), Tt, Ct.fp.prev && Ct.fp.prev())(function() {
function i(t) {
if (g() > w) zt(2, 20);
else {
clearTimeout(s);
if (!Ct.content_url && Ct.message_html) {
t.document.write(d + p + Ct.message_html);
t.document.close()
}
wt || P()
}
}
function o(o) {
if (g() > w) zt(2, 20);
else {
var n, r, a, l, h, f, u = it[lt > 5 ? "documentElement" : "body"];
try {
l = o.document
} catch (_) {
return
}
l.write(d + "<head>" + p + m + "<style>html,body{margin:0;padding:0}</style><title></title></head><body></body>");
l.close();
if (6 == at) try {
l.execCommand("BackgroundImageCache", !1, !0)
} catch (_) {}
r = v("div", l.body, 0, {
id: "fpid"
}, l);
h = v("div", r, 0, {
id: "iwrap"
}, l);
a = A(r, D, l);
C(a.join(""), l);
c = {
frameBorder: "0",
scrolling: Ct.allow_content_scroll ? "auto" : "no"
};
at && Ct.allow_content_transparency && (c.allowTransparency = !!Ct.allow_content_transparency);
Ct.content_url && (c.src = Ct.content_url);
c.height = "100%";
s = t(function() {
try {
zt(2, 20);
n.src = "about:blank"
} catch (t) {}
try {
h.removeChild(n)
} catch (t) {}
}, w - g());
f = j(o, l);
n = W(h, c, i, l, ["scale=" + Q, "mobile=" + (q ? 1 : 0), "origin=" + e.protocol + "//" + e.host, "xd=" + f.xd, "token=" + f.token, "window_width=" + u.clientWidth, "window_height=" + u.clientHeight, "width=" + Ct.outer_width, "height=" + Ct.outer_height, "interactions=_%26" + (Et && "1%3DClick%262%3DManualClose"), "delay_duration=" + 1e3 * Ct.delay_duration, "visible_duration=" + 1e3 * Ct.visible_duration, "animate_in_duration=" + 1e3 * Ct.animate_in_duration, "animate_out_duration=" + 1e3 * Ct.animate_out_duration, "fpsessionid=" + Ct.fp.fpsessionid, "apiurl=" + Ct.fp.uri + "/FloatingContent/9tZTAXzovw3NogRoLY0kOw/api.js"].join("&"), f);
Ct.allow_content_transparency || (n.style.backgroundColor = "#fff")
}
}
function n() {
var t = y(),
e = Ct.outer_width;
mt = l = v("div", it.body, 0, {
style: "display:none"
});
z(l);
T(t);
if (q && Ct.auto_scale_mobile) {
if (!M() && O() % 180) {
zt(2, 7);
return D(!0)
}
Y = u(it);
Q = it[lt > 5 ? "documentElement" : "body"].clientWidth / tt;
Z = ot.innerWidth / it.documentElement.clientWidth;
ft && 27 > pt && (2 ^ ft ? Q *= ot.devicePixelRatio || 1 : Q = ((Y || 800) - 2 * Ct.horizontal_offset) / (0 > e ? 320 : e));
ft && !pt || R || !xt.tr || (Q *= Z);
h(Ct, $, Q)
}
c = {
scrolling: "no",
width: 0 > e ? "100%" : e,
height: Ct.outer_height < 0 ? "100%" : Ct.outer_height,
frameBorder: 0,
id: t
};
at && (c.allowTransparency = !Ct.opaque_outer_frame);
r = W(l, c, o, it)
}
var r, l, s, c, f, d = "<!DOCTYPE HTML>",
p = '<meta http-equiv="content-type" content="text/html;charset=utf-8">',
m = "<style>html{color:#000;}body,div,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;}img{border:0;}em,strong,var{font-style:normal;font-weight:normal;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}</style>",
w = Ct.fp.stopTime;
if (Ct) {
V = q && _(nt, navigator);
(f = q && (I(e, a(_t)) && 8 || !Ct.allow_mobile_app && V && 9)) ? zt(2, f): n()
}
})
} catch (Wt) {}
}(setTimeout, location || document.location);
//# sourceMappingURL=http://192.168.10.15/_source_maps/5759b484/6nDzR5zZdLHog22GTjMlbA.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment