请选择 进入手机版 | 继续访问电脑版

AdvertCN - 广告中国

 找回密码
 立即注册

QQ登录

只需一步,快速开始

 谷歌+Bing+TT+MSN官方代理 
⚡️按条S5代理⚡️静态⚡️独享⚡️5G⚡️最干净<Wifi住宅+5G移动>IP代理泰国仓储,本土仓发货2-3元/单
指纹浏览器,就用AdsPower谷歌/FB/Bing/Yahoo代理商开户7200W全球动态不重复住宅IP代理全球优质流量,选TrafficStars
出售Facebook,友缘号,FB广告号,insFB/TT/KW 加白开户比Adplexity还好用的Spy工具ADPLEXITY + ADVERTCN
FB不限额广告号MediaGo+Taboola+Ob开户百度国际MediaGo⚡️让产品狂奔全球百度国际,高点击转化,快速放量
百度国际MediaGo,独家原生流量虚拟信用卡+独立站收款行业首创新型指纹Cloak, 谷歌奇效!BINOM TRACKER 60% OFF!
Kookeey⚡️100%独享⚡️原生住宅IP⚡5000W动态住宅全场8折⚡全球虚拟卡, 支持U充值谷歌/Outbrain/Taboola⚡️一键开户
FB极速下户/白名单/不收费Affiliate站外引流服务⚡️极速出单免账户投放 FB 广告(送项目)2024做什么 - Media buy 项目库
免费黑五教程(持续更新、欢迎交流)Facebook 批量上广告Facebook账号1块一个各种主页、账单户、BM户(优势)
⚡️个人户,bm户不限额,账单户Adsterra 的CPA/CPM/CPC 网站流量在线注册美国/英国/香港等海外公司EU KETO/CBD - Jumbleberry
【YouTube】油管获利号交易平台三不限/账单户/BM不限额/直播主页FB二三解1元/个9Proxy ⚡️ $0.04/IP, 无限带宽
最佳Health和Beauty联盟广告位出租全球低价纯净住宅/移动IP-免费试用广告代投, 东南亚物流, 虚拟信用卡
VMLogin指纹浏览器+多账号防关联   
查看: 20625|回复: 25

海盗湾的popunder JS 代码,提高你的pop成功率

  [复制链接]

1600

主题

1万

广告币

2万

积分

管理员

宇宙无敌河马天神

Rank: 9Rank: 9Rank: 9

积分
28500

社区QQ达人

发表于 2015-2-23 02:03:20 | 显示全部楼层 |阅读模式
adsterra
这是我在海盗湾上抄来的,目前来说,成功率在95%以上。。
只需要修改var_wm_settings上参数就可以

url: 你想要pop的URL
times 和 hours 控制pop频率
cookies: 设定自己的cookie的名字,这个一定要设置自己的独一无二的名字,是否pop看的是cookie


  1. var _wm_settings = {
  2.     popunder: {
  3.         url: 'http://www.advertcn.com',
  4.         times: 1,
  5.         hours: 12.000000,
  6.         cookie: 'advertcn',
  7.         fastbind: true
  8.     }
  9. };
  10. var _wm = {
  11.     initialize: function() {
  12.         this.ua.initialize()
  13.     },
  14.     array: {
  15.         is_array: function(a) {
  16.             return Object.prototype.toString.call(a) === '[object Array]'
  17.         },
  18.         sort: function(a, b, c) {
  19.             a = a.sort();
  20.             if (b) a = a.reverse();
  21.             if (c) {
  22.                 for (var i = 0; i < a.length; i++) {
  23.                     var d = a[i];
  24.                     if (Object.prototype.toString.call(d) === '[object Object]') d = _wm.object.sort(d, b, true);
  25.                     else if (Object.prototype.toString.call(d) === '[object Array]') d = _wm.array.sort(d, b, true);
  26.                     a[i] = d
  27.                 }
  28.             }
  29.             return a
  30.         },
  31.         random_value: function(a) {
  32.             return a[Math.floor(a.length * Math.random())]
  33.         }
  34.     },
  35.     object: {
  36.         is_object: function(a) {
  37.             return Object.prototype.toString.call(a) === '[object Object]'
  38.         },
  39.         keys: function(a) {
  40.             var hasOwnProperty = Object.prototype.hasOwnProperty,
  41.                 hasDontEnumBug = !({
  42.                     toString: null
  43.                 }).propertyIsEnumerable('toString'),
  44.                 dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'],
  45.                 dontEnumsLength = dontEnums.length;
  46.             var b = [];
  47.             if (typeof a !== 'object' && typeof a !== 'function' || a === null) return b;
  48.             for (var c in a) {
  49.                 if (hasOwnProperty.call(a, c)) b.push(c)
  50.             }
  51.             if (hasDontEnumBug) {
  52.                 for (var i = 0; i < dontEnumsLength; i++) {
  53.                     if (hasOwnProperty.call(a, dontEnums[i])) b.push(dontEnums[i])
  54.                 }
  55.             }
  56.             return b
  57.         },
  58.         sort: function(a, c, d) {
  59.             var e = _wm.array.sort(_wm.object.keys(a));
  60.             if (c) e = e.reverse();
  61.             var b = {};
  62.             for (var i = 0; i < e.length; i++) {
  63.                 var f = a[e[i]];
  64.                 if (d) {
  65.                     if (_wm.object.is_object(f)) f = _wm.object.sort(f, c, true);
  66.                     else if (_wm.array.is_array(f)) f = _wm.array.sort(f, c, true)
  67.                 }
  68.                 b[e[i]] = f
  69.             }
  70.             return b
  71.         },
  72.         iterator: function(b) {
  73.             this.element = b;
  74.             this.element_array = _wm.object.keys(b);
  75.             this.current_index = 0;
  76.             this.hasNext = function() {
  77.                 return this.current_index <= this.element_array.length - 1
  78.             };
  79.             this.next = function() {
  80.                 if (this.hasNext()) {
  81.                     var a = [this.element_array[this.current_index], this.element[this.element_array[this.current_index]]];
  82.                     this.current_index++;
  83.                     return a
  84.                 }
  85.                 return false
  86.             }
  87.         },
  88.         random_value: function(a) {
  89.             return a[_wm.array.random_value(_wm.object.keys(a))]
  90.         },
  91.         length: function(a) {
  92.             return _wm.object.keys(a).length
  93.         }
  94.     },
  95.     ua: {
  96.         initialize: function() {
  97.             this.maps = {
  98.                 browser: {
  99.                     oldsafari: {
  100.                         major: {
  101.                             '1': ['/8', '/1', '/3'],
  102.                             '2': '/4',
  103.                             '?': '/'
  104.                         },
  105.                         version: {
  106.                             '1.0': '/8',
  107.                             '1.2': '/1',
  108.                             '1.3': '/3',
  109.                             '2.0': '/412',
  110.                             '2.0.2': '/416',
  111.                             '2.0.3': '/417',
  112.                             '2.0.4': '/419',
  113.                             '?': '/'
  114.                         }
  115.                     }
  116.                 },
  117.                 os: {
  118.                     windows: {
  119.                         version: {
  120.                             'ME': '4.90',
  121.                             'NT 3.11': 'NT3.51',
  122.                             'NT 4.0': 'NT4.0',
  123.                             '2000': 'NT 5.0',
  124.                             'XP': ['NT 5.1', 'NT 5.2'],
  125.                             'Vista': 'NT 6.0',
  126.                             '7': 'NT 6.1',
  127.                             '8': 'NT 6.2',
  128.                             '8.1': 'NT 6.3',
  129.                             'RT': 'ARM'
  130.                         }
  131.                     }
  132.                 }
  133.             };
  134.             this.regexes = {
  135.                 browser: [
  136.                     [/(opera\smini)\/((\d+)?[\w\.-]+)/i, /(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i, /(opera).+version\/((\d+)?[\w\.]+)/i, /(opera)[\/\s]+((\d+)?[\w\.]+)/i],
  137.                     ['name', 'version', 'major'],
  138.                     [/\s(opr)\/((\d+)?[\w\.]+)/i],
  139.                     [
  140.                         ['name', 'Opera'], 'version', 'major'
  141.                     ],
  142.                     [/(kindle)\/((\d+)?[\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i, /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i, /(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i, /(rekonq)((?:\/)[\w\.]+)*/i, /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i],
  143.                     ['name', 'version', 'major'],
  144.                     [/(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i],
  145.                     [
  146.                         ['name', 'IE'], 'version', 'major'
  147.                     ],
  148.                     [/(yabrowser)\/((\d+)?[\w\.]+)/i],
  149.                     [
  150.                         ['name', 'Yandex'], 'version', 'major'
  151.                     ],
  152.                     [/(comodo_dragon)\/((\d+)?[\w\.]+)/i],
  153.                     [
  154.                         ['name', /_/g, ' '], 'version', 'major'
  155.                     ],
  156.                     [/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i],
  157.                     ['name', 'version', 'major'],
  158.                     [/(dolfin)\/((\d+)?[\w\.]+)/i],
  159.                     [
  160.                         ['name', 'Dolphin'], 'version', 'major'
  161.                     ],
  162.                     [/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i],
  163.                     [
  164.                         ['name', 'Chrome'], 'version', 'major'
  165.                     ],
  166.                     [/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i],
  167.                     ['version', 'major', ['name', 'Mobile Safari']],
  168.                     [/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i],
  169.                     ['version', 'major', 'name'],
  170.                     [/webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i],
  171.                     ['name', ['major', _wm.ua.mapper.str, _wm.ua.maps.browser.oldsafari.major],
  172.                         ['version', _wm.ua.mapper.str, _wm.ua.maps.browser.oldsafari.version]
  173.                     ],
  174.                     [/(konqueror)\/((\d+)?[\w\.]+)/i, /(webkit|khtml)\/((\d+)?[\w\.]+)/i],
  175.                     ['name', 'version', 'major'],
  176.                     [/(navigator|netscape)\/((\d+)?[\w\.-]+)/i],
  177.                     [
  178.                         ['name', 'Netscape'], 'version', 'major'
  179.                     ],
  180.                     [/(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i, /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i, /(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i, /(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i, /(links)\s\(((\d+)?[\w\.]+)/i, /(gobrowser)\/?((\d+)?[\w\.]+)*/i, /(ice\s?browser)\/v?((\d+)?[\w\._]+)/i, /(mosaic)[\/\s]((\d+)?[\w\.]+)/i],
  181.                     ['name', 'version', 'major']
  182.                 ],
  183.                 os: [
  184.                     [/(windows)\snt\s6\.2;\s(arm)/i, /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],
  185.                     ['name', ['version', _wm.ua.mapper.str, _wm.ua.maps.os.windows.version]],
  186.                     [/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],
  187.                     [
  188.                         ['name', 'Windows'],
  189.                         ['version', _wm.ua.mapper.str, _wm.ua.maps.os.windows.version]
  190.                     ],
  191.                     [/\((bb)(10);/i],
  192.                     [
  193.                         ['name', 'BlackBerry'], 'version'
  194.                     ],
  195.                     [/(blackberry)\w*\/?([\w\.]+)*/i, /(tizen)\/([\w\.]+)/i, /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i],
  196.                     ['name', 'version'],
  197.                     [/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],
  198.                     [
  199.                         ['name', 'Symbian'], 'version'
  200.                     ],
  201.                     [/mozilla.+\(mobile;.+gecko.+firefox/i],
  202.                     [
  203.                         ['name', 'Firefox OS'], 'version'
  204.                     ],
  205.                     [/(nintendo|playstation)\s([wids3portablevu]+)/i, /(mint)[\/\s\(]?(\w+)*/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i, /(hurd|linux)\s?([\w\.]+)*/i, /(gnu)\s?([\w\.]+)*/i],
  206.                     ['name', 'version'],
  207.                     [/(cros)\s[\w]+\s([\w\.]+\w)/i],
  208.                     [
  209.                         ['name', 'Chromium OS'], 'version'
  210.                     ],
  211.                     [/(sunos)\s?([\w\.]+\d)*/i],
  212.                     [
  213.                         ['name', 'Solaris'], 'version'
  214.                     ],
  215.                     [/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],
  216.                     ['name', 'version'],
  217.                     [/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],
  218.                     [
  219.                         ['name', 'iOS'],
  220.                         ['version', /_/g, '.']
  221.                     ],
  222.                     [/(mac\sos\sx)\s?([\w\s\.]+\w)*/i],
  223.                     ['name', ['version', /_/g, '.']],
  224.                     [/(haiku)\s(\w+)/i, /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, /(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i, /(unix)\s?([\w\.]+)*/i],
  225.                     ['name', 'version']
  226.                 ]
  227.             }, this.browser = this.get.browser();
  228.             this.os = this.get.os()
  229.         },
  230.         ua: (window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : '',
  231.         get: {
  232.             browser: function() {
  233.                 return _wm.ua.mapper.rgx.apply(this, _wm.ua.regexes.browser)
  234.             },
  235.             os: function() {
  236.                 return _wm.ua.mapper.rgx.apply(this, _wm.ua.regexes.os)
  237.             }
  238.         },
  239.         util: {
  240.             has: function(a, b) {
  241.                 return b.toLowerCase().indexOf(a.toLowerCase()) !== -1
  242.             },
  243.             lowerize: function(a) {
  244.                 return a.toLowerCase()
  245.             }
  246.         },
  247.         mapper: {
  248.             rgx: function() {
  249.                 for (var a, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) {
  250.                     var b = args[i],
  251.                         props = args[i + 1];
  252.                     if (typeof(a) === 'undefined') {
  253.                         a = {};
  254.                         for (p in props) {
  255.                             q = props[p];
  256.                             if (typeof(q) === 'object') {
  257.                                 a[q[0]] = undefined
  258.                             } else {
  259.                                 a[q] = undefined
  260.                             }
  261.                         }
  262.                     }
  263.                     for (j = k = 0; j < b.length; j++) {
  264.                         matches = b[j].exec(_wm.ua.ua);
  265.                         if (!!matches) {
  266.                             for (p = 0; p < props.length; p++) {
  267.                                 match = matches[++k];
  268.                                 q = props[p];
  269.                                 if (typeof(q) === 'object' && q.length > 0) {
  270.                                     if (q.length == 2) {
  271.                                         if (typeof(q[1]) == 'function') {
  272.                                             a[q[0]] = q[1].call(this, match)
  273.                                         } else {
  274.                                             a[q[0]] = q[1]
  275.                                         }
  276.                                     } else if (q.length == 3) {
  277.                                         if (typeof(q[1]) === 'function' && !(q[1].exec && q[1].test)) {
  278.                                             a[q[0]] = match ? q[1].call(this, match, q[2]) : undefined
  279.                                         } else {
  280.                                             a[q[0]] = match ? match.replace(q[1], q[2]) : undefined
  281.                                         }
  282.                                     } else if (q.length == 4) {
  283.                                         a[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined
  284.                                     }
  285.                                 } else {
  286.                                     a[q] = match ? match : undefined
  287.                                 }
  288.                             }
  289.                             break
  290.                         }
  291.                     }
  292.                     if (!!matches) break
  293.                 }
  294.                 return a
  295.             },
  296.             str: function(a, b) {
  297.                 for (var i in b) {
  298.                     if (typeof(b[i]) === 'object' && b[i].length > 0) {
  299.                         for (var j = 0; j < b[i].length; j++) {
  300.                             if (_wm.ua.util.has(b[i][j], a)) {
  301.                                 return (i === '?') ? undefined : i
  302.                             }
  303.                         }
  304.                     } else if (_wm.ua.util.has(b[i], a)) {
  305.                         return (i === '?') ? undefined : i
  306.                     }
  307.                 }
  308.                 return a
  309.             }
  310.         }
  311.     },
  312.     cookie: {
  313.         get: function(a, b) {
  314.             var c = new Date();
  315.             c.setTime(c.getTime());
  316.             var d = new Date(c.getTime() + (1000 * 60 * 60 * b)).toGMTString();
  317.             var e = document.cookie.split(';');
  318.             var f = '';
  319.             var g = '';
  320.             var h = [0, d];
  321.             for (var i = 0; i < e.length; i++) {
  322.                 f = e[i].split('=');
  323.                 g = f[0].replace(/^\s+|\s+$/g, '');
  324.                 if (g == a) {
  325.                     b_cookie_found = true;
  326.                     if (f.length > 1) {
  327.                         h = unescape(f[1]).split('|');
  328.                         if (h.length == 1) h[1] = d
  329.                     }
  330.                     return h
  331.                 }
  332.                 f = null;
  333.                 g = ''
  334.             }
  335.             return h
  336.         },
  337.         set: function(a, b, c) {
  338.             document.cookie = a + '=' + escape(b + '|' + c) + ';expires=' + c + ';path=/'
  339.         }
  340.     },
  341.     listener: {
  342.         events: [],
  343.         add: function(a, b, c, e) {
  344.             if (e == undefined) e = true;
  345.             var d = 'on' + b;
  346.             if (typeof a.addEventListener != 'undefined') a.addEventListener(b, c, e);
  347.             else if (typeof a.attachEvent != 'undefined') a.attachEvent(d, c);
  348.             else {
  349.                 if (typeof a[d] != 'function') a[d] = c;
  350.                 else {
  351.                     var e = a[d];
  352.                     a['old_' + d] = e;
  353.                     a[d] = function() {
  354.                         e();
  355.                         return c()
  356.                     }
  357.                 }
  358.             }
  359.             _wm.listener.events.push(arguments)
  360.         },
  361.         remove: function(a, b, c, e) {
  362.             if (e == undefined) e = true;
  363.             var d = 'on' + b;
  364.             if (typeof a.removeEventListener != 'undefined') a.removeEventListener(b, c, e);
  365.             else if (typeof a.detachEvent != 'undefined') a.detachEvent(d, c);
  366.             else {
  367.                 if (typeof a['old_' + d] != 'function') a[d] = null;
  368.                 else a[d] = a['old_' + d]
  369.             }
  370.             outer: for (var i = 0; i < _wm.listener.events.length; i++) {
  371.                 inner: for (var j = 0; j < _wm.listener.events[i].length; j++) {
  372.                     if (_wm.listener.events[i][j] !== arguments[j]) continue outer
  373.                 }
  374.                 _wm.listener.events = _wm.listener.events.slice(0, i).concat(_wm.listener.events.slice(i + 1));
  375.                 break outer
  376.             }
  377.         },
  378.         clear: function() {
  379.             while (_wm.listener.events.length > 0) _wm.listener.remove.apply(undefined, _wm.listener.events[0])
  380.         }
  381.     },
  382.     format: {},
  383.     random: function() {
  384.         return Math.floor(Math.random() * 1000001)
  385.     }
  386. };
  387. _wm.initialize();
  388. _wm.format.popunder = {
  389.     settings: typeof _wm_settings === 'object' && _wm_settings.popunder || false,
  390.     config: 'width=' + screen.width + ', height=' + screen.height + ',resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,scrollbars=yes',
  391.     isBinded: false,
  392.     isTriggered: false,
  393.     trigger_stack: [],
  394.     initialize: function() {
  395.         if (!_wm.format.popunder.settings) {
  396.             alert('Popunder configuration need to be declared using _wm_settings variable prior to script execution.');
  397.             return
  398.         }
  399.         var a = _wm.cookie.get(_wm.format.popunder.settings.cookie, _wm.format.popunder.settings.hours);
  400.         this.cookie = {};
  401.         this.cookie.times = !isNaN(Number(a[0])) ? Number(a[0]) : 0;
  402.         this.cookie.expires = !isNaN(Date.parse(a[1])) ? a[1] : new Date().toGMTString();
  403.         if (_wm.format.popunder.settings.fastbind) _wm.format.popunder.handler.bind();
  404.         else {
  405.             if (document.readyState == 'complete') _wm.format.popunder.handler.bind();
  406.             else {
  407.                 _wm.listener.add(document, 'DOMContentLoaded', function() {
  408.                     _wm.listener.remove(document, 'DOMContentLoaded');
  409.                     _wm.format.popunder.handler.bind()
  410.                 });
  411.                 _wm.listener.add(document, 'onreadystatechange', function() {
  412.                     if (document.readyState == 'complete') {
  413.                         _wm.listener.remove(document, 'onreadystatechange');
  414.                         _wm.format.popunder.handler.bind()
  415.                     }
  416.                 });
  417.                 _wm.listener.add(window, 'load', _wm.format.popunder.handler.bind)
  418.             }
  419.         }
  420.     },
  421.     url: function() {
  422.         var a = _wm.format.popunder.settings.url;
  423.         if (typeof a == 'string') return a;
  424.         if (_wm.array.is_array(a)) return _wm.array.random_value(a);
  425.         if ((_wm.object.is_object(a) && !_wm.format.popunder.settings.hours)) return _wm.object.random_value(a);
  426.         if (_wm.object.is_object(a)) {
  427.             if (a[_wm.format.popunder.cookie.times] != undefined) return a[_wm.format.popunder.cookie.times];
  428.             else return _wm.object.random_value(a)
  429.         }
  430.         return null
  431.     },
  432.     handler: {
  433.         bind: function() {
  434.             if (_wm.format.popunder.isBinded) return;
  435.             _wm.format.popunder.isBinded = true;
  436.             if (_wm.format.popunder.cookie.times >= _wm.format.popunder.settings.times && _wm.format.popunder.settings.hours > 0) return;
  437.             var b = {};
  438.             var c = function() {
  439.                 var a = arguments[0];
  440.                 for (var i = 2; i < arguments.length; i++) {
  441.                     if (i % 2) arguments[i] = arguments[i] + '.0';
  442.                     if (!a.hasOwnProperty(arguments[i]) && i < arguments.length - 1) a[arguments[i]] = {};
  443.                     if (i == arguments.length - 1) a[arguments[i]] = arguments[1];
  444.                     else a = a[arguments[i]]
  445.                 }
  446.                 return arguments[0]
  447.             };
  448.             for (var d in _wm.format.popunder.callback.binder) {
  449.                 if (!_wm.format.popunder.callback.binder.hasOwnProperty(d)) continue;
  450.                 var e = _wm.format.popunder.callback.binder[d];
  451.                 var f = d.split(',');
  452.                 for (var g in f) {
  453.                     if (!f.hasOwnProperty(g)) continue;
  454.                     var h = f[g].split(':');
  455.                     var j = h.length == 1 ? ['all', 0].concat(h[0].split('_')) : (h[0].indexOf('_') != -1 ? h[0].split('_') : h[0].split('_').concat([0])).concat(h[1].split('_'));
  456.                     if (j.length == 3) j.push(0);
  457.                     b = c.apply(null, [b, e].concat(j))
  458.                 }
  459.             }
  460.             b = _wm.object.sort(b, true, true);
  461.             var k = {};
  462.             var l = [_wm.ua.os.name.toLowerCase().split(' ').shift(), parseInt(_wm.ua.os.version) || 0, _wm.ua.browser.name.toLowerCase().split(' ').shift(), parseInt(_wm.ua.browser.major) || 0];
  463.             var m = [],
  464.                 trace_values = [];
  465.             var n = b;
  466.             for (var i = 0; i >= 0 && i < l.length; i++) {
  467.                 var o = (trace_values.length > 0 ? trace_values.join(':') + ':' : '') + '' + i;
  468.                 if (k[o]) {
  469.                     var p = k[o]
  470.                 } else {
  471.                     var p = new _wm.object.iterator(n);
  472.                     k[o] = p
  473.                 }
  474.                 var q = false;
  475.                 while (p.hasNext()) {
  476.                     var r = p.next();
  477.                     if ((i % 2 && r[0] <= parseFloat(l[i])) || (i % 2 == 0 && (r[0] == l[i]) || r[0] === 'all')) {
  478.                         q = r[0];
  479.                         break
  480.                     }
  481.                 }
  482.                 if (q) {
  483.                     m.push(n);
  484.                     trace_values.push(q);
  485.                     n = n[q]
  486.                 } else {
  487.                     trace_values.pop();
  488.                     n = m.pop();
  489.                     i -= 2
  490.                 }
  491.             }
  492.             if (typeof n === 'function') n()
  493.         },
  494.         trigger: function(e) {
  495.             if (_wm.ua.browser.name.toLowerCase() !== 'ie' || _wm.ua.browser.major > 8) e.stopImmediatePropagation();
  496.             _wm.listener.clear();
  497.             if (!_wm.format.popunder.registerTrigger()) return;
  498.             var a;
  499.             while (a = _wm.format.popunder.trigger_stack.shift()) _wm.format.popunder.callback.trigger[a.shift()].apply(undefined, a)
  500.         }
  501.     },
  502.     callback: {
  503.         binder: {
  504.             'mac:safari_6,windows:chrome_34,mac:chrome_34,linux:chrome_34': function() {
  505.                 _wm.format.popunder.trigger_stack.push(['tab_trigger']);
  506.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  507.                 _wm.format.popunder.occupy()
  508.             },
  509.             'windows:chrome_31,mac:chrome_31,linux:chrome_31': function() {
  510.                 _wm.format.popunder.trigger_stack.push(['flash_trigger']);
  511.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  512.                 _wm.format.popunder.occupy()
  513.             },
  514.             'windows:chrome_28,mac:chrome_28,linux:chrome_28': function() {
  515.                 _wm.format.popunder.trigger_stack.push(['triple_trigger']);
  516.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  517.                 _wm.format.popunder.occupy()
  518.             },
  519.             'firefox_12,chrome_21': function() {
  520.                 _wm.format.popunder.trigger_stack.push(['double_trigger']);
  521.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  522.                 _wm.format.popunder.occupy()
  523.             },
  524.             'explorer': function() {
  525.                 _wm.format.popunder.trigger_stack.push(['single_delay']);
  526.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  527.                 _wm.format.popunder.occupy()
  528.             },
  529.             'android:all,ios:all': function() {
  530.                 _wm.format.popunder.trigger_stack.push(['single']);
  531.                 _wm.listener.add(document, 'touchend', _wm.format.popunder.handler.trigger);
  532.                 _wm.listener.add(document, 'touchcancel', _wm.format.popunder.handler.trigger);
  533.                 _wm.format.popunder.occupy()
  534.             },
  535.             'windows:iemobile': function() {
  536.                 _wm.format.popunder.trigger_stack.push(['single']);
  537.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  538.                 _wm.format.popunder.occupy()
  539.             },
  540.             'all': function() {
  541.                 _wm.format.popunder.trigger_stack.push(['single']);
  542.                 _wm.listener.add(document, 'click', _wm.format.popunder.handler.trigger);
  543.                 _wm.format.popunder.occupy()
  544.             }
  545.         },
  546.         trigger: {
  547.             flash_trigger: function() {
  548.                 var d = document.createElement('div');
  549.                 document.body.appendChild(d);
  550.                 d.innerHTML = '<object type="application/x-sho' + 'ckwave-fla' + 'sh" data="about:blank" id="wm_ff_pu_33_fl" ' + 'width="1" height="1"><param name="wmode" value="transparent"></object>';
  551.                 var a = document.getElementById('wm_ff_pu_33_fl');
  552.                 a.focus();
  553.                 a.style.display = 'none';
  554.                 window.open(_wm.format.popunder.url(), 'pu_' + _wm.random(), _wm.format.popunder.config);
  555.                 window.open('').close()
  556.             },
  557.             tab_trigger: function() {
  558.                 var a = document.createElement('a');
  559.                 a.href = _wm.format.popunder.url();
  560.                 a.setAttribute('target', '_blank');
  561.                 top.window.document.body.appendChild(a);
  562.                 var e = document.createEvent('MouseEvents');
  563.                 e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, null);
  564.                 a.dispatchEvent(e)
  565.             },
  566.             triple_trigger: function() {
  567.                 window.open('javascript:window.focus()', '_self');
  568.                 var w = window.open('about:blank', 'pu_' + _wm.random(), _wm.format.popunder.config);
  569.                 var a = document.createElement('a');
  570.                 a.setAttribute('href', 'data:text/html,<scr' + 'ipt>window.close();</scr' + 'ipt>');
  571.                 a.style.display = 'none';
  572.                 document.body.appendChild(a);
  573.                 var e = document.createEvent('MouseEvents');
  574.                 e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, true, false, false, true, 0, null);
  575.                 a.dispatchEvent(e);
  576.                 document.body.removeChild(a);
  577.                 w.document.open().write('<scr' + 'ipt type="text/javascript">window.location="' + _wm.format.popunder.url() + '";<\/scr' + 'ipt>');
  578.                 w.document.close()
  579.             },
  580.             double_trigger: function() {
  581.                 var w = window.open(_wm.format.popunder.url(), 'pu_' + _wm.random(), _wm.format.popunder.config);
  582.                 if (w) {
  583.                     w.blur();
  584.                     try {
  585.                         var b = w.window.open('about:blank');
  586.                         b.close()
  587.                     } catch (i) {}
  588.                     if (_wm.ua.browser == 'Firefox') window.showModalDialog("javascript:window.close()", null, "dialogtop:99999999;dialogleft:999999999;dialogWidth:1;dialogHeight:1");
  589.                     window.focus()
  590.                 }
  591.             },
  592.             single_delay: function() {
  593.                 var w = window.open(_wm.format.popunder.url(), 'pu_' + _wm.random(), _wm.format.popunder.config);
  594.                 window.setTimeout(window.focus, 750);
  595.                 window.setTimeout(window.focus, 850);
  596.                 if (w) w.blur()
  597.             },
  598.             single: function(a) {
  599.                 var w = window.open(_wm.format.popunder.url(), 'pu_' + _wm.random(), _wm.format.popunder.config);
  600.                 if (w) {
  601.                     w.blur();
  602.                     window.focus()
  603.                 }
  604.             },
  605.         }
  606.     },
  607.     occupy: function(a) {
  608.         if (!a) {
  609.             a = ['mousedown', 'mouseup']
  610.         }
  611.         for (var i = 0; i < a.length; i++) {
  612.             _wm.listener.add(document, a[i], function(e) {
  613.                 if (_wm.ua.browser.name.toLowerCase() !== 'ie' || _wm.ua.browser.major > 8) e.stopImmediatePropagation()
  614.             })
  615.         }
  616.     },
  617.     registerTrigger: function() {
  618.         if (_wm.format.popunder.isTriggered) return false;
  619.         _wm.format.popunder.isTriggered = true;
  620.         if (_wm.format.popunder.settings.hours > 0) _wm.cookie.set(_wm.format.popunder.settings.cookie, ++_wm.format.popunder.cookie.times, _wm.format.popunder.cookie.expires);
  621.         return true
  622.     }
  623. };
  624. (function() {
  625.     _wm.format.popunder.initialize()
  626. })();
复制代码




评分

参与人数 5广告币 +17 收起 理由
laoyebin + 2 很给力!
qiu1123 + 1 很给力!
xawnu + 2 很给力!
BODY + 2 很给力!
狼行天下 + 10 怎么没人加分呢?

查看全部评分

相关帖子
学会提问的艺术, 从小处入手, 忌大而空
AdvertCN电报群

我最喜欢用的工具
7200W全球动态不重复住宅IP代理
回复

使用道具 举报

25

主题

290

广告币

584

积分

中级会员

Rank: 3Rank: 3

积分
584
发表于 2015-6-14 22:47:26 | 显示全部楼层
请教河马大神,这段代码需要前后加上<script>---</script>吗?另外,这个cookie设定是啥意思呢? 谢谢指点。
回复 支持 0 反对 1

使用道具 举报

44

主题

770

广告币

1422

积分

高级会员

Rank: 4

积分
1422
发表于 2015-2-23 02:23:27 | 显示全部楼层
pop under主要用来做哪个联盟呀?
另外申请填写了bulk mail的请求通过,谢谢了。
回复 支持 反对

使用道具 举报

64

主题

1139

广告币

1563

积分

高级会员

Rank: 4

积分
1563

社区QQ达人

QQ
发表于 2015-2-23 03:03:42 | 显示全部楼层
这么多,不如直接弄一个下载文件,直接测试。。。。。
回复 支持 反对

使用道具 举报

64

主题

1139

广告币

1563

积分

高级会员

Rank: 4

积分
1563

社区QQ达人

QQ
发表于 2015-2-23 03:14:12 | 显示全部楼层
试了一下,挺不错的。
回复 支持 反对

使用道具 举报

16

主题

1811

广告币

2217

积分

高级会员

Rank: 4

积分
2217

社区QQ达人

发表于 2015-2-23 09:10:14 | 显示全部楼层
这么长的JS代理,看着晕
回复 支持 反对

使用道具 举报

64

主题

1139

广告币

1563

积分

高级会员

Rank: 4

积分
1563

社区QQ达人

QQ
发表于 2015-2-23 11:14:11 | 显示全部楼层
本帖最后由 TMM 于 2015-2-23 11:16 编辑

在PC测试的时候,弹出是新窗口,并且当前窗口保持不变,但是在手机端测试的时候,也弹出了新窗口,当前窗口定位到了新弹出的窗口,如何才能定位到原来的窗口呢。或者说哪种效果更好呢。

点评

海盗湾的好  详情 回复 发表于 2015-2-23 11:58
回复 支持 反对

使用道具 举报

1600

主题

1万

广告币

2万

积分

管理员

宇宙无敌河马天神

Rank: 9Rank: 9Rank: 9

积分
28500

社区QQ达人

 楼主| 发表于 2015-2-23 11:58:10 | 显示全部楼层
TMM 发表于 2015-2-23 11:14
在PC测试的时候,弹出是新窗口,并且当前窗口保持不变,但是在手机端测试的时候,也弹出了新窗口,当前窗口 ...

海盗湾的好
学会提问的艺术, 从小处入手, 忌大而空
AdvertCN电报群

我最喜欢用的工具
7200W全球动态不重复住宅IP代理
回复 支持 反对

使用道具 举报

9

主题

96

广告币

164

积分

初级会员

Rank: 2

积分
164

社区QQ达人

发表于 2015-2-25 17:24:40 | 显示全部楼层
本帖最后由 .koala 于 2015-2-25 17:37 编辑

如果设置一个ip24小时只弹出一次,应该怎样设置 times和hours
回复 支持 反对

使用道具 举报

54

主题

9

广告币

6010

积分

禁止访问

积分
6010
发表于 2015-2-26 21:20:29 | 显示全部楼层
居然连adblock都挡不住
回复 支持 反对

使用道具 举报

54

主题

9

广告币

6010

积分

禁止访问

积分
6010
发表于 2015-2-26 21:21:24 | 显示全部楼层
居然连adblock都挡不住
回复 支持 反对

使用道具 举报

3

主题

602

广告币

709

积分

中级会员

Rank: 3Rank: 3

积分
709

社区QQ达人

发表于 2015-2-27 18:11:35 | 显示全部楼层
这个代码好长啊 要花点时间看看了
回复 支持 反对

使用道具 举报

161

主题

608

广告币

3020

积分

高级会员

Rank: 4

积分
3020

社区QQ达人

发表于 2015-2-28 23:05:22 | 显示全部楼层
收藏了。。
免费扫高权重域名限时优惠VIP:加创业干货群52385364
365banzheng.com互联网资质办理
點基跨境
回复 支持 反对

使用道具 举报

2

主题

119

广告币

132

积分

初级会员

Rank: 2

积分
132

社区QQ达人

发表于 2015-3-2 09:45:35 | 显示全部楼层
河马,你太威武了。。
回复 支持 反对

使用道具 举报

19

主题

1096

广告币

2009

积分

高级会员

Rank: 4

积分
2009

社区QQ达人

QQ
发表于 2015-3-30 19:50:08 | 显示全部楼层
不错的代码

河马问下,加了代码以后,手机上测试chrome和safari每次点击页面以后直接定位到pop的页面了,有没有办法设置在原窗口?
努力奋斗
回复 支持 反对

使用道具 举报

19

主题

1096

广告币

2009

积分

高级会员

Rank: 4

积分
2009

社区QQ达人

QQ
发表于 2015-4-1 22:58:51 | 显示全部楼层
河马问下,这个代码怎么设置停留在原窗口啊?

点评

没  详情 回复 发表于 2015-4-2 22:04
努力奋斗
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们|联系我们|DMCA|广告服务|小黑屋|手机版|Archiver|Github|网站地图|AdvertCN

GMT+8, 2024-3-29 17:33 , Processed in 0.061146 second(s), 15 queries , Gzip On, MemCache On.

Copyright © 2001-2023, AdvertCN

Proudly Operating in Hong Kong.

快速回复 返回顶部 返回列表