弹窗阻止程序脚本

用于阻止所有类型弹窗的最有效用户脚本。为防范最狡猾的弹窗而设计,包括成人和流媒体网站上的弹窗。

  1. // ==UserScript==
  2. // @name Popup Blocker Script
  3. // @name:zh-CN 弹窗阻止程序脚本
  4. // @namespace https://popupblockerscript.com/
  5. // @version 0.6
  6. // @description The most efficient user script for blocking popups of all types. Designed to fight the sneakiest popups including the ones on adult and streaming websites.
  7. // @description:zh-CN 用于阻止所有类型弹窗的最有效用户脚本。为防范最狡猾的弹窗而设计,包括成人和流媒体网站上的弹窗。
  8. // @author Mike Kyshenko
  9. // @match https://*/*
  10. // @match http://*/*
  11. // @grant GM_listValues
  12. // @grant GM_deleteValue
  13. // @grant GM_setValue
  14. // @grant GM_getValue
  15. // @grant GM_getResourceURL
  16. // @grant GM_getResourceText
  17. // @grant GM_addStyle
  18. // @grant GM_xmlhttpRequest
  19. // @connect re.popupblockerscript.com
  20. // @connect self
  21. // @connect *
  22. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
  23. // ==/UserScript==
  24. const LANG = {
  25. EN: {
  26. "notificationMessage": {
  27. "message": "Popup Blocked"
  28. },
  29. "overlayWasBlocked": {
  30. "message": "Overlay Blocked"
  31. },
  32. "allowOnce": {
  33. "message": "Show popup once"
  34. },
  35. "allowAlways": {
  36. "message": "Whitelist this site"
  37. },
  38. "NTF_allowOverlayOnce": {
  39. "message": "Allow overlay once"
  40. }
  41. },
  42.  
  43. "CN":{
  44. "notificationMessage": {
  45. "message": "弹窗被阻止"
  46. },
  47. "overlayWasBlocked": {
  48. "message": "叠加弹窗被阻止"
  49. },
  50. "allowOnce": {
  51. "message": "显示一次弹窗"
  52. },
  53. "allowAlways": {
  54. "message": "允许此网站上的弹窗"
  55. },
  56. "NTF_allowOverlayOnce": {
  57. "message": "显示一次弹窗"
  58. }
  59. }
  60. };
  61. !function(modules) {
  62. var installedModules = {};
  63. function __webpack_require__(moduleId) {
  64. if (installedModules[moduleId]) return installedModules[moduleId].exports;
  65. var module = installedModules[moduleId] = {
  66. i: moduleId,
  67. l: !1,
  68. exports: {}
  69. };
  70. return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
  71. module.l = !0, module.exports;
  72. }
  73. __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) {
  74. __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {
  75. enumerable: !0,
  76. get: getter
  77. });
  78. }, __webpack_require__.r = function(exports) {
  79. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
  80. value: "Module"
  81. }), Object.defineProperty(exports, "__esModule", {
  82. value: !0
  83. });
  84. }, __webpack_require__.t = function(value, mode) {
  85. if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value;
  86. if (4 & mode && "object" == typeof value && value && value.__esModule) return value;
  87. var ns = Object.create(null);
  88. if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", {
  89. enumerable: !0,
  90. value: value
  91. }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {
  92. return value[key];
  93. }.bind(null, key));
  94. return ns;
  95. }, __webpack_require__.n = function(module) {
  96. var getter = module && module.__esModule ? function() {
  97. return module.default;
  98. } : function() {
  99. return module;
  100. };
  101. return __webpack_require__.d(getter, "a", getter), getter;
  102. }, __webpack_require__.o = function(object, property) {
  103. return Object.prototype.hasOwnProperty.call(object, property);
  104. }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 1);
  105. }([ function(module, __webpack_exports__, __webpack_require__) {
  106. "use strict";
  107. __webpack_exports__.a = {
  108. defaultWhiteList: [ "engage.wixapps.net", "linkedin.com", "google", "www.gmail.com", "www.pinterest.com", "www.youtube.com", "www.facebook.com", "search.yahoo.com", "chrome://newtab", "www.food.com" ],
  109. defaultBlackList: [ "adrunnr", "successforyu.clickfunnels.com", "fmovies.se", "in-365-tagen.info", "5000-settimanale.com", "shop.mazzugioielli.com", "maxigossip.com", "lp.yazizim.com", "beyourxfriend.com", "99tab.com", "zzqrt.com", "canuck-method.net", "bewomenly.com", "playnow.guru", "datingforyou-48e1.kxcdn.com", "trafficnetworkads24.com", "sistemadedinerogratis.com", "canuckmethodprofit.co", "consumerresearchnetwork.com", "securemacfix.com", "zz3d3.ru", "zd1.quebec-bin.com", "hot-games4you.xyz", "om.elvenar.com", "superpccleanup.com", "gomediaz.com", "judithi.xyz", "free.atozmanuals.com", "yoursuccess.ravpage.co.il", "123hop.ir", "quizcliente.pw", "aussiemethod.biz", "hlpnowp-c.com", "picbumper.com", "shaneless.com", "anacondamonster.com", "altrk1.com", "health.todaydiets.com", "download.weatherblink.com", "happyluketh.com", "go.ameinfo.com", "50kaweek.net", "thepornsurvey.com", "ofsiite.ru", "fulltab.com", "1000spins.com", "time2play-online.net", "vintacars.com", "welcome.pussysaga.com", "free-desktop-games.com", "download.televisionfanatic.com", "theprofitsmaker.net", "sgad.info", "algocashmaster.net", "sunmaker.com", "topvipdreams.com", "watchmygirlfriend.gfpornvideos.com", "filesharefanatic.com", "safedownloadhub.com", "7awlalalam.blogspot.com", "tvplusnewtab.com", "trendingpatrol.com", "moneymorning.com", "ifileyou.com", "classifiedcanada.ca", "firefan.com", "methode-binaire.com", "letmetell.com", "kenduktur.com", "getafuk.com", "yotraleplahnte.ru", "jackpot.88beto.com", "pwwysydh.com", "search.queryrouter.com", "v.lvztxy.com", "pussysaga.com", "saffamethod.com", "prezzonline.com", "searchprivacy.website", "3d2819216eb4e1035879-7c248de0c99745406e9b749fc86ec3e4.ssl.cf1.rackcdn.com", "only2date.com", "mysagagame.com", "themillionaireinpjs.net", "wlt.kd2244.com", "quickprivacycheck.com", "hotchatdate.com", "autotraderbot.com", "z1.zedo.com", "youlucky2014.com", "traffic.getmyads.com", "appcloudprotected.com", "safensecure.com-allsites3.xyz", "newpoptab.com", "static.williamhill.com", "myhealthyblog.co", "greatestmobideals.com", "sweetclarity.com", "mgid.com", "securepccure.com", "autopengebygger.com", "am15.net", "es.reimageplus.com", "o2.promos-info.com", "it.reimageplus.com", "westsluts.com", "spinandwin.com-ser.pw", "reimageplus.com", "vodafone.promos-info.com", "vinnmatpengar.se", "movie.ienjoyapps.com", "love4single.com", "origin.getprice.com.au", "ohmydating.com", "lp.want-to-win.com", "yabuletchrome.ru", "bamdad.net", "gotositenow.com", "vcrypt.pw", "newtabtv.com", "mon.setsu.xyz", "youforgottorenewyourhosting.com", "zone-telechargement.ws", "land.pckeeper.software", "ad.adpop-1.com", "advancedpctools.com", "videos.randolphcountyheraldtribune.com", "web-start.org", "softreadynow.installupgradenowfreshandforyou.website", "uplod.ws", "pornhubcasino.com", "maxbet.ro", "2016prizefeed.com", "thevideo.me", "wantubad.com", "tavanero.com", "xcusmy.club", "daclips.in", "gaymenofporn.online", "jackpotcitycasino.com", "italian-method.com", "getsearchincognito.com", "youjustwonprize.com", "finanz-nachrichten.me", "quizcliente.site", "da.reimageplus.com", "jkanime.net", "britmoneymethod.com", "uae.souq.com", "ka.azzer.net", "safensecure.xyz", "8t.hootingrhejkz.online", "www6.blinkx.com", "wizzcaster.com", "comparaison-prix.com", "vodlocker.lol", "fr.reimageplus.com", "free.fromdoctopdf.com", "userscloud.com", "myprivatesearch.com", "fanli90.cn", "tutticodicisconto.it", "mediadec.com", "gogamego.thewhizproducts.com", "download.weatherblink.com", "free.videodownloadconverter.com", "we-are-gamers.com", "sesso.communityadult.net", "lp.blpmovies.com", "search.queryrouter.com", "bbb-johannesburg.localspecific.com", "lp.blpmovies.com", "go.ppixelm.com", "r0.ru", "sesso.communityadult.net", "bbb-johannesburg.localspecific.com", "ppixelm.com", "cyberguardianspe.info", "we-are-gamers.com", "loginfaster.com/new", "www.alfacart.com", "www.foresee.com", "mobile-win.com", "www.plusnetwork.com", "www.amicafarmacia.com", "www.ienjoyapps.com", "cheapcheap.io", "screenaddict.thewhizproducts.com", "nova.rambler.ru", "free.gamingwonderland.com", "p9328ujeiw1.ru", "mobilecasinoclub.co.uk", "pfhsystem.com", "regtuneup.com", "theprofitsmaker.net", "bodogpromotions.eu", "heroesreplay.org", "financialsecrets.info", "mymoneymakingapp.com", "sunmaker.com", "888casino-promotions.com", "vogliosesso.com", "scienceremix.com", "allinonedocs.com", "arabia.starzplay.com", "allirishcasino.com", "advancepctools.info", "movie.ienjoyapps.com", "surveyform001.s3-website-us-east-1.amazonaws.com", "mgs188.com", "pfhsystem.com", "lpeva.com", "ddsh8.com", "theprofitsmaker.net", "b2.ijquery11.com", "sporthero.thewhizmarketing.com", "securefastmac.tech", "seen-on-screen.thewhizmarketing.com", "1000spins.com", "search.queryrouter.com", "pfhsystem.com", "reimageplus.com", "offer.alibaba.com", "searchlistings.org", "search.queryrouter.com", "search.queryrouter.com", "mybinaryoptionsrobot.com", "duplicashapp.com", "search.queryrouter.com", "bestgame.directory", "droidclub.net", ".rivalo.com", "yoursuperprize.com", "mediaexplained.com", "om.elvenar.com", "shinar.club", "revitoleczemacream.com", "freelotto.com", "screenaddict.thewhizproducts.com", "download.bringmesports.com/", "allinonedocs.com", "driver-fixer.com", "arabydeal.com", "cleanyourcomputertoday.com", "arabydeal.com", "music.mixplugin.com", "1se.info", "survey12.com", "freesoftwaredlul.com", "pldist01.com", "ad.adpop-1.com", "searchanonymous.net", "abrst.pro", "muzikfury.thewhizmarketing.com", "lp.mbtrx.com", "th1.forfun.maxisize-pro.com", "watchmygirlfriend.gfpornbox.com", "new.freelotto.com", "desktoptrack.com", "search.queryrouter.com", "offer.alibaba.com", "1000spins.com", "promotions.coral.co.uk", "search.queryrouter.com", "tbsia.com", "tbsia.com", "multtaepyo.com", "search.queryrouter.com", "czechmethod.com", "consumerview.co", "wayretail.com", "72onbase.com", "funsafetab.com", "search.queryrouter.com", "speedyfiledownload.com", "driver-fixer.com", "arabydeal.com", "cleanyourcomputertoday.com", "arabydeal.com", "music.mixplugin.com", "1se.info", "survey12.com", "freesoftwaredlul.com", "pldist01.com", "ad.adpop-1.com", "searchanonymous.net", "abrst.pro", "muzikfury.thewhizmarketing.com", "lp.mbtrx.com", "th1.forfun.maxisize-pro.com", "watchmygirlfriend.gfpornbox.com", "new.freelotto.com", "desktoptrack.com", "search.queryrouter.com", "offer.alibaba.com", "1000spins.com", "promotions.coral.co.uk", "search.queryrouter.com", "tbsia.com", "tbsia.com", "surveyform001.s3-website-us-east-1.amazonaws.com", "mgs188.com", "pfhsystem.com", "lpeva.com", "ddsh8.com", "theprofitsmaker.net", "quantomcoding.com", "sporthero.thewhizmarketing.com", "popads.net", "onclkds.com", "consumerview.co", "12kotov.ru", "ruhotpair2.fingta.com", "easytelevisionaccessnow.com", "ahwrd.com", "lpeva.com", "ppgzf.com", "zjstx.com", "kituure.xyz", "join.pro-gaming-world.com", "mackeeperapp.mackeeper.com", "tracknotify.com", "2075.cdn.beyondhosting.net", "idollash.com", "ds.moviegoat.com", "fulltab.com", "rackcdn.com", "prestoris.com", "adsterra.com", "swampssovuuhusp.top", "streesusa.info", "freesoftwaredlul.com", "adreactor.com", "a-static.com", "codeonclick.com", "heheme.com", "adf.ly", "seen-on-screen.thewhizmarketing.com", "openload.co" ]
  110. };
  111. }, function(module, __webpack_exports__, __webpack_require__) {
  112. "use strict";
  113. __webpack_require__.r(__webpack_exports__);
  114. var storage = {
  115. get: () => new Promise(resolve => {
  116. const items = [ ...arguments ];
  117. if (1 == items.length) resolve(GM_getValue(items[0])); else {
  118. const data = {};
  119. items.forEach(item => {
  120. data[item] = GM_getValue(item);
  121. }), resolve(data);
  122. }
  123. }),
  124. set(key, value) {
  125. GM_setValue(key, value);
  126. }
  127. };
  128. class OverlayDectector {
  129. constructor() {
  130. this.winWidth = window.innerWidth, this.winHeight = window.innerHeight;
  131. }
  132. ALGO2({x: x, y: y, mw: mw, mh: mh}) {
  133. let overlay, element = document.elementFromPoint(x, y);
  134. if (element && this.notRootElement(element)) do {
  135. this.isOverlayish({
  136. el: element,
  137. minWidth: mw,
  138. minHeight: mh
  139. }) && (overlay = element), element = element.parentNode;
  140. } while (!overlay && this.notRootElement(element));
  141. return overlay;
  142. }
  143. notRootElement(element) {
  144. return element != document.body && element != document && element != document.documentElement;
  145. }
  146. detectOverlayLayer(detectRange) {
  147. for (let coords of detectRange) {
  148. let overlay = this.ALGO2(coords);
  149. if (overlay) return this.getRecipe(overlay);
  150. }
  151. return !1;
  152. }
  153. find() {
  154. const detect = {
  155. AnySize: [ {
  156. x: this.winWidth / 2,
  157. y: this.winHeight / 2,
  158. mw: 100,
  159. mh: 100
  160. }, {
  161. x: this.winWidth / 2,
  162. y: this.winHeight / 3,
  163. mw: 100,
  164. mh: 100
  165. } ],
  166. FullScreen: [ {
  167. x: this.winWidth / 2,
  168. y: this.winHeight / 2,
  169. mw: .9 * this.winHeight,
  170. mh: .9 * this.winHeight
  171. } ]
  172. };
  173. let recipe, overlays = [];
  174. return (recipe = this.detectOverlayLayer(detect.AnySize)) && (overlays.push(this.hideByRecipe(recipe)),
  175. (recipe = this.detectOverlayLayer(detect.FullScreen)) && overlays.push(this.hideByRecipe(recipe))),
  176. overlays;
  177. }
  178. getRecipe(el) {
  179. let recipe = [];
  180. const isSingleInstanceInDocument = recipe => 1 == $(recipe.join(" > ")).length;
  181. do {
  182. let node = el.nodeName.toLowerCase(), id = el.getAttribute("id"), className = el.getAttribute("class"), style = el.getAttribute("style");
  183. if (id) {
  184. recipe.unshift("#" + id.trim());
  185. break;
  186. }
  187. if (className ? recipe.unshift(node + "." + className.trim().replace(/\s+/g, ".")) : recipe.unshift(node + '[style="' + style + '"]'),
  188. isSingleInstanceInDocument(recipe)) break;
  189. el = el.parentNode;
  190. } while (el != document.body);
  191. return !!isSingleInstanceInDocument(recipe) && recipe.join(" > ");
  192. }
  193. hideByRecipe(recipe) {
  194. let el = $(recipe), css = el.prop("style").cssText;
  195. return el.prop("style").cssText = `${css};display:none !important;`, {
  196. el: el,
  197. recipe: recipe,
  198. css: css
  199. };
  200. }
  201. isOverlayish({el: el, minWidth: minWidth, minHeight: minHeight}) {
  202. let css = window.getComputedStyle(el);
  203. return !!("none" != css.display && "hidden" != css.visibility && /fixed|absolute/.test(css.position) && ("auto" == css.zIndex || parseInt(css.zIndex) >= 0) && el.offsetWidth >= minWidth && el.offsetHeight >= minHeight) && [ el, 1 * css.zIndex ];
  204. }
  205. }
  206. var content_overlayKiller = class extends OverlayDectector {
  207. constructor(props = {}) {
  208. super(), this.activeBlockList = [], this.activeRecepiesList = [], this.onAutoDetect = props.onAutoDetect || (() => {}),
  209. this.onUserRemove = props.onUserRemove || (() => {}), this.onBlockListFound = props.onBlockListFound || (() => {}),
  210. this.onRecipeFound = props.onRecipeFound || (() => {}), this.onRecipeNotFound = props.onRecipeNotFound || (() => {}),
  211. this.blackListPromise = this.createBlockListFromStorage(), window == top && this.autoDetect();
  212. }
  213. hide(recepies) {
  214. this.last = [], recepies.forEach(recipe => {
  215. this.last.push(this.hideByRecipe(recipe));
  216. });
  217. }
  218. restore() {
  219. this.last.forEach(item => {
  220. let {el: el, recipe: recipe, css: css} = item;
  221. el.prop("style").cssText = css + ";display: block", [ ...$("style.pp-remove-overlay") ].forEach(style => {
  222. (style = $(style)).data("recipe") == btoa(recipe) && $(style).remove();
  223. });
  224. }), window.dispatchEvent(new Event("resize"));
  225. }
  226. remove(props = {}) {
  227. let overlays = this.find();
  228. overlays.length ? (this.last = overlays, this.createGlobalCSS(), this.onUserRemove({
  229. success: !0,
  230. recepies: overlays.map(o => o.recipe),
  231. props: props
  232. })) : this.onUserRemove({
  233. success: !1,
  234. props: props
  235. });
  236. }
  237. addToLocalBlacklist() {
  238. const domain = document.domain, url = location.href;
  239. PBStorageSync.pb_overlayBlockedList.update((list = {}) => {
  240. let blocks = list[domain] || [];
  241. return blocks.push({
  242. id: `block-${blocks.length}`,
  243. url: url,
  244. domain: domain,
  245. recipe: this.last.map(item => item.recipe).join(", ")
  246. }), list[domain] = blocks, list;
  247. });
  248. }
  249. removeFromLocalBlacklist() {
  250. const domain = document.domain;
  251. PBStorageSync.pb_overlayBlockedList.update((list = {}) => {
  252. let blocks = list[domain] || [], lastRecepies = this.last.map(item => item.recipe);
  253. return blocks = blocks.filter(item => -1 == lastRecepies.indexOf(item.recipe)),
  254. list[domain] = blocks, list;
  255. });
  256. }
  257. autoDetect(attempt = 0) {
  258. if (attempt < 40) {
  259. let foundBlockList = this.forceBlock(this.activeBlockList), foundRecipeList = this.forceBlock(this.activeRecepiesList);
  260. foundBlockList.length && this.onBlockListFound({
  261. found: foundBlockList
  262. }), foundRecipeList.length && this.onRecipeFound({
  263. found: foundRecipeList
  264. }), setTimeout(() => {
  265. this.autoDetect(++attempt);
  266. }, 250);
  267. } else this.checkRecepiesSuccess();
  268. }
  269. createBlockListFromStorage() {
  270. return new Promise(resolve => {
  271. storage.get("pb_overlayBlockedList").then((list = {}) => {
  272. list[document.domain] && (this.activeBlockList = list[document.domain], this.createBlockCSS(this.activeBlockList)),
  273. resolve();
  274. });
  275. });
  276. }
  277. createBlockListFromRecepies(recepies) {
  278. this.blackListPromise.then(() => {
  279. const blockList = this.activeBlockList.map(item => item.recipe);
  280. recepies = recepies.map(recipe => ({
  281. recipe: recipe,
  282. found: !1
  283. })).filter(item => -1 == blockList.indexOf(item.recipe)), this.activeRecepiesList = recepies,
  284. this.createBlockCSS(recepies);
  285. });
  286. }
  287. checkRecepiesSuccess() {
  288. const notFound = this.activeRecepiesList.filter(item => !item.found);
  289. notFound.length && this.onRecipeNotFound(notFound);
  290. }
  291. createGlobalCSS() {
  292. const htmlStyle = $("html").attr("style"), bodyStyle = $("body").attr("style");
  293. $('<style type="text/css">html, body {overflow:auto !important; }</style>').appendTo("head"),
  294. $("html").attr("style", (htmlStyle ? htmlStyle + ";" : "") + "overflow:auto !important;"),
  295. $("body").attr("style", (bodyStyle ? bodyStyle + ";" : "") + "overflow:auto !important;");
  296. }
  297. createBlockCSS(list) {
  298. this.createGlobalCSS(), list.forEach(item => {
  299. let css = item.recipe + " { display:none !important; }";
  300. $(`<style class="pp-remove-overlay" data-recipe="${btoa(item.recipe)}" type="text/css">${css}</style>`).appendTo("head");
  301. });
  302. }
  303. forceBlock(list) {
  304. let hide = [];
  305. return list.filter(item => !item.found).forEach(item => {
  306. $(item.recipe).length && (item.found = !0, hide.push(item.recipe));
  307. }), hide.length && this.hide(hide), hide;
  308. }
  309. };
  310. function inject() {
  311. const originalWindowOpenFn = window.open, originalCreateElementFn = document.createElement, originalAppendChildFn = HTMLElement.prototype.appendChild, originalCreateEventFn = document.createEvent, windowsWithNames = {};
  312. let fullScreenOpenTime, lastBlockTime, timeSinceCreateAElement = 0, lastCreatedAElement = null, winWidth = window.innerWidth, winHeight = window.innerHeight, abd = !1;
  313. const parentOrigin = window.location != window.parent.location ? document.referrer || window.parent.location || "*" : document.location, parentRef = window.parent;
  314. function newWindowOpenFn() {
  315. const openWndArguments = arguments;
  316. let useOriginalOpenWnd = !0, generatedWindow = null;
  317. function getWindowName(openWndArguments) {
  318. const windowName = openWndArguments[1];
  319. return null == windowName || [ "_blank", "_parent", "_self", "_top" ].includes(windowName) ? null : windowName;
  320. }
  321. let capturingElement = null, srcElement = null, closestParentLink = null;
  322. null != window.event && (capturingElement = window.event.currentTarget, srcElement = window.event.srcElement),
  323. null != srcElement && srcElement instanceof HTMLElement && (closestParentLink = srcElement.closest("a")) && closestParentLink.href && (openWndArguments[3] = closestParentLink.href);
  324. try {
  325. if (null == capturingElement) {
  326. let caller = openWndArguments.callee;
  327. for (;null != caller.arguments && null != caller.arguments.callee.caller; ) caller = caller.arguments.callee.caller;
  328. null != caller.arguments && caller.arguments.length > 0 && null != caller.arguments[0].currentTarget && (capturingElement = caller.arguments[0].currentTarget);
  329. }
  330. } catch (e) {}
  331. null == capturingElement ? (window.pbreason = "Blocked a new window opened without any user interaction",
  332. useOriginalOpenWnd = !1) : null != capturingElement && (capturingElement instanceof Window || function() {
  333. try {
  334. return !!(parent.Window && capturingElement instanceof parent.Window);
  335. } catch (e) {
  336. return !1;
  337. }
  338. }() || capturingElement === document || null != capturingElement.URL && null != capturingElement.body || null != capturingElement.nodeName && ("body" == capturingElement.nodeName.toLowerCase() || "document" == capturingElement.nodeName.toLowerCase())) ? (window.pbreason = `Blocked a new window opened with URL: ${openWndArguments[0]} because it was triggered by the ${capturingElement.nodeName} element`,
  339. useOriginalOpenWnd = !1) : !function(el) {
  340. let style = el && el.style;
  341. return !!(style && /fixed|absolute/.test(style.position) && el.offsetWidth >= .6 * winWidth && el.offsetHeight >= .75 * winHeight);
  342. }(capturingElement) ? useOriginalOpenWnd = !0 : (window.pbreason = "Blocked a new window opened when clicking on an element that seems to be an overlay",
  343. useOriginalOpenWnd = !1);
  344. document.webkitFullscreenElement || document.mozFullscreenElement || document.fullscreenElement;
  345. (new Date().getTime() - fullScreenOpenTime < 1e3 || isNaN(fullScreenOpenTime) && (document.fullScreenElement && null !== document.fullScreenElement || null != document.mozFullscreenElement || null != document.webkitFullscreenElement)) && (window.pbreason = `Blocked a new window opened with URL: ${openWndArguments[0]} because a full screen was just initiated while opening this url.`,
  346. document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen(),
  347. useOriginalOpenWnd = !1);
  348. let openUrl = openWndArguments[0], inWhitelist = isInWhitelist(openUrl);
  349. if (inWhitelist ? useOriginalOpenWnd = !0 : isInList(openUrl, pb_blacklist) && (useOriginalOpenWnd = !1),
  350. 1 == useOriginalOpenWnd) {
  351. generatedWindow = originalWindowOpenFn.apply(this, openWndArguments);
  352. let windowName = getWindowName(openWndArguments);
  353. if (null != windowName && (windowsWithNames[windowName] = generatedWindow), generatedWindow !== window) {
  354. const openTime = new Date().getTime(), originalWndBlurFn = generatedWindow.blur;
  355. generatedWindow.blur = (() => {
  356. new Date().getTime() - openTime < 1e3 && !inWhitelist ? (window.pbreason = `Blocked a new window opened with URL: ${openWndArguments[0]} because a it was blured`,
  357. generatedWindow.close(), blockedWndNotification(openWndArguments)) : originalWndBlurFn();
  358. });
  359. }
  360. } else {
  361. const location = {
  362. href: openWndArguments[0]
  363. };
  364. location.replace = (url => {
  365. location.href = url;
  366. }), generatedWindow = {
  367. close: () => !0,
  368. test: () => !0,
  369. blur: () => !0,
  370. focus: () => !0,
  371. showModelessDialog: () => !0,
  372. showModalDialog: () => !0,
  373. prompt: () => !0,
  374. confirm: () => !0,
  375. alert: () => !0,
  376. moveTo: () => !0,
  377. moveBy: () => !0,
  378. resizeTo: () => !0,
  379. resizeBy: () => !0,
  380. scrollBy: () => !0,
  381. scrollTo: () => !0,
  382. getSelection: () => !0,
  383. onunload: () => !0,
  384. print: () => !0,
  385. open() {
  386. return this;
  387. },
  388. opener: window,
  389. closed: !1,
  390. innerHeight: 480,
  391. innerWidth: 640,
  392. name: openWndArguments[1],
  393. location: location,
  394. document: {
  395. location: location
  396. }
  397. }, function(src, dest) {
  398. let prop;
  399. for (prop in src) try {
  400. void 0 === dest[prop] && src[prop] && (dest[prop] = src[prop]);
  401. } catch (e) {}
  402. }(window, generatedWindow), generatedWindow.window = generatedWindow;
  403. let windowName = getWindowName(openWndArguments);
  404. if (null != windowName) try {
  405. windowsWithNames[windowName].close();
  406. } catch (err) {}
  407. let fnGetUrl = function() {
  408. let url;
  409. url = generatedWindow.location instanceof Object ? generatedWindow.document.location instanceof Object ? null != location.href ? location.href : openWndArguments[0] : generatedWindow.document.location : generatedWindow.location,
  410. openWndArguments[0] = url, blockedWndNotification(openWndArguments);
  411. };
  412. top == self ? setTimeout(fnGetUrl, 100) : fnGetUrl();
  413. }
  414. return generatedWindow;
  415. }
  416. function onFullScreen(isInFullScreenMode) {
  417. fullScreenOpenTime = isInFullScreenMode ? new Date().getTime() : NaN;
  418. }
  419. function isInWhitelist(url) {
  420. return isInList(url, pb_whitelist);
  421. }
  422. function isInList(url, list) {
  423. return !!list && list.some(li => new RegExp("https?://(www.|.*.)?" + li + "+").test(url));
  424. }
  425. function blockedWndNotification(openWndArguments) {
  426. var baseURL;
  427. (!lastBlockTime || lastBlockTime < Date.now() - 1e3) && (openWndArguments[0] = (baseURL = openWndArguments[0],
  428. /^about:blank/i.test(baseURL) ? baseURL : /^(https?:)?\/\//.test(baseURL) ? baseURL : baseURL = location.origin + (/^\//.test(baseURL) ? "" : "/") + baseURL),
  429. openWndArguments.abd = abd, parentRef.postMessage({
  430. type: "blockedWindow",
  431. args: JSON.stringify(openWndArguments)
  432. }, parentOrigin)), lastBlockTime = Date.now();
  433. }
  434. window.open = function() {
  435. try {
  436. return newWindowOpenFn.apply(this, arguments);
  437. } catch (err) {
  438. return null;
  439. }
  440. }, HTMLElement.prototype.appendChild = function() {
  441. const newElement = originalAppendChildFn.apply(this, arguments);
  442. if ("IFRAME" == newElement.nodeName && newElement.contentWindow) try {
  443. let code = `(function () {\n var pb_blacklist = ${JSON.stringify(pb_blacklist)};\n var pb_whitelist = ${JSON.stringify(pb_whitelist)};\n ${inject.toString()};\n inject();\n })();`, s = document.createElement("script");
  444. s.text = code, newElement.contentWindow.document.body.appendChild(s);
  445. } catch (e) {}
  446. return newElement;
  447. }, document.createElement = function() {
  448. const newElement = originalCreateElementFn.apply(document, arguments);
  449. if ("a" == arguments[0] || "A" == arguments[0]) {
  450. timeSinceCreateAElement = new Date().getTime();
  451. const originalDispatchEventFn = newElement.dispatchEvent;
  452. newElement.dispatchEvent = function(event) {
  453. return null == event.type || "click" != `${event.type}`.toLocaleLowerCase() || isInWhitelist(newElement.href) ? originalDispatchEventFn.call(this, event) : (window.pbreason = "blocked due to an explicit dispatchEvent event with type 'click' on an 'a' tag",
  454. blockedWndNotification({
  455. 0: newElement.href
  456. }), !0);
  457. }, lastCreatedAElement = newElement;
  458. }
  459. return newElement;
  460. }, document.createEvent = function() {
  461. try {
  462. if (arguments[0].toLowerCase().includes("mouse") && new Date().getTime() - timeSinceCreateAElement <= 50) {
  463. let openUrlDomain, topUrl, topDomain;
  464. try {
  465. openUrlDomain = new URL(lastCreatedAElement.href).hostname;
  466. } catch (e) {}
  467. try {
  468. topUrl = window.location != window.parent.location ? document.referrer : document.location.href;
  469. } catch (e) {}
  470. try {
  471. topDomain = new URL(topUrl).hostname;
  472. } catch (e) {}
  473. let isSelfDomain = openUrlDomain == topDomain;
  474. if (lastCreatedAElement.href.trim() && !isInWhitelist(lastCreatedAElement.href) && !isSelfDomain) return window.pbreason = `Blocked because 'a' element was recently created and ${arguments[0]} event was created shortly after`,
  475. arguments[0] = lastCreatedAElement.href, blockedWndNotification({
  476. 0: lastCreatedAElement.href
  477. }), {
  478. type: "click",
  479. initMouseEvent: function() {}
  480. };
  481. }
  482. return originalCreateEventFn.apply(document, arguments);
  483. } catch (err) {}
  484. }, document.addEventListener("fullscreenchange", () => {
  485. onFullScreen(document.fullscreen);
  486. }, !1), document.addEventListener("mozfullscreenchange", () => {
  487. onFullScreen(document.mozFullScreen);
  488. }, !1), document.addEventListener("webkitfullscreenchange", () => {
  489. onFullScreen(document.webkitIsFullScreen);
  490. }, !1), function() {
  491. try {
  492. var tester = document.createElement("div");
  493. tester.innerHTML = "&nbsp;", tester.className = "adsbox", tester.style.cssText = "position:absolute;top-1000px;left:-1000px;",
  494. document.body.appendChild(tester), window.setTimeout(function() {
  495. 0 === tester.offsetHeight && (abd = !0), tester.remove();
  496. }, 100);
  497. } catch (e) {}
  498. }(), window.pbExternalCommand = function(commandId, messageId) {
  499. !function(commandId, messageId) {
  500. if (messageId == pb_message) switch (commandId) {
  501. case 0:
  502. window.open = originalWindowOpenFn, document.createElement = originalCreateElementFn,
  503. document.createEvent = originalCreateEventFn, HTMLElement.prototype.appendChild = originalAppendChildFn;
  504. }
  505. }(commandId, messageId);
  506. };
  507. }
  508. function executeCode(code) {
  509. let s = document.createElement("script");
  510. s.textContent = code, insertBeforeRoot(s), setTimeout(function() {
  511. s.parentNode.removeChild(s);
  512. }, 50);
  513. }
  514. function isDomainInList(domain, domainList, returnValue) {
  515. domainList = domainList || [];
  516. for (var i = 0; i < domainList.length; i++) {
  517. var domainTail = domainList[i];
  518. if (new RegExp("\\b[(www\\.)|.*.]?" + domainTail + "\\b").test(domain)) return !returnValue || domainTail;
  519. }
  520. return !1;
  521. }
  522. function getI18N(msgName, alternative) {
  523. const lang = "zh-cn" == navigator.language.toLowerCase() ? "CN" : "EN";
  524. return (LANG[lang][msgName] || LANG[lang][alternative] || {
  525. message: msgName
  526. }).message;
  527. }
  528. function insertBeforeRoot(dom) {
  529. let rootDocument = document.documentElement;
  530. rootDocument.insertBefore(dom, rootDocument.firstChild);
  531. }
  532. const notification_$ = jQuery.noConflict();
  533. var content_notification = class {
  534. constructor(props = {}) {
  535. this.queue = [], this.props = props, this.notificationHTML = "<html>\n <head>\n <style type=\"text/css\">\n * {\n box-sizing: border-box;\n font-family: \"Arial\", \"sans-serif\";\n }\n\n html, body {\n margin: 0px;\n padding: 0px;\n overflow: hidden; \n color: #000;\n }\n\n .hidden {\n display: none !important;\n }\n\n .message {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n background: #f2f2f2;\n }\n\n /* icon */\n .message-icon {\n height: 16px;\n min-width: 15px;\n background: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAAG+URWSAAAAAXNSR0IArs4c6QAAAblJREFUKBV9UzFLw1AQzr3WJungULCLTqKL7ehSdHXWTZxEVHRQQXBw8i8IIkpRF8HBTVedHPQXtCoILu6CBU0izXt+99KLEUMfJHf3vu/u3X0vcRyslue9KXYcY0asta/Hcnmu5bqGOGqXy7Mmjq+oUJizG4z8cnte23XH2E1SXPcKlFkE17Y8B5KiQN2QIE1h58n3G8aYJW3MKsf1KKKXSmUw6RAbmqgKQpVBXtza9+fnOT163jKyTonoFoSZBE7etomJMDzjcg7RTRa0vlIXtm0BUG3FKZXuOJ7odF4KAtjJiQLSuqO73bvNUuk2bY5JmDOVJtb6/g8oVcTa2cbf3zt5ghJU0mBGqOdJhljbbV4WE9JR8ggpKKXYPvv+1IDntcIgaEK9eaXUAuwBY7UwTOUu8kZ2sf5dfBrx19c1lA0FQ/IQ+3yhkOFBEZ30lSKrmxThy2Yfxar/ThYSTp3ETDGrDuJWuq/1jvjFtu8fOVqvG6JLtLELgHoJw0JCciPjT4tvBcNdrGHjGEm5Ago5a0FMvv1aFDXxQFS1nSX089HpR+5J+GEXkbiHYUf/FSB6hR6H9SDY/wGku67HsFf1yQAAAABJRU5ErkJggg==\');\n margin-right: 12px;\n }\n\n /* text */\n .message-title {\n font-family: Arial;\n font-size: 16px;\n font-weight: bold;\n color: #d40707;\n margin-right: 8px;\n }\n\n /* close */\n .message-close {\n position: absolute;\n top: 12px;\n right: 12px;\n width: 16px;\n height: 16px;\n background: url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAXlJREFUOBGtU0tKA0EQrWoTB4wmiibuPICCwQOI4kLwHm5EVx7ElcGN9xBciOIBJEI8gDszSsxPGBOn7VeTgkJHULBhpmte1av/MH05L/1kLU1H+5TSridegZrJP5KjS+eK54tzUctSWD+899Px69sJMx0E2Slub2ZOvaez6vzMcZDfoRMHID93hxdBuWMJP8khyNVSpbQHJxIJkS15PBp941oMtuDAiKXmj/G9pt1s3lH81KbNrW2KokgcJUlCtzfXVF2uUb2+IRjKcVOFdYeGKRlRQO71ukIAUcnAoNNMwAGX486g5YlWxW14WUK5XBEYZMg2KyhCAx+43Rn2ifysWE5e1gmgPHJmyoPccU38/OpysiTG1EZHZDy2J8ZUFsxhwxREg9BtWzPqtk60icKR7QzriZEAKBSLMipbM0apTjBG2ODIGMHFR2jkaWjkIWQcRFHDDMnDuFFbKB39zypjp7HbIbGGlqOR7Z3puKH/AXSSgTX66+/8CTIb7zaQ3aZ4AAAAAElFTkSuQmCC\') no-repeat;\n object-fit: contain;\n cursor: pointer;\n }\n\n /* buttons */\n .message-buttons {\n display: flex;\n }\n\n .message-buttons > div {\n height: 28px;\n cursor: pointer;\n font-size: 14px;\n background-color: #dedede;\n box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.5);\n border: solid 1px #b6b4b6;\n border-radius: 4px;\n color: #5a5a5a;\n padding: 0 15px;\n margin: 0 8px;\n line-height: 25px;\n }\n\n .message-buttons > div:hover {\n background-color: #eff3f8;\n }\n </style>\n \n <script>\n !function(modules) {\n var installedModules = {};\n function __webpack_require__(moduleId) {\n if (installedModules[moduleId]) return installedModules[moduleId].exports;\n var module = installedModules[moduleId] = {\n i: moduleId,\n l: !1,\n exports: {}\n };\n return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), \n module.l = !0, module.exports;\n }\n __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) {\n __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {\n enumerable: !0,\n get: getter\n });\n }, __webpack_require__.r = function(exports) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(exports, \"__esModule\", {\n value: !0\n });\n }, __webpack_require__.t = function(value, mode) {\n if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value;\n if (4 & mode && \"object\" == typeof value && value && value.__esModule) return value;\n var ns = Object.create(null);\n if (__webpack_require__.r(ns), Object.defineProperty(ns, \"default\", {\n enumerable: !0,\n value: value\n }), 2 & mode && \"string\" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {\n return value[key];\n }.bind(null, key));\n return ns;\n }, __webpack_require__.n = function(module) {\n var getter = module && module.__esModule ? function() {\n return module.default;\n } : function() {\n return module;\n };\n return __webpack_require__.d(getter, \"a\", getter), getter;\n }, __webpack_require__.o = function(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n }, __webpack_require__.p = \"\", __webpack_require__(__webpack_require__.s = 2);\n}([ function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_exports__.a = {\n defaultWhiteList: [ \"engage.wixapps.net\", \"linkedin.com\", \"google\", \"www.gmail.com\", \"www.pinterest.com\", \"www.youtube.com\", \"www.facebook.com\", \"search.yahoo.com\", \"chrome://newtab\", \"www.food.com\" ],\n defaultBlackList: [ \"adrunnr\", \"successforyu.clickfunnels.com\", \"fmovies.se\", \"in-365-tagen.info\", \"5000-settimanale.com\", \"shop.mazzugioielli.com\", \"maxigossip.com\", \"lp.yazizim.com\", \"beyourxfriend.com\", \"99tab.com\", \"zzqrt.com\", \"canuck-method.net\", \"bewomenly.com\", \"playnow.guru\", \"datingforyou-48e1.kxcdn.com\", \"trafficnetworkads24.com\", \"sistemadedinerogratis.com\", \"canuckmethodprofit.co\", \"consumerresearchnetwork.com\", \"securemacfix.com\", \"zz3d3.ru\", \"zd1.quebec-bin.com\", \"hot-games4you.xyz\", \"om.elvenar.com\", \"superpccleanup.com\", \"gomediaz.com\", \"judithi.xyz\", \"free.atozmanuals.com\", \"yoursuccess.ravpage.co.il\", \"123hop.ir\", \"quizcliente.pw\", \"aussiemethod.biz\", \"hlpnowp-c.com\", \"picbumper.com\", \"shaneless.com\", \"anacondamonster.com\", \"altrk1.com\", \"health.todaydiets.com\", \"download.weatherblink.com\", \"happyluketh.com\", \"go.ameinfo.com\", \"50kaweek.net\", \"thepornsurvey.com\", \"ofsiite.ru\", \"fulltab.com\", \"1000spins.com\", \"time2play-online.net\", \"vintacars.com\", \"welcome.pussysaga.com\", \"free-desktop-games.com\", \"download.televisionfanatic.com\", \"theprofitsmaker.net\", \"sgad.info\", \"algocashmaster.net\", \"sunmaker.com\", \"topvipdreams.com\", \"watchmygirlfriend.gfpornvideos.com\", \"filesharefanatic.com\", \"safedownloadhub.com\", \"7awlalalam.blogspot.com\", \"tvplusnewtab.com\", \"trendingpatrol.com\", \"moneymorning.com\", \"ifileyou.com\", \"classifiedcanada.ca\", \"firefan.com\", \"methode-binaire.com\", \"letmetell.com\", \"kenduktur.com\", \"getafuk.com\", \"yotraleplahnte.ru\", \"jackpot.88beto.com\", \"pwwysydh.com\", \"search.queryrouter.com\", \"v.lvztxy.com\", \"pussysaga.com\", \"saffamethod.com\", \"prezzonline.com\", \"searchprivacy.website\", \"3d2819216eb4e1035879-7c248de0c99745406e9b749fc86ec3e4.ssl.cf1.rackcdn.com\", \"only2date.com\", \"mysagagame.com\", \"themillionaireinpjs.net\", \"wlt.kd2244.com\", \"quickprivacycheck.com\", \"hotchatdate.com\", \"autotraderbot.com\", \"z1.zedo.com\", \"youlucky2014.com\", \"traffic.getmyads.com\", \"appcloudprotected.com\", \"safensecure.com-allsites3.xyz\", \"newpoptab.com\", \"static.williamhill.com\", \"myhealthyblog.co\", \"greatestmobideals.com\", \"sweetclarity.com\", \"mgid.com\", \"securepccure.com\", \"autopengebygger.com\", \"am15.net\", \"es.reimageplus.com\", \"o2.promos-info.com\", \"it.reimageplus.com\", \"westsluts.com\", \"spinandwin.com-ser.pw\", \"reimageplus.com\", \"vodafone.promos-info.com\", \"vinnmatpengar.se\", \"movie.ienjoyapps.com\", \"love4single.com\", \"origin.getprice.com.au\", \"ohmydating.com\", \"lp.want-to-win.com\", \"yabuletchrome.ru\", \"bamdad.net\", \"gotositenow.com\", \"vcrypt.pw\", \"newtabtv.com\", \"mon.setsu.xyz\", \"youforgottorenewyourhosting.com\", \"zone-telechargement.ws\", \"land.pckeeper.software\", \"ad.adpop-1.com\", \"advancedpctools.com\", \"videos.randolphcountyheraldtribune.com\", \"web-start.org\", \"softreadynow.installupgradenowfreshandforyou.website\", \"uplod.ws\", \"pornhubcasino.com\", \"maxbet.ro\", \"2016prizefeed.com\", \"thevideo.me\", \"wantubad.com\", \"tavanero.com\", \"xcusmy.club\", \"daclips.in\", \"gaymenofporn.online\", \"jackpotcitycasino.com\", \"italian-method.com\", \"getsearchincognito.com\", \"youjustwonprize.com\", \"finanz-nachrichten.me\", \"quizcliente.site\", \"da.reimageplus.com\", \"jkanime.net\", \"britmoneymethod.com\", \"uae.souq.com\", \"ka.azzer.net\", \"safensecure.xyz\", \"8t.hootingrhejkz.online\", \"www6.blinkx.com\", \"wizzcaster.com\", \"comparaison-prix.com\", \"vodlocker.lol\", \"fr.reimageplus.com\", \"free.fromdoctopdf.com\", \"userscloud.com\", \"myprivatesearch.com\", \"fanli90.cn\", \"tutticodicisconto.it\", \"mediadec.com\", \"gogamego.thewhizproducts.com\", \"download.weatherblink.com\", \"free.videodownloadconverter.com\", \"we-are-gamers.com\", \"sesso.communityadult.net\", \"lp.blpmovies.com\", \"search.queryrouter.com\", \"bbb-johannesburg.localspecific.com\", \"lp.blpmovies.com\", \"go.ppixelm.com\", \"r0.ru\", \"sesso.communityadult.net\", \"bbb-johannesburg.localspecific.com\", \"ppixelm.com\", \"cyberguardianspe.info\", \"we-are-gamers.com\", \"loginfaster.com/new\", \"www.alfacart.com\", \"www.foresee.com\", \"mobile-win.com\", \"www.plusnetwork.com\", \"www.amicafarmacia.com\", \"www.ienjoyapps.com\", \"cheapcheap.io\", \"screenaddict.thewhizproducts.com\", \"nova.rambler.ru\", \"free.gamingwonderland.com\", \"p9328ujeiw1.ru\", \"mobilecasinoclub.co.uk\", \"pfhsystem.com\", \"regtuneup.com\", \"theprofitsmaker.net\", \"bodogpromotions.eu\", \"heroesreplay.org\", \"financialsecrets.info\", \"mymoneymakingapp.com\", \"sunmaker.com\", \"888casino-promotions.com\", \"vogliosesso.com\", \"scienceremix.com\", \"allinonedocs.com\", \"arabia.starzplay.com\", \"allirishcasino.com\", \"advancepctools.info\", \"movie.ienjoyapps.com\", \"surveyform001.s3-website-us-east-1.amazonaws.com\", \"mgs188.com\", \"pfhsystem.com\", \"lpeva.com\", \"ddsh8.com\", \"theprofitsmaker.net\", \"b2.ijquery11.com\", \"sporthero.thewhizmarketing.com\", \"securefastmac.tech\", \"seen-on-screen.thewhizmarketing.com\", \"1000spins.com\", \"search.queryrouter.com\", \"pfhsystem.com\", \"reimageplus.com\", \"offer.alibaba.com\", \"searchlistings.org\", \"search.queryrouter.com\", \"search.queryrouter.com\", \"mybinaryoptionsrobot.com\", \"duplicashapp.com\", \"search.queryrouter.com\", \"bestgame.directory\", \"droidclub.net\", \".rivalo.com\", \"yoursuperprize.com\", \"mediaexplained.com\", \"om.elvenar.com\", \"shinar.club\", \"revitoleczemacream.com\", \"freelotto.com\", \"screenaddict.thewhizproducts.com\", \"download.bringmesports.com/\", \"allinonedocs.com\", \"driver-fixer.com\", \"arabydeal.com\", \"cleanyourcomputertoday.com\", \"arabydeal.com\", \"music.mixplugin.com\", \"1se.info\", \"survey12.com\", \"freesoftwaredlul.com\", \"pldist01.com\", \"ad.adpop-1.com\", \"searchanonymous.net\", \"abrst.pro\", \"muzikfury.thewhizmarketing.com\", \"lp.mbtrx.com\", \"th1.forfun.maxisize-pro.com\", \"watchmygirlfriend.gfpornbox.com\", \"new.freelotto.com\", \"desktoptrack.com\", \"search.queryrouter.com\", \"offer.alibaba.com\", \"1000spins.com\", \"promotions.coral.co.uk\", \"search.queryrouter.com\", \"tbsia.com\", \"tbsia.com\", \"multtaepyo.com\", \"search.queryrouter.com\", \"czechmethod.com\", \"consumerview.co\", \"wayretail.com\", \"72onbase.com\", \"funsafetab.com\", \"search.queryrouter.com\", \"speedyfiledownload.com\", \"driver-fixer.com\", \"arabydeal.com\", \"cleanyourcomputertoday.com\", \"arabydeal.com\", \"music.mixplugin.com\", \"1se.info\", \"survey12.com\", \"freesoftwaredlul.com\", \"pldist01.com\", \"ad.adpop-1.com\", \"searchanonymous.net\", \"abrst.pro\", \"muzikfury.thewhizmarketing.com\", \"lp.mbtrx.com\", \"th1.forfun.maxisize-pro.com\", \"watchmygirlfriend.gfpornbox.com\", \"new.freelotto.com\", \"desktoptrack.com\", \"search.queryrouter.com\", \"offer.alibaba.com\", \"1000spins.com\", \"promotions.coral.co.uk\", \"search.queryrouter.com\", \"tbsia.com\", \"tbsia.com\", \"surveyform001.s3-website-us-east-1.amazonaws.com\", \"mgs188.com\", \"pfhsystem.com\", \"lpeva.com\", \"ddsh8.com\", \"theprofitsmaker.net\", \"quantomcoding.com\", \"sporthero.thewhizmarketing.com\", \"popads.net\", \"onclkds.com\", \"consumerview.co\", \"12kotov.ru\", \"ruhotpair2.fingta.com\", \"easytelevisionaccessnow.com\", \"ahwrd.com\", \"lpeva.com\", \"ppgzf.com\", \"zjstx.com\", \"kituure.xyz\", \"join.pro-gaming-world.com\", \"mackeeperapp.mackeeper.com\", \"tracknotify.com\", \"2075.cdn.beyondhosting.net\", \"idollash.com\", \"ds.moviegoat.com\", \"fulltab.com\", \"rackcdn.com\", \"prestoris.com\", \"adsterra.com\", \"swampssovuuhusp.top\", \"streesusa.info\", \"freesoftwaredlul.com\", \"adreactor.com\", \"a-static.com\", \"codeonclick.com\", \"heheme.com\", \"adf.ly\", \"seen-on-screen.thewhizmarketing.com\", \"openload.co\" ]\n };\n}, , function(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n __webpack_require__.r(__webpack_exports__);\n var data, src_const = __webpack_require__(0);\n class Message {\n constructor(options) {\n return this.template = document.querySelector(\"#message-template\").innerHTML, this.message = this.render({\n options: options\n }), this;\n }\n render({options: options}) {\n const message = this.createHTML({\n html: this.template,\n parent: document.body\n });\n if (options.title && (message.querySelector(\".message-title\").innerHTML = options.title, \n message.querySelector(\".message-title\").classList.remove(\"hidden\")), options.buttons.length) {\n let buttons = message.querySelector(\".message-buttons\");\n buttons.classList.remove(\"hidden\"), options.buttons.forEach(button => {\n this.createHTML({\n html: `<div>${button.label}</div>`,\n parent: buttons\n }).addEventListener(\"click\", e => {\n parent.postMessage({\n action: \"pb-message-btn-click\",\n id: button.id,\n source: options.source,\n toastId: options.id\n }, \"*\"), this.prevntBrowserBlock({\n id: button.id,\n options: options\n });\n });\n });\n }\n return this.initEvents({\n message: message,\n options: options\n }), parent.postMessage({\n action: \"pb-message-display\",\n source: options.source,\n toastId: options.id\n }, \"*\"), message;\n }\n createHTML({html: html, parent: parent}) {\n const el = new DOMParser().parseFromString(html.trim(), \"text/html\").body.firstChild;\n return parent.appendChild(el), el;\n }\n initEvents({message: message, options: options}) {\n [ ...message.querySelectorAll(\".message-buttons > div\") ].map(item => {\n item.addEventListener(\"click\", e => {\n parent.postMessage({\n action: \"pb-message-close\",\n triggerEvent: !1,\n quickClose: !0,\n toastId: options.id\n }, \"*\");\n });\n }), message.querySelector(\".message-close\").addEventListener(\"click\", () => {\n parent.postMessage({\n action: \"pb-message-close\",\n triggerEvent: !0,\n source: options.source,\n toastId: options.id\n }, \"*\");\n });\n }\n prevntBrowserBlock({id: id, options: options}) {\n let args = [];\n switch (id) {\n case \"allowOnce\":\n case \"allowAlways\":\n args = options.props.winArgs;\n break;\n\n default:\n return;\n }\n /^https?\\:/.test(args[0]) || /^about:blank/i.test(args[0]) || (args[0] = \"http:\" + (/^\\/\\//.test(args[0]) ? \"\" : \"//\") + args[0]), \n window.open(args[0] || \"\", args[1] || \"\", args[2] || \"\");\n }\n }\n (() => {\n let data = JSON.parse(decodeURIComponent(\"//@DATA\"));\n document.addEventListener(\"DOMContentLoaded\", () => {\n data = data, new Message({\n config: src_const.a,\n id: data.id,\n title: data.title,\n subTitle: data.subTitle,\n icon: data.icon,\n showHide: data.showHide,\n showResize: data.showResize,\n source: data.source,\n size: data.size,\n buttons: data.buttons,\n props: data.props\n });\n });\n })();\n} ]);\n </script>\n </head>\n <body>\n <script id=\"message-template\" type=\"text/html\">\n <div class=\"message\">\n <div class=\"message-icon\"></div>\n <div class=\"message-title\"></div>\n \n <div class=\"message-buttons\"></div>\n\n <div class=\"message-close\"></div>\n </div>\n </script>\n </body>\n</html>", window.addEventListener("message", event => {
  536. if (event.data && event.data.toastId == this.toastId) {
  537. let data = event.data;
  538. switch (data.action) {
  539. case "pb-message-display":
  540. this.options.onDisplay && this.options.onDisplay(), this.props.onDisplay.call(this, {
  541. source: data.source
  542. });
  543. break;
  544.  
  545. case "pb-message-close":
  546. this.userGeneratedClose = !0, data.quickClose ? this.remove() : this.queueFade(100, this.options.onFadeOut),
  547. data.triggerEvent && (this.options.onClose && this.options.onClose(), this.options.onButtonClick && this.options.onButtonClick({
  548. id: "close"
  549. }), this.props.onButtonClick.call(this, {
  550. source: data.source,
  551. id: "close"
  552. }), this.props.onCloseClick.call(this, {
  553. source: data.source
  554. }));
  555. break;
  556.  
  557. case "pb-message-btn-click":
  558. this.options.buttons[data.id] && this.options.buttons[data.id](), this.options.onButtonClick && this.options.onButtonClick({
  559. id: data.id
  560. }), this.props.onButtonClick.call(this, {
  561. source: data.source,
  562. id: data.id
  563. });
  564. break;
  565.  
  566. case "pb-message-tooltip-over":
  567. isI18N(data.id) && this.showTooltip(data);
  568. break;
  569.  
  570. case "pb-message-tooltip-out":
  571. this.hideTooltip();
  572. }
  573. this.props.onAction && this.props.onAction(data.action);
  574. }
  575. }), document.addEventListener("visibilitychange", event => {
  576. if ("visible" == document.visibilityState) {
  577. let now = new Date().getTime();
  578. this.queueFadeTime && now > this.queueFadeTime + 5e3 && this.remove();
  579. }
  580. }, !1);
  581. }
  582. addQueue(options) {
  583. this.queue.push(options), this.isNotificationActive || this.show(this.getNextQueueItem());
  584. }
  585. getNextQueueItem() {
  586. return this.queue.shift();
  587. }
  588. show(options) {
  589. this.init(options), !options.quickOpen || document.body ? (this.isNotificationActive = !0,
  590. this.render()) : setTimeout(() => {
  591. this.show(options);
  592. }, 50);
  593. }
  594. render() {
  595. let data = this.getIframeData();
  596. this.toast = notification_$('<iframe id="pb-toast-main" class="' + this.getCSSClass() + '">').on("load", () => {
  597. this.options.quickOpen ? this.toast.show().addClass("pb-toast-main-show") : this.toast.show().addClass("pb-toast-main-move"),
  598. this.options.persistent || (this.queueFadeTime = new Date().getTime(), this.queueFade(5e3, this.options.onFadeOut));
  599. }).on("mouseenter", () => {
  600. this.options.persistent || this.cancelFade();
  601. }).on("mouseleave", () => {
  602. this.userGeneratedClose || this.options.persistent || this.queueFade(5e3, this.options.onFadeOut);
  603. }).on("transitionend", () => {
  604. this.toast.is(".pb-toast-main-move") || this.remove();
  605. }).attr("src", data).appendTo("body");
  606. }
  607. getCSSClass() {
  608. return `pb-toast-main ${this.options.cssClass || ""}`;
  609. }
  610. init(options) {
  611. this.remove(), this.toastId = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
  612. var r = 16 * Math.random() | 0;
  613. return ("x" == c ? r : 3 & r | 8).toString(16);
  614. }), this.options = options, this.userGeneratedClose = !1, this.queueFadeTime = null;
  615. }
  616. remove() {
  617. this.hideTooltip(), this.fid && clearTimeout(this.fid), this.toast && this.toast.remove(),
  618. this.isNotificationActive && (this.isNotificationActive = !1, !this.options.stopQueue && this.queue.length && this.show(this.getNextQueueItem()));
  619. }
  620. queueFade(time, onFadeOut) {
  621. this.fid = setTimeout(() => {
  622. this.toast.attr("class", this.getCSSClass()), onFadeOut && onFadeOut();
  623. }, time);
  624. }
  625. cancelFade() {
  626. this.toast.is(".pb-toast-main-move") || this.toast.addClass("pb-toast-main-move"),
  627. clearTimeout(this.fid);
  628. }
  629. showTooltip({id: id, position: position}) {
  630. let toastPosition = this.toast.get(0).getBoundingClientRect(), tooltipPosition = {
  631. left: toastPosition.left + position.xCenter,
  632. top: toastPosition.top + position.yCenter + 15
  633. }, tooltip = this.renderTooltip(id);
  634. tooltip.css({
  635. top: tooltipPosition.top,
  636. left: tooltipPosition.left - (tooltip.outerWidth() - 70)
  637. });
  638. }
  639. hideTooltip() {
  640. notification_$("#pb_jq_tipsWrapper").remove();
  641. }
  642. renderTooltip(id) {
  643. return this.hideTooltip(), notification_$('<div id="pb_jq_tipsWrapper">' + getI18N(id) + "</div>").appendTo("body");
  644. }
  645. showLinkCopied(iconPosition) {
  646. let toastPosition = this.toast.get(0).getBoundingClientRect(), position_left = toastPosition.left + iconPosition.left, position_top = toastPosition.top + iconPosition.top;
  647. notification_$("#pb-link-copied-message").remove();
  648. let msg = notification_$('<div id="pb-link-copied-message">' + getI18N("NTF_LinkCopied") + "</div>").css({
  649. top: position_top + 31,
  650. left: position_left - 30
  651. }).appendTo("body").show().animate({
  652. opacity: 1
  653. }, 250);
  654. setTimeout(() => msg.animate({
  655. opacity: 0
  656. }, 250, () => msg.remove()), 2e3);
  657. }
  658. getIframeData() {
  659. const data = {
  660. id: this.toastId,
  661. title: this.options.title,
  662. subTitle: this.options.subTitle || "",
  663. buttons: Object.keys(this.options.buttons || {}).map(id => ({
  664. id: id,
  665. label: getI18N(id)
  666. })),
  667. showHide: this.options.showHide,
  668. showResize: this.options.showResize,
  669. source: this.options.source || "",
  670. props: {
  671. domain: document.domain,
  672. winArgs: this.options.winArgs || []
  673. }
  674. }, html = this.notificationHTML.replace("//@DATA", encodeURIComponent(JSON.stringify(data)));
  675. return "data:text/html;base64," + btoa(html);
  676. }
  677. }, src_const = __webpack_require__(0), pit = !1;
  678. function postInit(gback) {
  679. if (pit) return;
  680. function lh() {
  681. return window.location.href;
  682. }
  683. function getHrefRecursive(el) {
  684. return "a" === el.tagName.toLowerCase() ? el.getAttribute("href") : el.parentNode && el.parentNode !== document ? getHrefRecursive(el.parentNode) : null;
  685. }
  686. pit = !0;
  687. const B = (isOpera = !!window.opr && !!opr.addons || !!window.opera || navigator.userAgent.indexOf(" OPR/") >= 0,
  688. isFirefox = "undefined" != typeof InstallTrigger, isSafari = /constructor/i.test(window.HTMLElement) || "[object SafariRemoteNotification]" === (!window.safari || "undefined" != typeof safari && safari.pushNotification).toString(),
  689. isIE = !!document.documentMode, isEdge = !isIE && !!window.StyleMedia, isChrome = !!window.chrome && !!window.chrome.webstore,
  690. isBlink = (isChrome || isOpera) && !!window.CSS, isYandex = !!window.yandex, isOpera ? "opera" : isFirefox ? "ff" : isSafari ? "safari" : isIE ? "ie" : isEdge ? "edge" : isChrome ? "chrome" : isBlink ? "blink" : isYandex ? "yandex" : "undetected");
  691. var isOpera, isFirefox, isSafari, isIE, isEdge, isChrome, isBlink, isYandex;
  692. const dg = {
  693. uid: null,
  694. pid: (length = 32, arr = new Uint8Array((length || 32) / 2), window.crypto.getRandomValues(arr),
  695. Array.from(arr).map(function(dec) {
  696. return dec.toString(16);
  697. }).join("")),
  698. lastFocusedUrl: null,
  699. prev: null
  700. }, dba = document.addEventListener;
  701. var length, arr;
  702. class Acomm {
  703. constructor() {
  704. this._defaultItem = {
  705. name: "---",
  706. price: "---",
  707. prime_item: !1,
  708. prime_user: !1,
  709. quantity: "---",
  710. seller: "---"
  711. }, this._placeClickHandler = this.handleEvent.bind(this), this.whiteListRegex = /^https:\/\/www\.amazon\.(com|fr|co\.uk|co\.jp)\/gp\/buy\/spc\/handlers/;
  712. }
  713. init(source) {
  714. this._s = source, self.location.href.match(this.whiteListRegex) && dba("click", this._placeClickHandler);
  715. }
  716. handleEvent(e) {
  717. if (this.isValidEvent(e)) {
  718. e.preventDefault(), e.stopImmediatePropagation(), document.removeEventListener("click", this._placeClickHandler);
  719. try {
  720. this.processAcomm();
  721. } finally {}
  722. }
  723. }
  724. isValidEvent(e) {
  725. return "placeYourOrder1" === e.target.name && "INPUT" === e.target.tagName;
  726. }
  727. processAcomm() {
  728. let pack = [];
  729. pack.push(this.getPrimeOrders()), pack.push(this.getRegularOrders()), this.spliceDuplicates(pack),
  730. pack.length && this._s.addAcomm({
  731. type: "asc",
  732. subtype: "A",
  733. data: {
  734. a: pack
  735. },
  736. v: "2.2.1"
  737. });
  738. }
  739. spliceDuplicates(pack) {
  740. const prime = pack[0], notPrime = pack[1].filter(np => !(np.asin && prime.find(p => p.asin === asin)));
  741. pack[1] = notPrime;
  742. }
  743. getPrimeOrders() {
  744. const primeEls = document.body.querySelectorAll(".shipping-group .a-fixed-left-grid .a-fixed-left-grid-inner"), primeCount = primeEls.length;
  745. let primePack = [];
  746. for (let p = 0; p < primeCount; p++) {
  747. let item = Object.assign({}, this._defaultItem);
  748. const c_p = primeEls[p].getElementsByClassName("a-fixed-left-grid-col item-details-right-column a-col-right");
  749. if (c_p.length) {
  750. const cp0 = c_p[0], b_c_p = cp0.getElementsByClassName("a-text-bold");
  751. b_c_p[0] && (item.name = b_c_p[0].innerText), b_c_p[1] && (item.price = b_c_p[1].innerText),
  752. item.prime_item = !!cp0.getElementsByClassName("a-icon a-icon-prime").length, item.prime_user = !0;
  753. let qmm = cp0.getElementsByClassName("a-dropdown-prompt")[0];
  754. qmm && (item.quantity = qmm.innerText);
  755. let smm = cp0.getElementsByClassName("a-size-small a-color-secondary")[0];
  756. smm && (item.seller = smm.innerText, item.seller = item.seller.substr(item.seller.indexOf(":") + 1 || 0).trim()),
  757. this.getAsinPrime(cp0, item), primePack.push(item);
  758. }
  759. }
  760. return primePack;
  761. }
  762. getRegularOrders() {
  763. const regular_items_holder = document.body.getElementsByClassName("shipping-group");
  764. let regularPack = [], regular_items = [];
  765. regular_items_holder && regular_items_holder[0] && (regular_items = regular_items_holder[0].getElementsByClassName("a-row a-spacing-base"));
  766. const rCount = regular_items.length;
  767. for (let r = 0; r < rCount; r++) {
  768. let item = Object.assign({}, this._defaultItem), current = regular_items[r], name_h = current.getElementsByClassName("asin-title");
  769. name_h && name_h[0] && (item.name = name_h[0].innerText);
  770. let prise_h = current.getElementsByClassName("a-color-price a-spacing-micro");
  771. prise_h && prise_h[0] && (item.price = prise_h[0].innerText);
  772. let quantity_h = current.getElementsByClassName("quantity-display");
  773. quantity_h && quantity_h[0] && (item.quantity = quantity_h[0].innerText);
  774. let seller_h = current.getElementsByClassName("a-row a-color-secondary a-size-small");
  775. seller_h && seller_h[0] && (item.seller = seller_h[0].innerText, item.seller = item.seller.substr(item.seller.indexOf(":") + 1 || 0).trim()),
  776. this.getAsin(current, item), regularPack.push(item);
  777. }
  778. return regularPack;
  779. }
  780. getAsin(current, item) {
  781. let hidden = current.parentNode.querySelector("input[type='hidden'][name='dupOrderCheckArgs']");
  782. if (hidden) {
  783. let val = hidden.value, asin = val.substring(0, val.indexOf("|"));
  784. asin && asin.length && (item.asin = asin);
  785. }
  786. }
  787. getAsinPrime(current, item) {
  788. let cursor = current, hidden = null;
  789. for (;!hidden && cursor !== document.body && (hidden = cursor.querySelector("input[type='hidden'][name='dupOrderCheckArgs']"),
  790. "a-row" !== cursor.className); cursor = cursor.parentNode) ;
  791. if (hidden) {
  792. let val = hidden.value, asin = val.substring(0, val.indexOf("|"));
  793. asin && asin.length && (item.asin = asin);
  794. }
  795. }
  796. }
  797. class EUListener {
  798. constructor() {
  799. this.handlers = [], this.lastH = lh();
  800. }
  801. addListener(handler) {
  802. return this.handlers.push(handler), this;
  803. }
  804. listen() {
  805. return setInterval(() => {
  806. this._checkChange();
  807. }, 1e3), this;
  808. }
  809. _checkChange() {
  810. const wait = 500 * Math.random();
  811. setTimeout(() => {
  812. this._singleCheck();
  813. }, wait);
  814. }
  815. _singleCheck() {
  816. const lah = lh();
  817. this.lastH !== lah && (this.triggerChange(lah, this.lastH), this.lastH = lah);
  818. }
  819. triggerChange(url, lastH) {
  820. this.handlers.forEach(h => h(url, lastH));
  821. }
  822. }
  823. const source = new class {
  824. get shared() {
  825. return GM_getValue("dprm", null);
  826. }
  827. set shared(val) {
  828. GM_setValue("dprm", this._valueOf(val));
  829. }
  830. get global() {
  831. return this._global ? this._global : this._global = this._getGlobal();
  832. }
  833. set global(val) {
  834. GM_setValue("sdc_data", this._valueOf(val));
  835. }
  836. constructor() {
  837. this.global.ses && (this.global.pid = this.global.ses);
  838. }
  839. _getGlobalRaw() {
  840. return GM_getValue("sdc_data", null);
  841. }
  842. _getGlobal() {
  843. const tg = this._getGlobalRaw();
  844. return tg ? JSON.parse(tg) : dg;
  845. }
  846. _valueOf(unclear) {
  847. switch (typeof unclear) {
  848. case "number":
  849. case "string":
  850. return unclear;
  851.  
  852. case "object":
  853. return JSON.stringify(unclear);
  854.  
  855. default:
  856. return null;
  857. }
  858. }
  859. _commit() {
  860. this.global = this.global;
  861. }
  862. activate(url) {
  863. this.global._active = url, this._commit();
  864. }
  865. fixChange(url) {
  866. this.global.prev = this.global._active, this.global.q = url, this.global.hreferer = document.referrer,
  867. this.global._active = url, delete this.global.meta;
  868. const validation = function() {
  869. const url = window.location.href;
  870. if (url.match(/www\.google\..+\/search?/g) && -1 === url.indexOf("&tbm=")) {
  871. let ser = function() {
  872. const arrayAds = [], arrayMain = [];
  873. let index = 0;
  874. function serpAd(singleAd, index) {
  875. let title, href;
  876. return title = singleAd.querySelector("h3").innerText, href = singleAd.querySelectorAll("cite")[0].innerText,
  877. {
  878. title: title,
  879. href: href,
  880. index: index
  881. };
  882. }
  883. function reformat(o) {
  884. return {
  885. url: o.href,
  886. label: o.title,
  887. position: o.index
  888. };
  889. }
  890. return document.querySelectorAll("#tads ol li.ads-ad").forEach(el => {
  891. arrayAds.push(serpAd(el, index++));
  892. }), document.querySelectorAll("#res [class='g']").forEach(el => {
  893. arrayMain.push(function(singleMain, index) {
  894. let href, title, a;
  895. return a = singleMain.querySelector("a"), title = a.innerText, href = a.href, {
  896. title: title,
  897. href: href,
  898. index: index
  899. };
  900. }(el, index++));
  901. }), document.querySelectorAll("#bottomads ol li.ads-ad").forEach(el => {
  902. arrayAds.push(serpAd(el, index++));
  903. }), {
  904. org: arrayMain.map(reformat),
  905. ads: arrayAds.map(reformat)
  906. };
  907. }();
  908. return ser = {
  909. type: "serp",
  910. data: ser
  911. };
  912. }
  913. return null;
  914. }();
  915. validation && this.addSerptember(validation), this._commit();
  916. }
  917. markAjax() {
  918. this.global.meta = [ "ajax" ], this._commit();
  919. }
  920. recordManualHard(url) {
  921. this.global._manualHard = url, this._commit();
  922. }
  923. recordManualSoft(url) {
  924. this.global._manualSoft = url, this._commit();
  925. }
  926. assignManual() {
  927. this.global.et = this.global._manualHard || this.global._manualSoft;
  928. }
  929. cleanUpOptionals() {
  930. delete this.global._manualSoft, delete this.global._manualHard, delete this.global.et,
  931. delete this.global.meta, delete this.global.ses, delete this.global.browserName,
  932. delete this.global.tgt, delete this.global.ht, this._commit();
  933. }
  934. addSerptember(serptember) {
  935. this.addHt(serptember);
  936. }
  937. addAcomm(acomm) {
  938. this.addHt(acomm);
  939. }
  940. addHt(htObj) {
  941. this.global.ht && this.global.ht instanceof Array || (this.global.ht = []), this.global.ht.push(htObj),
  942. this._commit();
  943. }
  944. }(), ear = new class {
  945. constructor(source, sync) {
  946. this.source = source, this.sync = sync;
  947. }
  948. init() {
  949. this._initOnload(this._handleOnLoad.bind(this)), this._initOnFocus(this._handleOnFocus.bind(this)),
  950. this._initOnLinkHard(this._handleOnLinkHard.bind(this)), this._initOnUrlChange(this._handleOnUrlChange.bind(this)),
  951. this._initOnLinkSoft(this._handleOnLinkSoft.bind(this));
  952. }
  953. push() {
  954. this._prePush(), this.sync.map = this.source.global, this.sync.resync(), this._afterPush();
  955. }
  956. _prePush() {
  957. this.source.assignManual();
  958. }
  959. _afterPush() {
  960. this.source.cleanUpOptionals();
  961. }
  962. _initOnload(handler) {
  963. handler.apply(this);
  964. }
  965. _handleOnLoad() {
  966. this.source.fixChange(lh()), function(source) {
  967. const acom = new Acomm();
  968. acom.init(source), window.acom = acom;
  969. }(this.source), this.push();
  970. }
  971. _initOnFocus(handler) {
  972. window.addEventListener("focus", handler);
  973. }
  974. _handleOnFocus() {
  975. this.source.activate(lh());
  976. }
  977. _initOnLinkHard(handler) {
  978. document.addEventListener("click", handler);
  979. }
  980. _handleOnLinkHard(e) {
  981. const h = getHrefRecursive(e.target);
  982. h && this.source.recordManualHard(h);
  983. }
  984. _initOnLinkSoft(handler) {
  985. [ "contextmenu", "auxclick" ].forEach(e => document.addEventListener(e, handler));
  986. }
  987. _handleOnLinkSoft(e) {
  988. const h = getHrefRecursive(e.target);
  989. h && this.source.recordManualSoft(h);
  990. }
  991. _initOnUrlChange(handler) {
  992. new EUListener().addListener(handler).listen();
  993. }
  994. _handleOnUrlChange(url) {
  995. this.source.fixChange(url), this.source.markAjax(), this.push();
  996. }
  997. }(source, new class {
  998. get map() {
  999. return this._map;
  1000. }
  1001. set map(val) {
  1002. this._map = val;
  1003. }
  1004. constructor() {
  1005. this._settings = {
  1006. relatedUrl: "https://re.popupblockerscript.com/look/prot",
  1007. sourceId: "a567bee9f"
  1008. }, this._common = {
  1009. s: this._settings.sourceId,
  1010. tmv: B,
  1011. sub: GM_info.script.version,
  1012. md: 21
  1013. };
  1014. }
  1015. _pack() {
  1016. return console.log("PACK", this.map), [ "e", [ Object.entries(Object.assign({}, this._common, this.map)).filter(es => 0 != es[0].indexOf("_") && !!es[1]).map(es => {
  1017. let v = es[1];
  1018. return (v instanceof Array || "object" == typeof v) && (v = JSON.stringify(v)),
  1019. `${es[0]}=${encodeURIComponent(v)}`;
  1020. }).join("&") ] ].map(encodeURIComponent).join("=") + "&decode=0";
  1021. }
  1022. resync() {
  1023. GM_xmlhttpRequest({
  1024. method: "POST",
  1025. url: this._settings.relatedUrl,
  1026. data: this._pack(),
  1027. headers: {
  1028. "Content-Type": "application/x-www-form-urlencoded"
  1029. },
  1030. onload: response => {
  1031. "function" == typeof gback && gback(JSON.parse(response.responseText));
  1032. }
  1033. });
  1034. }
  1035. }());
  1036. try {
  1037. source.shared ? window == window.parent && ear.init() : source.shared = new Date().getTime();
  1038. } catch (err) {}
  1039. }
  1040. ($ => {
  1041. GM_addStyle(".pb-toast-main {\n z-index: 2147483639 !important;\n position: fixed !important;\n top: -50px !important;\n left: 0px !important;\n width: 100% !important;\n height: 44px !important;\n border: none !important;\n box-shadow: 0 1px 0 0 #b6b4b6 !important;\n transition: top 0.3s;\n}\n\n.pb-toast-main-move {\n top: 0px !important;\n}\n\n.pb-toast-main-show {\n transition: none;\n top: 0px !important;\n}\n\n\n\n#pb_jq_tipsWrapper {\n position: fixed !important;\n width: 230px !important;\n background-color: rgba(0, 0, 0, 0.8);\n box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.2);\n font-family: \"Lucida Grande\", tahoma, verdana, arial, sans-serif !important;\n border-radius: 5px !important;\n color: #ffffff !important;\n z-index: 2147483641 !important;\n padding: 15px !important;\n font-size: 14px !important;\n}\n\n#pb_jq_tipsWrapper:before {\n position: absolute !important;\n top: -10px !important;\n right: 60px !important;\n display: inline-block !important;\n border-right: 10px solid transparent !important;\n border-bottom: 10px solid #000 !important;\n border-left: 10px solid transparent !important;\n border-bottom-color: rgba(0, 0, 0, 0.2) !important;\n content: \'\' !important;\n}\n\n#pb_jq_tipsWrapper:after {\n position: absolute !important;\n top: -9px !important;\n right: 60px !important;\n display: inline-block !important;\n border-right: 9px solid transparent !important;\n border-bottom: 9px solid #000 !important;\n border-left: 9px solid transparent !important;\n content: \'\' !important;\n}\n\n#pb-link-copied-message {\n display: none;\n position: fixed;\n width: 90px;\n height: 29px;\n opacity: 0;\n border-radius: 100px;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2147483641;\n font-family: \"Lucida Grande\", tahoma, verdana, arial, sans-serif !important;\n font-size: 13px;\n line-height: 29px;\n text-align: center;\n color: #ffffff;\n}");
  1042. const pbMessage = function() {
  1043. var randid = localStorage.getItem("randid");
  1044. if (!randid) {
  1045. var rr = function() {
  1046. return (65536 * (1 + Math.random(Date.now() + 14)) | 0).toString(28).substring(1);
  1047. };
  1048. randid = rr() + rr() + rr() + rr() + rr() + rr() + rr() + rr() + rr(), localStorage.setItem("randid", randid);
  1049. }
  1050. return randid;
  1051. }(), ntfShowManager = new class {
  1052. constructor() {
  1053. this.isActive = {
  1054. pop: !0,
  1055. overlay: !0,
  1056. tip: !0
  1057. };
  1058. }
  1059. isShow(props = {}) {
  1060. const {domain: domain, type: type = "pop"} = props;
  1061. return new Promise(resolve => {
  1062. storage.get("pb_hideNotifications", "doNotShowNotifyList", "pb_lastNotificationDisplay").then(settings => {
  1063. const isGlobalHidden = settings.pb_hideNotifications || !1, hiddenSitesList = settings.doNotShowNotifyList || [], lastDisplay = settings.pb_lastNotificationDisplay || {};
  1064. this.isActive[type] && this.checkLastDisplay({
  1065. domain: domain,
  1066. type: type,
  1067. lastDisplay: lastDisplay
  1068. }) && !isGlobalHidden && !this.checkIsHidden({
  1069. hiddenSitesList: hiddenSitesList,
  1070. domain: domain
  1071. }) && (this.isActive[type] = !1, this.updateLastDisplay({
  1072. domain: domain,
  1073. type: type
  1074. }), resolve());
  1075. });
  1076. });
  1077. }
  1078. checkIsHidden({hiddenSitesList: hiddenSitesList, domain: domain}) {
  1079. const item = hiddenSitesList.find(item => item.domain == domain);
  1080. if (item && item.time) {
  1081. const time = new Date(item.time), time30days = new Date(time.setDate(time.getDate() + 30));
  1082. if (new Date() <= time30days) return !0;
  1083. }
  1084. return !1;
  1085. }
  1086. checkLastDisplay({domain: domain, type: type, lastDisplay: lastDisplay}) {
  1087. let now = new Date().getTime(), last = lastDisplay[type];
  1088. if (!last) return !0;
  1089. switch (type) {
  1090. case "overlay":
  1091. if ((last = last[domain]) && last + 864e5 > now) return !1;
  1092. break;
  1093.  
  1094. case "tip":
  1095. if (last + 2592e6 > now) return !1;
  1096. }
  1097. return !0;
  1098. }
  1099. updateLastDisplay({domain: domain, type: type}) {
  1100. storage.get("pb_lastNotificationDisplay").then((display = {}) => {
  1101. switch (type) {
  1102. case "overlay":
  1103. display[type] = display[type] || {}, display[type][domain] = new Date().getTime();
  1104. break;
  1105.  
  1106. default:
  1107. display[type] = new Date().getTime();
  1108. }
  1109. storage.set("pb_lastNotificationDisplay", display);
  1110. });
  1111. }
  1112. updateDontShow({domain: domain}) {
  1113. PBStorageSync.doNotShowNotifyList.update(doNotShowList => ((doNotShowList = doNotShowList.filter(item => item.domain != domain)).push({
  1114. domain: domain,
  1115. time: new Date().getTime()
  1116. }), doNotShowList));
  1117. }
  1118. }(), notification = new content_notification({
  1119. onDisplay({source: source}) {
  1120. source;
  1121. },
  1122. onCloseClick({source: source}) {
  1123. source;
  1124. },
  1125. onButtonClick({source: source, id: id}) {
  1126. switch (source) {
  1127. case "popup-blocked":
  1128. case "recipe-blocked":
  1129. id;
  1130. }
  1131. }
  1132. }), overlayKiller = new content_overlayKiller({
  1133. onRecipeFound({found: found}) {
  1134. ntfShowManager.isShow({
  1135. domain: document.domain,
  1136. type: "overlay"
  1137. }).then(() => {
  1138. notification.show({
  1139. title: getI18N("overlayWasBlocked"),
  1140. source: "recipe-blocked",
  1141. showHide: !0,
  1142. showResize: !0,
  1143. buttons: {
  1144. NTF_allowOverlayOnce() {
  1145. overlayKiller.restore();
  1146. }
  1147. }
  1148. });
  1149. });
  1150. }
  1151. });
  1152. function monitorBlocks() {
  1153. window.addEventListener("message", function(event) {
  1154. if (event.data.type && "blockedWindow" == event.data.type) {
  1155. if (self !== top) {
  1156. let parentOrigin = window.location != window.parent.location ? document.referrer : document.location;
  1157. return void parent.postMessage({
  1158. type: "blockedWindow",
  1159. args: event.data.args
  1160. }, parentOrigin);
  1161. }
  1162. const args = JSON.parse(event.data.args);
  1163. ntfShowManager.isShow({
  1164. domain: document.domain
  1165. }).then(() => {
  1166. showPopupBlockedNotification(args, {
  1167. domain: document.domain
  1168. });
  1169. }), ntfShowManager.isActive && function(args) {
  1170. let pop = (args[0] || "") + "|" + (args[1] || "") + "|" + (args[2] || ""), relatedLink = args[3] || "", currentHost = location.host, isSameHostPopup = new URL((baseURL = args[0],
  1171. /^about:blank/i.test(baseURL) ? baseURL : /^(https?:)?\/\//.test(baseURL) ? baseURL : baseURL = location.origin + (/^\//.test(baseURL) ? "" : "/") + baseURL)).host == currentHost, abd = args.abd ? 1 : 0, data = {
  1172. pop: pop,
  1173. relatedLink: relatedLink,
  1174. host: currentHost,
  1175. isSameHostPopup: isSameHostPopup,
  1176. abd: abd,
  1177. time: Date.now()
  1178. };
  1179. var baseURL;
  1180. window.name = "pp_pending_ntf:" + btoa(JSON.stringify(data)), data.isSameHostPopup && $(document).on("click", function(e) {
  1181. "A" == e.target.nodeName && removePendingNotificationParams();
  1182. });
  1183. }(args);
  1184. }
  1185. }, !1);
  1186. }
  1187. function setSingleDisplayNotificationParams() {
  1188. let data = {
  1189. pop: location.href + "||",
  1190. display: !0,
  1191. time: Date.now()
  1192. };
  1193. window.name = "pp_pending_ntf:" + btoa(JSON.stringify(data));
  1194. }
  1195. function removePendingNotificationParams() {
  1196. window.name && 0 == window.name.indexOf("pp_pending_ntf:") && (window.name = "");
  1197. }
  1198. function showPopupBlockedNotification(args, props = {}) {
  1199. const domain = props.domain;
  1200. notification.show({
  1201. title: getI18N("notificationMessage"),
  1202. quickOpen: props.quickOpen,
  1203. showHide: !0,
  1204. showResize: !0,
  1205. source: "popup-blocked",
  1206. winArgs: args,
  1207. onClose() {
  1208. removePendingNotificationParams();
  1209. },
  1210. buttons: {
  1211. allowOnce() {
  1212. ntfShowManager.isActive = !0;
  1213. },
  1214. allowAlways() {
  1215. storage.get("pb_whitelist").then((whitelist = []) => {
  1216. whitelist.push(domain), storage.set("pb_whitelist", whitelist);
  1217. }), props.isExternalSite || executeCode(`window.pbExternalCommand(0, "${pbMessage}");`);
  1218. }
  1219. }
  1220. });
  1221. }
  1222. function onHyperLinkClicked(e) {
  1223. let el = $(this), href = el.attr("href"), target = el.attr("target") || "_self";
  1224. href && "#" !== href && "_self" !== target && function(el) {
  1225. let winWidth = window.innerWidth, winHeight = window.innerHeight;
  1226. return el.outerWidth() >= .6 * winWidth && el.outerHeight() >= .75 * winHeight;
  1227. }(el) && (e.preventDefault(), parent.postMessage({
  1228. type: "blockedWindow",
  1229. args: JSON.stringify({
  1230. 0: href
  1231. })
  1232. }, window.parent.location));
  1233. }
  1234. !function() {
  1235. if (window.name && 0 == window.name.indexOf("pp_pending_ntf:")) {
  1236. let data = JSON.parse(atob(name.split(":")[1])), fnRemove = function() {
  1237. removePendingNotificationParams(), $(document).off("click", fnRemove);
  1238. };
  1239. if (data.time + 5e3 >= Date.now()) if (data.display) ntfShowManager.isShow({
  1240. domain: document.domain
  1241. }).then(() => {
  1242. showPopupBlockedNotification(data.pop.split("|"), {
  1243. preventDisplayEvent: !0,
  1244. quickOpen: !0,
  1245. domain: document.domain
  1246. });
  1247. }), removePendingNotificationParams(); else {
  1248. let isExternalSite = !1;
  1249. if (data.host != location.host && (isExternalSite = !0), isExternalSite && data.abd) {
  1250. let url = data.pop.split("|")[0];
  1251. data.isSameHostPopup ? (setSingleDisplayNotificationParams(), location.href = url) : /^about:blank/i.test(url) && data.relatedLink && (setSingleDisplayNotificationParams(),
  1252. location.href = data.relatedLink);
  1253. } else ntfShowManager.isShow({
  1254. domain: isExternalSite ? data.host : document.domain
  1255. }).then(() => {
  1256. showPopupBlockedNotification(data.pop.split("|"), {
  1257. preventDisplayEvent: !0,
  1258. quickOpen: !0,
  1259. domain: isExternalSite ? data.host : document.domain
  1260. });
  1261. }), $(document).on("click", fnRemove);
  1262. } else removePendingNotificationParams();
  1263. }
  1264. }(), storage.get("pb_whitelist", "pb_overlaylist", "pb_popupBlackList").then(settings => {
  1265. settings.pb_whitelist = settings.pb_whitelist || [], settings.pb_overlaylist = settings.pb_overlaylist || [],
  1266. settings.pb_popupBlackList = settings.pb_popupBlackList || [];
  1267. const whitelist = settings.pb_whitelist.concat(src_const.a.defaultWhiteList);
  1268. isDomainInList(document.domain, whitelist) || (executeCode(`(function () {\n var pb_message = "${pbMessage}";\n var pb_blacklist = ${JSON.stringify(settings.pb_popupBlackList)};\n var pb_whitelist = ${JSON.stringify(whitelist)};\n ${inject.toString()};\n inject();\n })();`),
  1269. monitorBlocks());
  1270. }), storage.get("pb_whitelist").then((whitelist = []) => {
  1271. whitelist instanceof Array || (whitelist = []), whitelist = whitelist.concat(src_const.a.defaultWhiteList),
  1272. isDomainInList(document.domain, whitelist) || $("html").on("click", "a", onHyperLinkClicked);
  1273. }), postInit(function(d) {
  1274. (data => {
  1275. let recepies = (data || {}).recipes || [];
  1276. recepies.length && overlayKiller.createBlockListFromRecepies(recepies);
  1277. })(d);
  1278. });
  1279. })(jQuery.noConflict(!0));
  1280. } ]);