1var queryValues = function(settings){ 2 3 // check permission to track 4 5 6 // var cookieRef = getCookie('referralAccept'); 7 8 // if (cookieRef == 'N' || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 9 // return; 10 // } 11 // else if (cookieRef === null) { 12 // refPopUp(); 13 // return; 14 // } 15 16 var reset = settings && settings.reset ? settings.reset : false; 17 var self = window.location.toString(); 18 var querystring = self.split("?"); 19 if (querystring.length > 1) { 20 var pairs = querystring[1].split("&"); 21 for (i in pairs) { 22 var keyval = pairs[i].split("="); 23 // console.log(keyval); 24 if (reset || sessionStorage.getItem(keyval[0]) === null) { 25 sessionStorage.setItem(keyval[0], decodeURIComponent(keyval[1])); 26 } 27 // console.log(sessionStorage); 28 } 29 } 30 31 32 33 // console.log(sessionStorage['utm_source']); 34 // console.log(sessionStorage); 35 // console.log(sessionStorage.length); 36 37 38 39 40 // filter and write cookie 41 var dataObj = new Object(); 42 Object.keys(sessionStorage).forEach(key => { 43 var utmValues = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']; 44 if (utmValues.indexOf(key)>=0) { 45 // console.log(key); 46 dataObj[key] = sessionStorage[key]; 47 } 48 }); 49 50 // console.log(dataObj); 51 // console.log(dataObj.length); 52 var dataJSON = JSON.stringify(dataObj); 53 // console.log(dataJSON); 54 if (dataJSON !== '{}') 55 { 56 setCookie('referralSource', dataJSON, 365); 57 } 58} 59 60function getCookie(name) { 61 var dc = document.cookie; 62 var prefix = name + "="; 63 var begin = dc.indexOf("; " + prefix); 64 if (begin == -1) { 65 begin = dc.indexOf(prefix); 66 if (begin != 0) return null; 67 } 68 else 69 { 70 begin += 2; 71 var end = document.cookie.indexOf(";", begin); 72 if (end == -1) { 73 end = dc.length; 74 } 75 } 76 return decodeURI(dc.substring(begin + prefix.length, end)); 77} 78 79 80 81 82function setCookie(cname, cvalue, exdays) { 83 var d = new Date(); 84 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 85 var expires = "expires="+ d.toUTCString(); 86 document.cookie = cname + "=" + cvalue + ";" + expires + ";domain=pixologic.com;SameSite=Lax;path=/"; 87} 88 89 90 91 92function refPopUp() { 93 var refPop = '<div id="referralCheck" style="position: fixed; bottom: 0px; left: 0px; padding: 30px; z-index: 40000; font-weight: bold; width: 100%; box-shadow: rgb(136, 136, 136) 2px 2px 9px; color:dimgray; background-color: #CCC; font-size: 16px; line-height: 1.5em; display: -ms-flexbox; display: flex; -ms-flex-wrap: nowrap; flex-wrap: nowrap; z-index: 40000;" class="animated fadeIn"><span id="cookieconsent" style="flex:1;">This website uses cookies to ensure you get the best experience on our website. <a role="button" href="https://pixologic.com/terms-and-conditions/#privacypolicy" target="_blank">Privacy Policy</a></span><div id="referralAccept" style="display:flex; background-color:#f60; cursor:pointer;"><a role="button" onclick="acceptReferral();" style="color:white; padding:10px 20px;">Got it!</a></div></div>'; 94 // document.body.innerHTML = document.body.innerHTML + refPop; 95 var mod = document.body; 96 mod.insertAdjacentHTML('beforeend', refPop); 97}; 98 99 100 101// Write cookie if referral is accepted 102setTimeout(function(){queryValues();}, 1000); 103 104 105// Accepted referral and cookie write 106function acceptReferral() { 107 setCookie('referralAccept', 'Y', 365); 108 document.getElementById('referralCheck').className = 'animated fadeOut'; 109 setTimeout(function(){queryValues();}, 3000); 110} 111 112// $(document).ready(function() { 113// $('#referralAccept').click(function() { 114// alert('test'); 115// document.getElementById('#referral').className = 'animated fadeOut'; 116// setTimeout(function(){queryValues();}, 3000); 117// }); 118// }); 119 120
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.