Skip to content

Instantly share code, notes, and snippets.

@kevin-brown
Last active December 14, 2018 14:04
Show Gist options
  • Save kevin-brown/d4fb83423bc020875259 to your computer and use it in GitHub Desktop.
Save kevin-brown/d4fb83423bc020875259 to your computer and use it in GitHub Desktop.
/** @type {Array} */
var args = ["function", "window", "eval", "Cannot find module '", "'", "code", "MODULE_NOT_FOUND", "0", "call", "exports", "1", "length", "Microsoft Internet Explorer", "appName", "userAgent", "MSIE ([0-9]{1,}[.0-9]{0,})", "exec", "$1", "click_reporting_enabled", "querySelectorAll", "extend", "extra_reporting", "report_click", "addEventListener", "click", "toUpperCase", "toLowerCase", "ras_disable", "ras_disable_abp", "ad_visible_check_selectors", "check_selector_visible", "is_abp_adblocker", "apply_display_none_overrides",
"click_listener_selector", "obfuscate_and_restore_ads", "join", ",", "", "x", "g", "b", "p", "a", "m", "detect_whitelisting_enabled", "w", "detect_whitelisting", "detect_extensions_enabled", "browser", "chrome", "random", "detect_chrome_extensions", "e", "stringify", "report_page_view", "ready", "#spon_links, .sponsored, #spon_links .head2, #spon_links .result h3, #spon_links .result h3 a, #spon_links .result p a, #spon_links .result .desc, #spon_links .result .sitelinks a", "#spon_links .result a.url",
"#spon_links", ".result", ".sponsored a", "ras_cl", "ras_il", "is_hidden", "getComputedStyle", "4321", "getPropertyValue", "orphans", "createElement", "div", "id", "influads", "style", "width", "1px", "height", "top", "-1000px", "left", "body", "appendChild", "is_visible", "removeChild", "chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/img/icon24.png", "chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/block.html", "chrome-extension://ocifcklkibdehekfnmflempfgjhbedch/components/block/block.html",
"chrome-extension://fndlhnanhedoklpdaacidomdnplcjcpj/img/icon24.png", "chrome-extension://knebimhcckndhiglamoabbnifdkijidd/widgets/block/block.html", "chrome-extension://bgnkhhnnamicmpeenaelnjfhikgbkllg/elemhidehit.png", "chrome-extension://mcefmojpghnaceadnghednjhbmphipkb/img/icon24.png", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "open", "GET", "onload", "status", "push", "keys", "onerror", "send", "stats_impression_location", "ajax_with_fallback", "stats_click_location", "fromCharCode", "block_selectors",
"setProperty", "display", "block", "important", "inline_block_selectors", "inline-block", "inline_selectors", "inline", "list_item_selectors", "list-item", "ad_roots", "split", "map", " *", "prototype", "visibility", "visible", "filter", "indexOf", "defaultDisplay", "li", "setAttribute", "result", "class", "first-result", "h3", "clk", "white-space: nowrap;", "title_", "name", "target", "_blank", "span", "result_url_heading", "ix-icons", "ads_desc_stuff_normal clk", "url", "links_beside_url", "sellerrating",
"padding-left:16px;", "desc clk", "sitelinks", "script", "querySelector", ".result_url_heading", "innerHTML", "h3 > a", "href", "getAttribute", "data-nice-href", ".ads_desc_stuff_normal > .url", "p > a.url", "data", "forEach", "h3 > a, .ads_desc_stuff_normal > .url", "preventDefault", ".sellerrating", "p.desc", ".sitelinks a", ".sitelinks", " - ", "#bottom-result-container > ol:nth-child(", ")", "background-color", "background-image", "background-repeat", "background-attachment", "background-position",
"background-clip", "background-origin", "background-size", ": ", "; ", "concat", "> .head2", "{ display: none; }", " .sitelinks", " .sellerrating", "{ display: block !important; }", " .result", "{ padding-bottom: 13px; }", " .result .clk", "{ cursor: auto !important; }", "{ display: inline !important; }", " .links_beside_url", " { display: none; }", " { ", "; margin-bottom: 10px; }", "#bottom-result-container > ol.didyouMean {display: block! important;}", "head2", "ol", "web_regular_results", "insertBefore",
"firstChild", "onmouseover", "onmouseout", "onclick", "h3 > a[", "]", "substring", "removeAttribute", ".ads_desc_stuff_normal", "ad_elements", "p.head2", "none", ".web_regular_results", "real", "ad", "parentNode", "nextSibling", "#bottom-result-container > *", "head", "theme_change", "#map_box", "offsetHeight", "margin-top", "px", " h3 > a, ", " .ads_desc_stuff_normal > .url", "compatible", "2", "version", "webkit", "safari", "navigator", "cookie", "=", "pop", ";", "shift", "hasOwnProperty", "loading",
"readyState", "DOMContentLoaded", "attachEvent", "onreadystatechange", "offsetWidth", "reduce", "?", "&", "XMLHttpRequest", "r", "toString", "replace", ".", "cb", "_", "SCRIPT", "src", "type", "text/javascript", "getElementsByTagName", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", "table", "table-header-group", "table-row-group", "table-footer-group", "table-column", "table-column-group", "table-row", "table-cell", "table-caption", "tagName", "CustomEvent", "createEvent", "initCustomEvent",
"dispatchEvent", "Error", "RegExp", "parseFloat", "document", "setTimeout", "Math", "JSON", "Object", "String", "Array", "jQuery", "Function", "encodeURIComponent"
];
/** @type {Array} */
args = match = item = parts = args;
/** @type {Window} */
Q = U = Y = T = window;
! function destroy(conditions, acc, a) {
/**
* @param {string} name
* @param {?} deps
* @return {?}
*/
function define(name, deps) {
if (!acc[name]) {
if (!conditions[name]) {
var define = item[0] == typeof require && require;
if (!deps && define) {
return define(name, true);
}
if (ondata) {
return ondata(name, true);
}
/** @type {Error} */
var error = new Error("Could not find module '" + name + "'");
throw error["code"] = "MODULE_NOT_FOUND", error;
}
var r20 = acc[name] = {
exports: {}
};
conditions[name][parts[7]]["call"](r20["exports"], function(word) {
var i = conditions[name][parts[10]][word];
return define(i ? i : word);
}, r20, r20["exports"], destroy, conditions, acc, a);
}
return acc[name]["exports"];
}
var ondata = match[0] == typeof require && require;
/** @type {number} */
var i = 0;
for (; i < a["length"]; i++) {
define(a[i]);
}
return define;
}({
1: [function(require, dataAndEvents, deepDataAndEvents) {
/**
* @return {?}
*/
function getOwnPropertyNames() {
/** @type {number} */
var props = -1;
if (item[12] == navigator["appName"]) {
var resp = navigator["userAgent"];
var collection = new Y["RegExp"](parts[15]);
if (null != collection["exec"](resp)) {
props = U["parseFloat"](Y["RegExp"]["$1"]);
}
}
return props;
}
if (-1 === getOwnPropertyNames() || getOwnPropertyNames() >= 9) {
var target = require(5);
var $ = require(7);
var querystring = require(6);
var o = require(2);
var entities = require(4);
/**
* @param {?} context
* @param {(Object|null)} data
* @return {undefined}
*/
var initialize = function(context, data) {
if (o[args[18]]) {
var res = T["document"]["querySelectorAll"](context);
var evt = {
m: data
};
evt = $["extend"]({}, evt, o["extra_reporting"]);
/**
* @return {undefined}
*/
var logMsg = function() {
target[args[22]](evt);
};
/** @type {number} */
var i = 0;
for (; i < res["length"]; i++) {
res[i]["addEventListener"](match[24], logMsg, false);
}
}
};
/**
* @param {(Range|TextRange|null)} value
* @param {Object} failing_message
* @return {?}
*/
var report = function(value, failing_message) {
return value ? failing_message["toUpperCase"]() : failing_message["toLowerCase"]();
};
/** @type {number} */
var d = 5;
/**
* @return {?}
*/
var init = function() {
var camelKey;
var udataCur;
var pdataOld;
var result = Y[args[27]] || false;
var pdataCur = T[args[28]] || false;
if (pdataOld = !!Y["document"]["querySelectorAll"](o["ad_visible_check_selectors"])["length"], udataCur = false, pdataOld) {
if (camelKey = !$["check_selector_visible"](o["ad_visible_check_selectors"])) {
var ret = result || pdataCur && entities[args[31]]();
if (ret || querystring[args[32]](), udataCur = $["check_selector_visible"](o["ad_visible_check_selectors"]), ret || udataCur) {
initialize(o[args[33]], udataCur);
} else {
var clrs = querystring[args[34]]();
udataCur = !!clrs["length"] && $["check_selector_visible"](clrs["join"](parts[36]));
if (clrs["length"]) {
initialize(clrs["join"](","), udataCur);
}
}
} else {
if (d) {
return d--, void Q[args[281]](init, 100);
}
}
}
/** @type {string} */
var actual = "";
actual += report(false, item[38]);
actual += report(result, args[39]);
actual += report(pdataCur, parts[40]);
actual += report(pdataOld, args[41]);
actual += report(camelKey, args[42]);
actual += report(udataCur, parts[43]);
var data = {
z: actual
};
data = $["extend"]({}, data, o["extra_reporting"]);
if (o[args[44]]) {
data["w"] = entities["detect_whitelisting"]();
}
if (o["detect_extensions_enabled"] && ($["browser"]["chrome"] && Y["Math"]["random"]() < 0.001)) {
detected_extensions = entities["detect_chrome_extensions"](function(e) {
data["e"] = U["JSON"]["stringify"](e);
target["report_page_view"](data);
});
} else {
target["report_page_view"](data);
}
};
$[args[55]](function() {
init();
});
}
}, {}],
2: [function(require, global, dataAndEvents) {
var assert = require(3);
global["exports"] = assert;
}, {}],
3: [function(dataAndEvents, global, deepDataAndEvents) {
global["exports"] = {
ad_visible_check_selectors: parts[56],
block_selectors: item[37],
inline_block_selectors: "#spon_links .result a.url",
inline_selectors: parts[37],
list_item_selectors: parts[37],
ad_roots: match[58],
ad_elements: ".result",
click_listener_selector: parts[60],
stats_click_location: U["ras_cl"],
stats_impression_location: T["ras_il"],
extra_reporting: {},
click_reporting_enabled: false,
detect_whitelisting_enabled: false,
detect_extensions_enabled: false
};
}, {}],
4: [function(require, global, dataAndEvents) {
var Block = require(2);
var $ = require(7);
/**
* @return {?}
*/
var init = function() {
var o = Y["document"]["querySelectorAll"](Block["ad_visible_check_selectors"]);
/** @type {number} */
var i = 0;
for (; i < o["length"]; i++) {
if ($["is_hidden"](o[i])) {
return true;
}
}
return false;
};
/**
* @return {?}
*/
var matchArray = function() {
var stack = T["document"]["querySelectorAll"](Block["ad_visible_check_selectors"]);
/** @type {number} */
var i = 0;
for (; i < stack["length"]; i++) {
var locks = Y["getComputedStyle"](stack[i]);
if (args[65] === locks[args[66]](parts[67])) {
return false;
}
}
return true;
};
/**
* @return {?}
*/
var appendChild = function() {
var o = Q["document"]["createElement"](args[69]);
o["id"] = item[71];
o["style"][args[73]] = match[74];
o["style"][args[75]] = match[74];
o["style"][args[76]] = parts[77];
o["style"][args[78]] = item[77];
Q["document"][args[79]]["appendChild"](o);
var prop = $[args[81]](o);
return Q["document"][args[79]][args[82]](o), prop;
};
/**
* @param {?} req
* @return {undefined}
*/
var connect = function(req) {
var types = {
adblock: "chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/img/icon24.png",
adblock_plus: "chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/block.html",
adblock_pro: "chrome-extension://ocifcklkibdehekfnmflempfgjhbedch/components/block/block.html",
adblock_premium: "chrome-extension://fndlhnanhedoklpdaacidomdnplcjcpj/img/icon24.png",
adblock_super: "chrome-extension://knebimhcckndhiglamoabbnifdkijidd/widgets/block/block.html",
adguard: "chrome-extension://bgnkhhnnamicmpeenaelnjfhikgbkllg/elemhidehit.png",
adremover: "chrome-extension://mcefmojpghnaceadnghednjhbmphipkb/img/icon24.png"
};
var special = {
adblock: "a0",
adblock_plus: "a1",
adblock_pro: "a2",
adblock_premium: "a3",
adblock_super: "a4",
adguard: "a5",
adremover: "a6"
};
/** @type {Array} */
var missing = [];
/** @type {number} */
var length = 0;
/**
* @param {string} type
* @param {?} url
* @return {undefined}
*/
var connect = function(type, url) {
var request = new U["XMLHttpRequest"];
request["open"]("GET", url, true);
/**
* @return {undefined}
*/
request[args[99]] = function() {
if (request[args[100]] >= 200) {
if (request[args[100]] < 400) {
missing["push"](special[type]);
}
}
length += 1;
if (length === T[args[284]][args[102]](types)["length"]) {
req(missing);
}
};
/**
* @return {undefined}
*/
request[args[103]] = function() {
length += 1;
if (length === T[args[284]][args[102]](types)["length"]) {
req(missing);
}
};
request["send"]();
};
var type;
for (type in types) {
connect(type, types[type]);
}
};
global["exports"] = {
/** @type {function (): ?} */
is_adblocker: init,
/** @type {function (): ?} */
is_abp_adblocker: matchArray,
/** @type {function (?): undefined} */
detect_chrome_extensions: connect,
/** @type {function (): ?} */
detect_whitelisting: appendChild
};
}, {}],
5: [function(require, global, dataAndEvents) {
var querystring = require(7);
var nodes = require(2);
/**
* @param {?} dataAndEvents
* @return {undefined}
*/
var clone = function(dataAndEvents) {
var r20 = dataAndEvents;
var rootNode = nodes[args[105]];
querystring["ajax_with_fallback"](rootNode, r20);
};
/**
* @param {?} opt_obj2
* @return {undefined}
*/
var insertBefore = function(opt_obj2) {
var rootNode = nodes["stats_click_location"];
querystring["ajax_with_fallback"](rootNode, opt_obj2);
};
global["exports"] = {
/** @type {function (?): undefined} */
report_page_view: clone,
/** @type {function (?): undefined} */
report_click: insertBefore
};
}, {}],
6: [function(require, global, dataAndEvents) {
var querystring = require(2);
var filters = require(7);
var angle = Y["String"]["fromCharCode"](10);
/**
* @return {undefined}
*/
var getOwnPropertyNames = function() {
var i;
if (querystring["block_selectors"]) {
var stack = Y["document"]["querySelectorAll"](querystring["block_selectors"]);
/** @type {number} */
i = 0;
for (; i < stack["length"]; i++) {
stack[i]["style"]["setProperty"](match[111], parts[112], parts[113]);
}
}
if (querystring["inline_block_selectors"]) {
var iterable = T["document"]["querySelectorAll"](querystring["inline_block_selectors"]);
/** @type {number} */
i = 0;
for (; i < iterable["length"]; i++) {
iterable[i]["style"]["setProperty"](match[111], "inline-block", item[113]);
}
}
if (querystring["inline_selectors"]) {
var methods = Q["document"]["querySelectorAll"](querystring["inline_selectors"]);
/** @type {number} */
i = 0;
for (; i < methods["length"]; i++) {
methods[i]["style"]["setProperty"](match[111], "inline", parts[113]);
}
}
if (querystring["list_item_selectors"]) {
var obj = T["document"]["querySelectorAll"](querystring["list_item_selectors"]);
/** @type {number} */
i = 0;
for (; i < obj["length"]; i++) {
obj[i]["style"]["setProperty"](parts[111], "list-item", parts[113]);
}
}
var cacheKey = querystring["ad_roots"] + parts[36] + querystring["ad_roots"]["split"](item[36])["map"](function(_) {
return _ + item[123];
})["join"](item[36]);
var cached = Q["document"]["querySelectorAll"](cacheKey);
Y["Array"]["prototype"]["map"]["call"](cached, function(element) {
element["style"]["setProperty"]("visibility", parts[126], parts[113]);
});
var r20 = Y["document"]["querySelectorAll"]([querystring["block_selectors"], querystring["inline_block_selectors"], querystring["inline_selectors"], querystring["list_item_selectors"]]["filter"](function(dataAndEvents) {
return dataAndEvents;
})["join"](match[36]));
cached = Y["Array"]["prototype"]["filter"]["call"](cached, function(deepDataAndEvents) {
return -1 === Y["Array"]["prototype"]["indexOf"]["call"](r20, deepDataAndEvents);
});
U["Array"]["prototype"]["map"]["call"](cached, function(element) {
element["style"]["setProperty"](match[111], filters["defaultDisplay"](element), match[113]);
});
};
/**
* @param {number} keepData
* @return {?}
*/
var check = function(keepData) {
/** @type {number} */
var _ = keepData + 1;
var element = Y["document"]["createElement"]("li");
element["setAttribute"]("id", "result" + _);
var g = T["document"]["createElement"](item[69]);
element["appendChild"](g);
g["setAttribute"](parts[133], match[132]);
if (1 === _) {
g["setAttribute"](parts[70], args[134]);
}
var el = T["document"]["createElement"](parts[135]);
el["setAttribute"](item[133], parts[136]);
el["setAttribute"](item[72], "white-space: nowrap;");
g["appendChild"](el);
var node = T["document"]["createElement"](parts[42]);
node["setAttribute"]("id", item[138] + _);
node["setAttribute"](parts[139], parts[138] + _);
node["setAttribute"](match[140], parts[141]);
el["appendChild"](node);
var stroke = T["document"]["createElement"](match[142]);
stroke["setAttribute"](item[133], match[143]);
node["appendChild"](stroke);
var ig = U["document"]["createElement"](match[69]);
ig["setAttribute"]("class", parts[144]);
el["appendChild"](ig);
var tspan = U["document"]["createElement"](item[41]);
tspan["setAttribute"](match[133], parts[145]);
g["appendChild"](tspan);
var r20 = U["document"]["createElement"](parts[142]);
r20["setAttribute"]("class", match[146]);
tspan["appendChild"](r20);
var restoreScript = Q["document"]["createElement"](parts[142]);
restoreScript["setAttribute"](item[133], args[147]);
tspan["appendChild"](restoreScript);
var cnvs = Q["document"]["createElement"](match[142]);
cnvs["setAttribute"](match[133], match[148]);
cnvs["setAttribute"]("style", match[149]);
tspan["appendChild"](cnvs);
var i = Q["document"]["createElement"](parts[41]);
i["setAttribute"](match[133], item[150]);
g["appendChild"](i);
var o = Q["document"]["createElement"](item[41]);
o["setAttribute"](match[133], item[151]);
g["appendChild"](o);
var type = T["document"]["createElement"](parts[152]);
return element["appendChild"](type), element;
};
/**
* @param {Object} object
* @param {number} key
* @return {?}
*/
var traverse = function(object, key) {
var node = check(key);
node["querySelector"](match[154])["innerHTML"] = object["querySelector"](item[154])["innerHTML"];
node["querySelector"]("h3 > a")["setAttribute"]("href", object["querySelector"](item[156])["getAttribute"](item[159]));
node["querySelector"](parts[160])["innerHTML"] = object["querySelector"](match[161])["innerHTML"];
var y = Q["jQuery"](object["querySelector"](item[156]))["data"]("href");
Y["Array"]["prototype"]["forEach"]["call"](node["querySelectorAll"](match[164]), function(WindowPrototype) {
WindowPrototype["addEventListener"](item[24], function(event) {
event["preventDefault"]();
Y["open"](y, parts[141]);
});
});
if (null !== object["querySelector"](parts[166])) {
node["querySelector"](parts[166])["innerHTML"] = object["querySelector"](match[166])["innerHTML"];
}
node["querySelector"](item[167])["innerHTML"] = object["querySelector"](parts[167])["innerHTML"];
var stack = object["querySelectorAll"](item[168]);
/** @type {number} */
var i = 0;
for (; i < stack["length"]; i++) {
var el = Q["document"]["createElement"](args[42]);
el["innerHTML"] = stack[i]["innerHTML"];
el["setAttribute"](item[157], object["querySelector"]("h3 > a")["getAttribute"]("data-nice-href"));
el["addEventListener"](parts[24], function(deepDataAndEvents) {
return function(event) {
event["preventDefault"]();
Q["open"](deepDataAndEvents, item[141]);
};
}(stack[i]["getAttribute"](match[157])));
node["querySelector"](match[169])["appendChild"](el);
if (i !== stack["length"] - 1) {
node["querySelector"](item[169])["innerHTML"] = node["querySelector"](parts[169])["innerHTML"] + item[170];
}
}
return node;
};
/**
* @param {?} deepDataAndEvents
* @return {?}
*/
var _ = function(deepDataAndEvents) {
return match[171] + deepDataAndEvents + parts[172];
};
/**
* @param {(Node|null|string)} element
* @return {?}
*/
var resize = function(element) {
/** @type {Array} */
var from = [match[173], parts[174], "background-repeat", "background-attachment", "background-position", item[178], item[179], parts[180]];
var spaceAfter = parts[37];
return element && (computedStyle = U["getComputedStyle"](element), spaceAfter = from["map"](function(p) {
return p + args[181] + computedStyle[args[66]](p);
})["join"](item[182])), spaceAfter;
};
/**
* @param {(Array|null)} el
* @param {(Array|null)} params
* @param {(Array|null)} regex
* @return {?}
*/
var on = function(el, params, regex) {
var p = el["map"](_);
var dashes = regex["map"](_);
var config = params["map"](_);
var s = [][args[183]]([p["map"](function(_) {
return _ + item[184];
})["join"](parts[36]) + parts[185], p["map"](function(remainder) {
return remainder + parts[186];
})["join"](",") + item[185], p["map"](function(s) {
return s + args[187];
})["join"](item[36]) + args[185], config["map"](function(_) {
return _ + item[184];
})["join"](parts[36]) + item[188], config["map"](function(_) {
return _ + item[189];
})["join"](",") + item[190], config["map"](function(relpath) {
return relpath + match[191];
})["join"](item[36]) + item[192], config["map"](function(remainder) {
return remainder + parts[186];
})["join"](",") + item[188], config["map"](function(_) {
return _ + item[187];
})["join"](",") + parts[193], config["map"](function(s) {
return s + args[194];
})["join"](match[36]) + item[185], dashes["join"](match[36]) + item[195], config["join"](item[36]) + item[196] + resize(Q["document"]["querySelector"](item[58])) + parts[197], item[198]])["join"](angle);
var div = Y["document"]["createElement"](parts[72]);
return div["innerHTML"] = s, div;
};
/**
* @return {?}
*/
var createElement = function() {
var el = U["document"]["createElement"](parts[41]);
return el["setAttribute"]("class", item[199]), el;
};
/**
* @param {(Array|null)} args
* @return {?}
*/
var callback = function(args) {
var node = T["document"]["createElement"](item[200]);
node["setAttribute"](parts[133], parts[201]);
node["appendChild"](createElement());
/** @type {number} */
var i = 0;
for (; i < args["length"]; i++) {
node["appendChild"](args[i]);
}
return node;
};
/**
* @param {Object} obj
* @return {undefined}
*/
var add = function(obj) {
obj["insertBefore"](createElement(), obj["firstChild"]);
/** @type {Array} */
var vals = ["onmouseover", match[205], item[206]];
/** @type {number} */
var i = 0;
for (; i < vals["length"]; i++) {
var stack = obj["querySelectorAll"](match[207] + vals[i] + item[208]);
/** @type {number} */
var offset = 0;
for (; offset < stack["length"]; offset++) {
var val = vals[i];
var str = stack[offset]["getAttribute"](val);
var dataBuffer = new T["Function"](str);
var domContentLoaded = val["substring"](2, val["length"]);
stack[offset]["addEventListener"](domContentLoaded, dataBuffer);
stack[offset]["removeAttribute"](val);
}
}
stack = obj["querySelectorAll"](item[211]);
/** @type {number} */
i = 0;
for (; i < stack["length"]; i++) {
var el = T["document"]["createElement"](parts[142]);
el["setAttribute"](match[133], "sellerrating");
el["setAttribute"]("style", item[149]);
stack[i]["appendChild"](el);
}
stack = obj["querySelectorAll"](".result");
/** @type {number} */
i = 0;
for (; i < stack["length"]; i++) {
var node = Y["document"]["createElement"](parts[41]);
node["setAttribute"](parts[133], item[151]);
stack[i]["appendChild"](node);
}
};
/**
* @return {?}
*/
var init = function() {
var stack = Y["document"]["querySelectorAll"](querystring["ad_roots"]);
stack = U["Array"]["prototype"]["map"]["call"](stack, function(element) {
var r20 = element["querySelectorAll"](querystring["ad_elements"]);
var typePattern = Q["Array"]["prototype"]["map"]["call"](r20, traverse);
var current = callback(typePattern);
return current["querySelector"](item[213])["innerHTML"] = element["querySelector"](parts[213])["innerHTML"], element["style"]["setProperty"](match[111], match[214], match[113]), current;
});
var i;
var data = U["document"]["querySelectorAll"](match[215]);
/** @type {number} */
i = 0;
for (; i < data["length"]; i++) {
/** @type {boolean} */
data[i]["real"] = true;
add(data[i]);
}
/** @type {number} */
i = 0;
for (; i < stack["length"]; i++) {
/** @type {boolean} */
stack[i]["real"] = true;
/** @type {boolean} */
stack[i]["ad"] = true;
if (0 === i) {
data["0"]["parentNode"]["insertBefore"](stack[i], data[item[7]]);
} else {
data[data["length"] - 1]["parentNode"]["insertBefore"](stack[i], data[data["length"] - 1]["nextSibling"]);
}
/** @type {number} */
var o = 0;
for (; o < 10 * U["Math"]["random"](); o++) {
/** @type {Array} */
var count = [];
/** @type {number} */
var key = 0;
for (; key < 6 * Y["Math"]["random"](); key++) {
count["push"](check(key));
}
var value = callback(count);
if (U["Math"]["random"]() > 0.5) {
stack[i]["parentNode"]["insertBefore"](value, stack[i]);
} else {
stack[i]["parentNode"]["insertBefore"](value, stack[i]["nextSibling"]);
}
}
}
var iterable = U["document"]["querySelectorAll"](match[220]);
/** @type {Array} */
var failuresLink = [];
/** @type {Array} */
var r20 = [];
/** @type {Array} */
var config = [];
/** @type {number} */
i = 0;
for (; i < iterable["length"]; i++) {
if (iterable[i]["real"]) {
delete iterable[i]["real"];
failuresLink["push"](i + 1);
} else {
r20["push"](i + 1);
}
if (iterable[i]["ad"]) {
delete iterable[i]["ad"];
config["push"](i + 1);
}
}
/**
* @return {undefined}
*/
var init = function() {
var oldconfig = on(failuresLink, config, r20);
T["document"]["head"]["appendChild"](oldconfig);
};
init();
/** @type {function (): undefined} */
Y["theme_change"] = init;
var element = Y["document"]["querySelector"](match[223]);
if (null !== element) {
var ANON = Y["document"]["querySelector"](_(config["0"]))["offsetHeight"];
element["style"]["setProperty"](item[225], ANON + 20 + match[226]);
}
var enabled = config["map"](function(deepDataAndEvents) {
return ad_selector = _(deepDataAndEvents), ad_selector + match[227] + ad_selector + match[228];
});
return enabled;
};
global["exports"] = {
/** @type {function (): undefined} */
apply_display_none_overrides: getOwnPropertyNames,
/** @type {function (): ?} */
obfuscate_and_restore_ads: init
};
}, {}],
7: [function(dataAndEvents, global, deepDataAndEvents) {
/**
* @param {(Text|null)} classNames
* @return {?}
*/
var detectBrowser = function(classNames) {
/**
* @return {?}
*/
function uaMatch() {
classNames = classNames["toLowerCase"]();
var obj = /(maxthon)[ \/]([\w.]+)/ ["exec"](classNames) || (/(ucbrowser)[ \/]([\w.]+)/ ["exec"](classNames) || (/(chrome)[ \/]([\w.]+)/ ["exec"](classNames) || (/(webkit)[ \/]([\w.]+)/ ["exec"](classNames) || (/(opera)(?:.*version|)[ \/]([\w.]+)/ ["exec"](classNames) || (/(msie) ([\w.]+)/ ["exec"](classNames) || (classNames["indexOf"](match[229]) < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/ ["exec"](classNames) || []))))));
return {
browser: obj[item[10]] || "",
version: obj[parts[230]] || match[7]
};
}
return matched = uaMatch(), browser = {}, matched["browser"] && (browser[matched["browser"]] = true, browser["version"] = matched["version"]), browser["chrome"] ? browser["webkit"] = true : browser["webkit"] && (browser["safari"] = true), browser;
};
var browser = function() {
return detectBrowser(Q[args[234]]["userAgent"]);
}();
/**
* @param {?} replace
* @return {?}
*/
var getOwnPropertyNames = function(replace) {
var tokens = ";" + T["document"]["cookie"];
var result = tokens["split"](parts[182] + replace + parts[236]);
return 2 == result["length"] ? result["pop"]()["split"](match[238])["shift"]() : void 0;
};
/**
* @param {(Object|null)} destination
* @return {?}
*/
var extend = function(destination) {
/** @type {Object} */
destination = destination || {};
/** @type {number} */
var i = 1;
for (; i < arguments["length"]; i++) {
if (arguments[i]) {
var property;
for (property in arguments[i]) {
if (arguments[i][args[240]](property)) {
destination[property] = arguments[i][property];
}
}
}
}
return destination;
};
/**
* @param {?} fn
* @return {undefined}
*/
var addEvent = function(fn) {
if (parts[241] != U["document"]["readyState"]) {
fn();
} else {
if (Q["document"]["addEventListener"]) {
Q["document"]["addEventListener"]("DOMContentLoaded", fn);
} else {
T["document"]["attachEvent"](item[245], function() {
if (item[241] != T["document"]["readyState"]) {
fn();
}
});
}
}
};
/**
* @param {?} plot
* @return {?}
*/
var thresholdData = function(plot) {
return !positionTooltip(plot);
};
/**
* @param {Object} plot
* @return {?}
*/
var positionTooltip = function(plot) {
return !plot["offsetWidth"] || !plot["offsetHeight"];
};
/**
* @param {?} key
* @return {?}
*/
var traverse = function(key) {
var camelKey = Q["document"]["querySelectorAll"](key);
return !!camelKey["length"] && U["Array"]["prototype"]["reduce"]["call"](camelKey, function(dataAndEvents, plot) {
return dataAndEvents && thresholdData(plot);
}, true);
};
/**
* @param {string} key
* @return {?}
*/
var fn = function(key) {
return Q["encodeURIComponent"](key);
};
/**
* @return {?}
*/
var init = function() {
return Y["Math"]["random"]();
};
/**
* @param {(Object|null)} iterable
* @return {?}
*/
var forEach = function(iterable) {
var result = match[248];
for (key in iterable) {
result += fn(key) + parts[236] + fn(iterable[key]) + item[249];
}
return result["substring"](0, result["length"] - 1);
};
/**
* @param {?} delayInitialWork
* @param {(Object|null)} elements
* @param {string} data
* @return {undefined}
*/
var poll = function(delayInitialWork, elements, data) {
if (T["XMLHttpRequest"]) {
var openLine = new Y["XMLHttpRequest"];
openLine["open"]("GET", delayInitialWork + forEach(elements), true);
openLine["send"]();
} else {
if (elements = elements || {}, data = data || null, null != data) {
var unlock = item[251] + init()["toString"]()[args[253]](match[254], item[37]);
elements[args[255]] = unlock;
/** @type {(null|string)} */
T[unlock] = data;
}
elements[args[256]] = init();
var o = Y["document"]["createElement"](parts[257]);
o[args[258]] = delayInitialWork + forEach(elements);
/** @type {string} */
o[args[259]] = "text/javascript";
var g = T["document"]["head"] || Y["document"][args[261]]("head")[match[7]];
g["appendChild"](o);
}
};
/**
* @return {?}
*/
var split = function() {
var e = item[262]["split"](match[37]);
return e[~~(52 * Y["Math"]["random"]())];
};
var defaults = {
html: match[112],
head: args[214],
link: parts[214],
meta: match[214],
script: args[214],
style: args[214],
title: args[214],
body: item[112],
p: match[112],
address: parts[112],
article: parts[112],
aside: args[112],
div: item[112],
footer: item[112],
header: parts[112],
hgroup: item[112],
layer: item[112],
main: match[112],
nav: args[112],
section: parts[112],
marquee: args[112],
blockquote: item[112],
figcaption: match[112],
figure: item[112],
q: match[112],
center: match[112],
hr: parts[112],
h1: args[112],
h2: parts[112],
h3: item[112],
h4: args[112],
h5: args[112],
h6: args[112],
table: match[263],
thead: args[264],
tbody: match[265],
tfoot: parts[266],
col: match[267],
colgroup: match[268],
tr: match[269],
td: parts[270],
th: item[270],
caption: match[271],
ul: parts[112],
menu: parts[112],
dir: parts[112],
ol: item[112],
li: parts[112],
dd: parts[112],
dl: args[112],
dt: match[112],
form: args[112],
legend: match[112],
fieldset: match[112],
area: parts[214],
param: item[214],
output: "inline",
meter: item[115],
progress: parts[115],
pre: parts[112],
xmp: args[112],
plaintext: match[112],
listing: match[112],
"ruby > rt": parts[112],
"ruby > rp": item[112],
noframes: match[214],
frameset: args[112],
frame: match[112],
details: args[112],
summary: match[112],
a: parts[117],
b: "inline",
i: match[117],
ins: parts[117],
strong: parts[117],
cite: "inline",
em: match[117],
var: parts[117],
tt: match[117],
code: match[117],
kdb: parts[117],
samp: "inline",
span: match[117]
};
/**
* @param {Object} opt_tagWhitelist
* @return {?}
*/
var $$stripHtmlTags = function(opt_tagWhitelist) {
return defaults[opt_tagWhitelist["tagName"]["toLowerCase"]()];
};
/**
* @param {Object} self
* @param {string} type
* @param {(Object|null)} data
* @return {undefined}
*/
var fire = function(self, type, data) {
var e;
/** @type {Object} */
data = data || {};
if (Q["CustomEvent"]) {
/** @type {CustomEvent} */
e = new CustomEvent(type, {
detail: data
});
} else {
e = T["document"]["createEvent"]("CustomEvent");
e["initCustomEvent"](type, true, true, data);
}
self["dispatchEvent"](e);
};
global["exports"] = {
/** @type {function (?): ?} */
get_cookie: getOwnPropertyNames,
/** @type {function ((Object|null)): ?} */
extend: extend,
/** @type {function (?): undefined} */
ready: addEvent,
/** @type {function (Object): ?} */
is_hidden: positionTooltip,
/** @type {function (?): ?} */
is_visible: thresholdData,
/** @type {function (?): ?} */
check_selector_visible: traverse,
/** @type {function (string): ?} */
url_encode: fn,
/** @type {function ((Object|null)): ?} */
create_query_string: forEach,
/** @type {function (?, (Object|null), string): undefined} */
ajax_with_fallback: poll,
browser: browser,
/** @type {function (): ?} */
getRandomCharacter: split,
/** @type {function (Object): ?} */
defaultDisplay: $$stripHtmlTags,
/** @type {function (Object, string, (Object|null)): undefined} */
trigger: fire
};
}, {}]
}, {}, [1]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment