1 2function showMarketingPopup(){ 3 4 if($('.dyn_mp_jqm').length) 5 { 6 var allDelays = []; 7 $('.dyn_mp_jqm').each(function(i, el) { 8 var jqmBlock = $(el), 9 delay = 0; 10 11 if(!jqmBlock.hasClass('initied')) // first load 12 { 13 jqmBlock.addClass('initied'); 14 15 if(jqmBlock.data('param-delay')) 16 delay = jqmBlock.data('param-delay')*1000; 17 18 while(allDelays.indexOf(delay) !== -1) { 19 delay += 1000; 20 } 21 22 allDelays.push(delay); 23 24 if(typeof localStorage !== 'undefined') 25 { 26 var dataLS = localStorage.getItem(jqmBlock.data('ls')), 27 ls = ''; 28 try{ 29 ls = JSON.parse(dataLS); 30 } 31 catch(e){ 32 ls = dataLS 33 } 34 if(!ls || (ls && (ls.TIMESTAMP < Date.now() && ls.TIMESTAMP))) 35 { 36 /*if (timeoutID) { 37 clearTimeout(timeoutID); 38 }*/ 39 timeoutID = setTimeout(function(){ 40 console.log(jqmBlock, delay) 41 jqmBlock.click(); 42 }, delay); 43 } 44 } 45 else 46 { 47 var ls = $.cookie(jqmBlock.data('ls')); 48 if(!ls) 49 { 50 /*if (timeoutID) { 51 clearTimeout(timeoutID); 52 }*/ 53 timeoutID = setTimeout(function(){ 54 jqmBlock.click(); 55 }, delay); 56 } 57 } 58 59 } 60 else // ajax popup 61 { 62 63 } 64 65 }); 66 } 67} 68 69 70 71 72$(document).ready(function(){ 73 74 if (localStorage.getItem('SIMPLE_FORM_14') === null) { 75 showMarketingPopup(); 76 } 77 78 if(typeof window.frameCacheVars !== "undefined"){ 79 BX.addCustomEvent("onFrameDataReceived", function (json){ 80 if (localStorage.getItem('SIMPLE_FORM_14') === null) { 81 showMarketingPopup(); 82 } 83 }); 84 } 85 86 $(document).on('click', '.dyn_mp_jqm_frame .popup-text-info__btn .btn', function() { 87 var closeBtn = $(this).closest('.dyn_mp_jqm_frame').find('.jqmClose'); 88 89 if(closeBtn.length) { 90 closeBtn.trigger('click'); 91 } 92 }); 93})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.