Guest User

Untitled

a guest
May 22nd, 2016
1,459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.64 KB | None | 0 0
  1. _satellite.pushAsyncScript(function(event, target, $variables){
  2. // Include the questionnaire for first time visits: https://github.com/CondeNast/atp-oab-questionnaire
  3. function injectQuestionnaire() {
  4. "use strict";!function(e){function t(){var t=m[e.location.hostname]||m.base;return t}function o(){var t=e.createElement("div"),o=e.querySelector(d.target);t.id="atpContainer",o.parentNode.insertBefore(t,o.nextSibling),t.innerHTML=h,s()}function a(e){var t=e.target.parentElement.parentElement.children[0];return t.checked=!1,e.target.value.length&&(t.checked=!0),t.checked}function n(){e.querySelector("#atpContainer .modal").className="modal",e.querySelector("#atpContainer .jotform-form").style.display="none"}function i(){var t=e.querySelector("#atpContainer");t&&(window.jQuery?window.jQuery(t).slideUp(500):t.parentNode.removeChild(t))}function r(){for(var t=e.querySelectorAll("input[type=checkbox]"),o=t.length,a=0;o>a;a++)if(t[a].checked)return!0;return!1}function l(){return r()?n():c()}function c(){var t=e.querySelector(".error");t.className="form-line error"}function s(){var t,o=e.querySelector("#atpContainer .close"),n=e.querySelector("#atpContainer .form-submit-button"),r=e.querySelectorAll("#atpContainer .form-checkbox-other-input");e.getElementById("simple_spc").value=p.formId+"-"+p.formId,e.querySelector("#atpContainer .site").value=e.location.hostname;var c=r.length;for(t=0;c>t;t++)r[t].addEventListener("blur",a),r[t].addEventListener("keyup",a);o.addEventListener("click",i),n.addEventListener("click",l)}var p={header:"Ads support our content! We see that your Ad Blocker is on...",subHead:"Help us make your experience better!",formId:"52524722738155",q1:{title:"Why do you use an ad blocker?",id1:"q12_reason1[]",text1:"They're distracting.",id2:"q13_reason2[]",text2:"They slow down the site.",id3:"q14_reason3[]",text3:"I'm concerned about my privacy.",id4:"q20_reason4[]",text4:"They're not relevant to me.",id5:"q15_reasonOther",text5:"Anything Else?"},q2:{title:"Ads help us bring you content. But in place of ads, would you prefer to...",id1:"q16_payment1[]",text1:"Buy a monthly subscription?",id2:"q17_payment2[]",text2:"Make a micro-payment?",id3:"q18_payment3[]",text3:"Do a survey?",id4:"q21_payment4[]",text4:"Watch or interact with a lengthier one-time ad?",id5:"q19_paymentOther",text5:"Make a suggestion."}},m={"arstechnica.com":{headingFont:'"BebasNeue",sans-serif',textFont:"Arial,sans-serif",backgroundColor:"#e0ded7",fontColor:"#263034",brandColor:"#FF5B00",buttonTextcolor:"white",target:"#masthead, #mobile-masthead"},base:{headingFont:"Verdana, Geneva, sans-serif",textFont:"Arial, 'Helvetica Neue', Helvetica, sans-serif",backgroundColor:"gray",fontColor:"black",brandColor:"blue",buttonTextcolor:"white",target:"body > *:first-child"}},d=t(),b=" #atpContainer {padding: 10px; position: relative;font-size: 14px;background-color: "+d.backgroundColor+";font-family: "+d.textFont+";min-height: 263px;z-index: 10;}#atpContainer * {box-sizing: border-box;}#atpContainer form{ margin: 0; }#atpContainer .form-all {max-width: 700px;margin: 0 auto auto; text-align: center;min-width: 300px;}#atpContainer .form-checkbox {margin: 0; padding: 0;vertical-align: middle;}#atpContainer .form-checkbox-item {float: left; margin-top: 5px; }#atpContainer .form-single-column {display: inline-block; width: 50%;float: left; }#atpContainer .form-checkbox-item label {line-height: 1.714em;margin-left: 0;text-align: left;text-indent: 38px; float: left; color: "+d.fontColor+";font-weight: normal; }#atpContainer input[type=text] {line-height: 1.714em;text-indent: 10px; color: "+d.fontColor+";font-weight: normal; width: 282px }#atpContainer .form-header {margin: 0 30px 0 0; font-family: "+d.headingFont+";}#atpContainer .form-subHeader {font-style: italic;margin: 0; }#atpContainer .header-text {width: 100%; text-align: left;}#atpContainer .form-line {position: relative;display: inline-block; clear: both; margin: 0 20px 0 0;padding: 0;zoom: 1; width: 100%; }#atpContainer .form-checkbox-item {padding-bottom: 0.714em !important;}#atpContainer .form-checkbox-item:last-child {padding-bottom: 0; }.form-checkbox-item {box-sizing: border-box;width: 100%; max-width: 600px;}#atpContainer .form-single-column .form-checkbox-item {width: 100%; }#atpContainer .button {font-size: 1em;overflow: visible; width: auto; margin: 0; font-weight: normal; color: "+d.buttonTextcolor+";border: 0 solid; background: "+d.brandColor+";box-shadow: none;text-shadow: none; }#atpContainer .form-submit-button {width: 100px;padding: 9px 15px; }#atpContainer .close {padding: 2px 6px 6px;position: absolute;top: 10px; right: 10px; z-index: 10; }#atpContainer .form-header {font-size: 1.714em;line-height: 1.618em;}#atpContainer .form-subHeader {font-size: 1.071em;line-height: 1.5em;}#atpContainer .form-line::after {clear: both; }#atpContainer .form-header {color: "+d.fontColor+";}#atpContainer .form-subHeader {margin-bottom: 20px;}#atpContainer label {cursor: pointer; }#atpContainer .question {margin: 0;font-weight: bold;text-align: left;min-height: 2.5em;}#atpContainer .form-subHeader {color: "+d.fontColor+";}#atpContainer .form-checkbox-item {position: relative;margin-bottom: 0;}#atpContainer .form-checkbox-item label::before {position: absolute;left: 4px; content: '';cursor: pointer; border: 1px solid "+d.fontColor+";width: 24px; height: 24px;background-color: "+d.buttonTextcolor+";}#atpContainer .form-checkbox-item label::after {z-index: 10; top: 8px;left: 12px;width: 10px; height: 10px;content: '';opacity: 0;background-color: "+d.brandColor+";cursor: pointer; position: absolute;}#atpContainer .form-checkbox-item input:checked + label::after {opacity: 1;}#atpContainer .form-checkbox { opacity: 0;position: absolute;top: -9999px;left: -9999pxl;}#atpContainer .error p {color: red;line-height: 1;margin: 0 0 4px 0;}#atpContainer .form-textbox {background-color: "+d.buttonTextcolor+";width: 250px;padding: 4px;height: 32px;}#atpContainer .modal {transition: all .75s;width: 50%;height: 80px;overflow: auto;margin: auto;position: absolute;top: 0;left: 0;bottom: 0;right: 0;}#atpContainer .container {display: table-cell; text-align: center;margin-top: 100px;}#atpContainer .content {text-align: center; }#atpContainer .hide {display: none; }@media only screen and (max-width: 667px) {#atpContainer .form-single-column {width: 100%; float: none; }} ",h="<style>"+b+'</style><button class="button close">&times;</button><iframe class="hide" frameborder="0" id="thankyou" name="thankyou"></iframe><form accept-charset="utf-8" action="http://submit.jotformpro.com/submit/'+p.formId+'/" class="jotform-form" id="'+p.formId+' " method="post" name="form_'+p.formId+' " target="thankyou" novalidate="true"><div class="form-all"><div class="header-text"><h2 class="form-header">'+p.header+'</h2><p class="form-subHeader">'+p.subHead+'</p></div><div class="form-single-column"><p class="question">'+p.q1.title+'</p><span class="form-checkbox-item" ><input class="form-checkbox" id="q1a"name="'+p.q1.id1+'" type="checkbox" value="'+p.q1.text1+'"><label for="q1a">'+p.q1.text1+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q1b" name="'+p.q1.id2+'" type="checkbox" value="'+p.q1.text2+'"><label for="q1b">'+p.q1.text2+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q1c" name="'+p.q1.id3+'" type="checkbox" value="'+p.q1.text3+'"><label for="q1c">'+p.q1.text3+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q1d" name="'+p.q1.id4+'" type="checkbox" value="'+p.q1.text4+'"><label for="q1d">'+p.q1.text4+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q1e" type="checkbox" value="other"><label for="q1e"><textarea class="form-checkbox-other-input form-textbox" name="'+p.q1.id5+'" placeholder="'+p.q1.text5+'"></textarea></label></span></div><div class="form-single-column"><p class="question">'+p.q2.title+'</p><span class="form-checkbox-item"><input class="form-checkbox" id="q2a" name="'+p.q2.id1+'" type="checkbox" value="'+p.q2.text1+'"><label for="q2a">'+p.q2.text1+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q2b" name="'+p.q2.id2+'" type="checkbox" value="'+p.q2.text2+'"><label for="q2b">'+p.q2.text2+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q2c" name="'+p.q2.id3+'" type="checkbox" value="'+p.q2.text3+'"><label for="q2c">'+p.q2.text3+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q2d" name="'+p.q2.id4+'" type="checkbox" value="'+p.q2.text4+'"><label for="q2d">'+p.q2.text4+'</label></span><span class="form-checkbox-item" ><input class="form-checkbox" id="q2e" type="checkbox" value="other"><label for="q2e"><textarea class="form-checkbox-other-input form-textbox" name="'+p.q2.id5+'" placeholder="'+p.q2.text5+'"></textarea></label></span></div><div class="form-line hide"><input type="hidden" name="formID" value="'+p.formId+'"><input type="hidden" class="site" form-textbox" id="input_8" name="q8_site" size="20" value=""><input type="text" name="website" type="text" value=""><input type="hidden" id="simple_spc" name="simple_spc" value="'+p.formId+'" /></div><div class="form-line error hide"><p>You must select at least one item.</p></div><div class="form-line"><button class="button form-submit-button" id="submit" type="submit">Submit</button></div> </div> </form><div class="modal hide"><div class="content"><h1>Thank you!</h1><p>Your submissions has been received.</p></div></div></div>';o()}(document);
  5. }
  6.  
  7. /*!
  8. The MIT License (MIT)
  9. Copyright (c) 2015 FuckAdBlock
  10. Permission is hereby granted, free of charge, to any person obtaining a copy
  11. of this software and associated documentation files (the "Software"), to deal
  12. in the Software without restriction, including without limitation the rights
  13. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  14. copies of the Software, and to permit persons to whom the Software is
  15. furnished to do so, subject to the following conditions:
  16. The above copyright notice and this permission notice shall be included in all
  17. copies or substantial portions of the Software.
  18. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. SOFTWARE.
  25. */
  26. /* globals jQuery */
  27. (function(window) {
  28. if (window.sniffAdBlock !== undefined) {
  29. return;
  30. }
  31. function SniffAdBlock(options) {
  32. var self = this;
  33. if (options !== undefined) {
  34. this.setOption(options);
  35. }
  36. function eventCallback() {
  37. setTimeout(function() {
  38. if (self._options.checkOnLoad === true) {
  39. if (self._var.bait === null) {
  40. self._creatBait();
  41. }
  42. setTimeout(function() {
  43. self.check();
  44. }, 1);
  45. }
  46. }, 1);
  47. };
  48. if (window.addEventListener) {
  49. window.addEventListener('load', eventCallback, false);
  50. } else {
  51. window.attachEvent('onload', eventCallback);
  52. }
  53. }
  54.  
  55. SniffAdBlock.prototype._options = {
  56. checkOnLoad: true,
  57. resetOnEnd: true,
  58. loopCheckTime: 50,
  59. loopMaxNumber: 5,
  60. baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links',
  61. baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;'
  62. };
  63.  
  64. SniffAdBlock.prototype._var = {
  65. version: '3.0.1',
  66. bait: null,
  67. checking: false,
  68. loop: null,
  69. loopNumber: 0,
  70. event: {
  71. detected: [],
  72. notDetected: []
  73. }
  74. };
  75.  
  76. SniffAdBlock.prototype._bait = null;
  77.  
  78. SniffAdBlock.prototype.setOption = function(options, value) {
  79. if (value !== undefined) {
  80. var key = options;
  81. options = {};
  82. options[key] = value;
  83. }
  84. for (var option in options) {
  85. if (options.hasOwnProperty(option)) {
  86. this._options[option] = options[option];
  87. }
  88. }
  89. return this;
  90. };
  91.  
  92. SniffAdBlock.prototype._creatBait = function() {
  93. var bait = document.createElement('div');
  94. bait.setAttribute('class', this._options.baitClass);
  95. bait.setAttribute('style', this._options.baitStyle);
  96. this._var.bait = window.document.body.appendChild(bait);
  97. this._var.bait.offsetParent;
  98. this._var.bait.offsetHeight;
  99. this._var.bait.offsetLeft;
  100. this._var.bait.offsetTop;
  101. this._var.bait.offsetWidth;
  102. this._var.bait.clientHeight;
  103. this._var.bait.clientWidth;
  104. };
  105. SniffAdBlock.prototype._destroyBait = function() {
  106. window.document.body.removeChild(this._var.bait);
  107. this._var.bait = null;
  108. };
  109. SniffAdBlock.prototype.check = function(loop) {
  110. if (loop === undefined) {
  111. loop = true;
  112. }
  113. if (this._var.checking === true) {
  114. return false;
  115. }
  116. this._var.checking = true;
  117. if (this._var.bait === null) {
  118. this._creatBait();
  119. }
  120. var self = this;
  121. this._var.loopNumber = 0;
  122. if (loop === true) {
  123. this._var.loop = setInterval(function() {
  124. self._checkBait(loop);
  125. }, this._options.loopCheckTime);
  126. }
  127. this._checkBait(loop);
  128. return true;
  129. };
  130. SniffAdBlock.prototype._checkBait = function _checkBait(loop) {
  131. var detected = false;
  132. if (this._var.bait === null) {
  133. this._creatBait();
  134. }
  135. if (window.document.body.getAttribute('abp') !== null || this._var.bait
  136. .offsetParent === null || this._var.bait.offsetHeight === 0 || this._var
  137. .bait.offsetLeft === 0 || this._var.bait.offsetTop === 0 || this._var.bait
  138. .offsetWidth === 0 || this._var.bait.clientHeight === 0 || this._var.bait
  139. .clientWidth === 0) {
  140. detected = true;
  141. }
  142. if (window.getComputedStyle !== undefined) {
  143. var baitTemp = window.getComputedStyle(this._var.bait, null);
  144. if (baitTemp.getPropertyValue('display') === 'none' || baitTemp.getPropertyValue('visibility') === 'hidden') {
  145. detected = true;
  146. }
  147. }
  148. if (loop === true) {
  149. this._var.loopNumber++;
  150. if (this._var.loopNumber >= this._options.loopMaxNumber) {
  151. clearInterval(this._var.loop);
  152. this._var.loop = null;
  153. this._var.loopNumber = 0;
  154. }
  155. }
  156. if (detected === true) {
  157. if (loop === true) {
  158. this._var.checking = false;
  159. }
  160. this._destroyBait();
  161. this.emitEvent(true);
  162. } else if (this._var.loop === null || loop === false) {
  163. if (loop === true) {
  164. this._var.checking = false;
  165. }
  166. this._destroyBait();
  167. this.emitEvent(false);
  168. }
  169. };
  170. SniffAdBlock.prototype.emitEvent = function emitEvent(detected) {
  171. var fns = this._var.event[detected === true ? 'detected' : 'notDetected'];
  172. for (var i in fns) {
  173. if (fns.hasOwnProperty(i)) {
  174. fns[i]();
  175. }
  176. }
  177. if (this._options.resetOnEnd === true) {
  178. this.clearEvent();
  179. }
  180. return this;
  181. };
  182. SniffAdBlock.prototype.clearEvent = function clearEvent() {
  183. this._var.event.detected = [];
  184. this._var.event.notDetected = [];
  185. };
  186. SniffAdBlock.prototype.on = function on(detected, fn) {
  187. this._var.event[detected === true ? 'detected' : 'notDetected'].push(
  188. fn);
  189. return this;
  190. };
  191. SniffAdBlock.prototype.onDetected = function onDetected(fn) {
  192. return this.on(true, fn);
  193. };
  194. SniffAdBlock.prototype.onNotDetected = function onDetected(fn) {
  195. return this.on(false, fn);
  196. };
  197. window.sniffAdBlock = new SniffAdBlock();
  198. // Cookie setter and getter functions
  199. // We only want to count daily unique ad blocks
  200. // Taken from www.w3schools.com/js/js_cookies.asp
  201. function setCookie(cname, cvalue, exdays) {
  202. var d = new Date();
  203. d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
  204. var expires = 'expires=' + d.toUTCString();
  205. document.cookie = cname + '=' + cvalue + '; ' + expires + ';' + 'path=/';
  206. }
  207.  
  208. /**
  209. * ## getCookie
  210. *
  211. *@param {String} cname The cookie to retrieve.
  212. *@returns {String} The value of the cookie or empty string.
  213. */
  214. function getCookie(cname) {
  215. var match = document.cookie.match('(^|;)\\s*' + cname + '\\s*=\\s*([^;]+)');
  216. return match ? match.pop() : '';
  217. }
  218.  
  219. /**
  220. * ## browserCheck
  221. *
  222. *@returns {String} The simplified user agent.
  223. */
  224. function browserCheck() {
  225. var N = navigator.appName;
  226. var ua = navigator.userAgent;
  227. var tem = ua.match(/version\/([\.\d]+)/i);
  228. var M = ua.match(/(opera|chrome|safari|firefox|msie|trident)\/?\s*(\.?\d+(\.\d+)*)/i);
  229. if (M && tem !== null) {
  230. M[2] = tem[1];
  231. }
  232. M = M ? [M[1], M[2]] : [N, navigator.appVersion, '-?'];
  233. return M.toString();
  234. }
  235.  
  236. /**
  237. * ## buildParams
  238. * build the parameters of the tracking pixel URL
  239. *
  240. *@param {String} blockString The string signifying if this pages blocked status and if it was a first view.
  241. *@returns {String} The simplified user agent.
  242. */
  243. function buildParams(blockString) {
  244. var params = {
  245. 'e0_id': document.location.host + '/' + blockString,
  246. 'e0_ec': 'adblock',
  247. 'e0_env': 'dart',
  248. 'e0_sc': getSiteCode(),
  249. 'e0_tit': browserCheck(),
  250. 'e0_url': document.location.href
  251. };
  252. return jQuery.param(params);
  253. }
  254.  
  255. /**
  256. * ## getSiteCode
  257. * Get the correct 3 character site code.
  258. *
  259. *@returns {String} The 3 character site code for this site, or FIX so we know to fix it..
  260. */
  261. function getSiteCode() {
  262. var arr = [
  263. ['allure.com', 'alr'],
  264. ['architecturaldigest.com', 'arc'],
  265. ['arstechnica.com', 'ars'],
  266. ['bonappetit.com', 'bon'],
  267. ['brides.com', 'brd'],
  268. ['cntraveler.com', 'cnt'],
  269. ['details.com', 'dtl'],
  270. ['epicurious.com', 'epi'],
  271. ['glamour.com', 'gla'],
  272. ['golfdigest.com', 'glf'],
  273. ['gq.com', 'gq'],
  274. ['newyorker.com', 'tny'],
  275. ['self.com', 'slf'],
  276. ['style.com', 'stl'],
  277. ['teenvogue.com', 'tvg'],
  278. ['thescene.com', 'sn'],
  279. ['vanityfair.com', 'vfr'],
  280. ['vogue.com', 'vge'],
  281. ['wired.com', 'wrd'],
  282. ['wmagazine.com', 'wmg'],
  283. ['localhost', 'LOC'],
  284. ['.', 'FIX'],
  285. ['', 'FILE']
  286. ].filter(siteFind);
  287. return arr[0][1];
  288. }
  289.  
  290. /**
  291. * ## filterSite
  292. * Used to filter the site array to a single matching site.
  293. *
  294. *@returns {Boolean} Do we have a match?
  295. */
  296. function siteFind(i) {
  297. var str = i[0];
  298. return document.location.hostname.indexOf(str) !== -1;
  299. }
  300.  
  301. /**
  302. * ## track
  303. * build the parameters of the tracking pixel URL
  304. *
  305. *@param {String} blockString The string signifying if this pages blocked status and if it was a first view.
  306. *@returns {XHRF} A request for a tracking pixel.
  307. */
  308. function track(blockString) {
  309. jQuery.ajax({
  310. type: 'GET',
  311. url: '//event.condenastdigital.com/images/event.gif?' + buildParams(blockString),
  312. cache: false
  313. });
  314. }
  315.  
  316. /**
  317. * ## trackETF
  318. * Setup the blocked status string and send a tracking request.
  319. *
  320. *@param {Boolean} blocked Is their an adBlocker?
  321. *@param {Boolean} newVisit Is this the first visit?
  322. *@returns {XHRF} A request for a tracking pixel.
  323. */
  324. function trackETF(blocked, newVisit) {
  325. var _blocked = 'blocked';
  326. var not = blocked ? '' : 'not_';
  327. var pageview = newVisit ? '' : '_pageview';
  328. var ext = /iPhone|iPad/i.test(navigator.userAgent) ? '/iOS' : '';
  329. _blocked = not + _blocked + pageview + ext;
  330. track(_blocked);
  331. }
  332.  
  333. var newVisit;
  334. // Set a BlockerSniffer cookie to ensure that we only count 1 detection event per user per day
  335. var host = document.location.host.split('.');
  336. var blockerCookie = 'BlockerSniffer_' + host[host.length - 2];
  337. if (getCookie(blockerCookie).length) {
  338. newVisit = false;
  339. } else {
  340. setCookie(blockerCookie, 1, 1);
  341. newVisit = true;
  342. }
  343.  
  344. // Apply SniffAdBlocker (must include SniffAdBlocker.js (https://github.com/veeracs/SniffAdBlock)
  345. // Adapted from http://wiki.conde-dev.com/pages/viewpage.action?pageId=20188075
  346. if (!sniffAdBlock) { // if the sniffer is blocked by AdBlock
  347. setCookie('AdHt', 1, 365);
  348. setCookie('__adblocker', 'true', 30);
  349. if (typeof _satellite !== 'undefined') {
  350. _satellite.track('adBlock');
  351. }
  352. if (newVisit) {
  353. trackETF(true, true);
  354. trackETF(true, false);
  355. //injectQuestionnaire();
  356. } else {
  357. trackETF(true, false);
  358. }
  359. } else {
  360. sniffAdBlock.onDetected(function() {
  361. setCookie('AdHt', 1, 365);
  362. setCookie('__adblocker', 'true', 30);
  363.  
  364. document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  365. if (typeof _satellite !== 'undefined') {
  366. _satellite.track('adBlock');
  367. }
  368. if (newVisit) {
  369. trackETF(true, true);
  370. trackETF(true, false);
  371. //injectQuestionnaire();
  372. } else {
  373. trackETF(true, false);
  374. }
  375. });
  376. sniffAdBlock.onNotDetected(function() {
  377. if (getCookie('AdCv') === '' && getCookie('AdHt') === '1') {
  378. window.optimizely = window.optimizely || [];
  379. window.optimizely.push(['trackEvent', 'blockerConversion']);
  380. setCookie('AdCv', 1, 365);
  381. }
  382. setCookie('__adblocker', 'false', 30);
  383. if (newVisit) {
  384. trackETF(false, true);
  385. trackETF(false, false);
  386. } else {
  387. trackETF(false, false);
  388. }
  389. });
  390. }
  391. // Optionally, invoke a manual check if the onDetected callback never fires
  392. setTimeout(function timer3() {
  393. sniffAdBlock.check();
  394. }, 10);
  395. })(window);
  396.  
  397.  
  398. });
Advertisement
Add Comment
Please, Sign In to add comment