1window.ag_ec_request_count = 0; 2window.ag_ec_request_active = 1; 3window.ag_ec_request_sended = 0; 4 5function ag_ecommerce_request(){ 6 if(!window.ag_ec_request_active){ 7 return false; 8 } 9 if(window.ag_ec_request_count < 1){ 10 return false; 11 } 12 13 // console.log('AG_Ecommerce: start r: c = ' + window.ag_ec_request_count + ', a = ' + window.ag_ec_request_active); 14 15 window.ag_ec_request_active = 0; 16 window.ag_ec_request_sended++; 17 18 var x = window.location.pathname; 19 if(window.location.search){ 20 x = x + window.location.search; 21 } 22 23 BX.ajax({ 24 url: '/bitrix/tools/arturgolubev.ecommerce/getscripts_v2.php', 25 data: {'loc': x, 'rnum': window.ag_ec_request_sended}, 26 method: 'POST', 27 dataType: 'script', 28 timeout: 30, 29 async: true, 30 processData: true, 31 scriptsRunFirst: true, 32 // emulateOnload: true, 33 start: true, 34 cache: false, 35 onsuccess: function(data){ 36 if(window.ag_ec_request_count > 1){ 37 window.ag_ec_request_count = 1; 38 }else{ 39 window.ag_ec_request_count--; 40 } 41 42 window.ag_ec_request_active = 1; 43 44 setTimeout('ag_ecommerce_request();', 1000); 45 }, 46 onfailure: function(){ 47 if(window.ag_ec_request_count > 1){ 48 window.ag_ec_request_count = 1; 49 }else{ 50 window.ag_ec_request_count--; 51 } 52 53 window.ag_ec_request_active = 1; 54 } 55 }); 56} 57 58 59document.addEventListener('DOMContentLoaded', function(){ 60 BX.addCustomEvent('onAjaxSuccess', function(e, params){ 61 var work = 1; 62 63 if(typeof params === 'object' && params !== null){ 64 if(params.url){ 65 // console.log(params); 66 // console.log(params.data.indexOf("q=")); 67 // console.log(params.data.indexOf("INPUT_ID=")); 68 69 if(params.url == '/bitrix/tools/arturgolubev.ecommerce/getscripts_v2.php') work = 0; 70 if(params.url.indexOf("analytics.bitrix.info") >= 0) work = 0; 71 if(params.url.indexOf("logictim/bonus.ajax") >= 0) work = 0; 72 if(params.url.indexOf("tools/public_session.php") >= 0) work = 0; 73 if(params.url.indexOf("hotlab.remarketing") >= 0) work = 0; 74 if(params.url.indexOf("arturgolubev.cssinliner") >= 0) work = 0; 75 if(params.url.indexOf("arturgolubev.abandoned") >= 0) work = 0; 76 77 if(typeof params.data == 'string'){ 78 if(params.data.indexOf("q=") >= 0 && params.data.indexOf("INPUT_ID=") >= 0) work = 0; // search 79 } 80 } 81 } 82 83 if(work){ 84 // console.log('params', params); 85 // console.log('BX Ajax', params.url); 86 window.ag_ec_request_count++; 87 ag_ecommerce_request(); 88 } 89 }); 90 91 try { 92 $(document).ajaxSuccess(function(event, request, settings){ 93 var work = 1; 94 95 if(!!settings){ 96 if(settings.url.indexOf("dadata.ru") >= 0) work = 0; 97 98 if(settings.url.indexOf("ipol.") >= 0) work = 0; 99 if(settings.url.indexOf("corsik.") >= 0) work = 0; 100 if(settings.url.indexOf("up.boxberrydelivery") >= 0) work = 0; 101 102 if(settings.url.indexOf("concept.phoenix/ajax/hide_adv.php") >= 0) work = 0; 103 if(settings.url.indexOf("concept.phoenix/ajax/basket/get_ajax_basket.php") >= 0) work = 0; 104 105 if(settings.url.indexOf("/ajax/getAjaxBasket.php") >= 0) work = 0; // aspro 106 if(settings.url.indexOf("/ajax/UpdateBakset.php") >= 0) work = 0; // deluxe 107 } 108 109 if(work){ 110 // console.log('settings', settings); 111 // console.log('JQuery Ajax', settings.url); 112 window.ag_ec_request_count++; 113 ag_ecommerce_request(); 114 } 115 }); 116 }catch(err){ 117 // console.log("AG_Ecommerce: JQuery ajax not defined"); 118 } 119}); 120 121BX.ready(function(){ 122 // console.log('AG_Ecommerce: start page request'); 123 124 window.ag_ec_request_count++; 125 ag_ecommerce_request(); 126});
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.