PageSourceSearch

https://tradewiththepros.com/wp-content/cache/autoptimize/autoptim…7a4eefbe0c0ab2a8e7988655b49f.php?ver=2.9.15

js tradewiththepros.com collected 2026-10-05 05:53:42 UTC 4,746 bytes, 56 lines download raw bytes

1var qvars=getUrlVars()
2var handlConsentGranted=typeof handl_utm_cookie_duration==='undefined'||handl_utm_cookie_duration[1]==='1'
3jQuery(function($){if(handlConsentGranted){RunHandL()}});function RunHandL(){handlConsentGranted=true
4setHandLParams()
5RunFieldFiller()
6HandLAppendTrackedLinks()
7HandLBindNinjaFormsFiller()}
8var handlNfFillerBound=false
9function HandLBindNinjaFormsFiller(){if(handlNfFillerBound)return
10handlNfFillerBound=true
11jQuery(document).on('nfFormReady',function(){if(typeof nfForms==='undefined')return
12nfForms.forEach(function(form){form.fields.map(function(item){if(item.default){var matches=String(item.default).match(/^{(\w+):(\w+)/)
13if(matches&&matches.length==3&&matches[1]==='handl'){var c=Cookies.get(matches[2])
14jQuery('#nf-field-'+item.id).val(c===undefined?'':decodeURIComponent(c).replace(/[%]/g,' '))}}})})})}
15function setHandLParams(){var cookieOptions={expires:parseInt(handl_utm_cookie_duration[0])}
16Cookies.set('handl_url',document.location.href,cookieOptions)
17Cookies.set('handl_ref',document.referrer,cookieOptions)
18if(Cookies.get('handl_landing_page')===undefined){Cookies.set('handl_landing_page',document.location.href,cookieOptions)}
19if(Cookies.get('handl_original_ref')===undefined){Cookies.set('handl_original_ref',document.referrer,cookieOptions)}}
20function HandLAppendTrackedLinks(){jQuery('.utm-out').each(function(){if(this.tagName.toLowerCase()!=='a'||!this.href){return;}
21var urlParams=getSearchParams(this.href);var sanitizedParams={};for(var key in urlParams){if(handl_utm.hasOwnProperty(key)){sanitizedParams[key]=encodeURIComponent(urlParams[key]);}}
22var sanitizedHandlUtm={};for(var key in handl_utm){sanitizedHandlUtm[key]=encodeURIComponent(handl_utm[key]);}
23var merged=jQuery.extend({},sanitizedHandlUtm,sanitizedParams);this.href=this.href.split('?')[0];if(!jQuery.isEmptyObject(merged)){this.href+="?"+jQuery.param(merged);}});}
24function HandLOnMarketingConsentChange(changedConsentCategory){for(var key in changedConsentCategory){if(changedConsentCategory.hasOwnProperty(key)){if(key==='marketing'&&changedConsentCategory[key]==='allow'){console.log('Consent: Marketing consent granted, running HandL');RunHandL();}else if(key==='marketing'&&changedConsentCategory[key]==='deny'){console.log('Consent: Marketing consent withdrawn, removing HandL cookies');RemoveHandLCookies();}}}}
25document.addEventListener('wp_listen_for_consent_change',function(e){HandLOnMarketingConsentChange(e.detail);});document.addEventListener('handl_consent_change',function(e){HandLOnMarketingConsentChange(e.detail);});function RemoveHandLCookies(){console.log('Removing HandL cookies');var params=typeof handl_utm_all_params!=='undefined'?Object.values(handl_utm_all_params):[]
26var host=location.hostname.toLowerCase().replace(/^www\./,'')
27params.forEach(function(param){Cookies.remove(param,{path:'/'})
28Cookies.remove(param,{path:'/',domain:'.'+host})
29Cookies.remove(param,{path:'/',domain:host})})
30handlConsentGranted=false}
31function RunFieldFiller(){jQuery.each(['utm_source','utm_medium','utm_term','utm_content','utm_campaign','gclid','handl_landing_page','handl_original_ref','handl_ip','handl_ref','handl_url','email','username'],function(i,v){var cookie_field=GetQVars(v,qvars)
32if(cookie_field!='')
33Cookies.set(v,cookie_field,{expires:30});var curval=Cookies.get(v)
34if(curval!=undefined){curval=decodeURIComponent(curval).replace(/[%]/g,' ')
35if(['utm_source','utm_medium','utm_term','utm_content','utm_campaign','gclid'].indexOf(v)!==-1){handl_utm[v]=curval}
36if(v=='username'){curval=curval.replace(/\+/g,' ')}}else{if(['email','username'].indexOf(v)!==-1){return}
37curval=''}
38{jQuery('input[name=\"'+v+'\"]').val(curval)
39jQuery('input#'+v).val(curval)
40jQuery('input.'+v).val(curval)
41jQuery('input#form-field-'+v).val(curval)
42jQuery('#'+v).find('input').val(curval)
43jQuery('.'+v).find('input').val(curval)
44jQuery("[data-original_id='"+v+"']").val(curval)
45jQuery("[data-name='"+v+"']").val(curval)
46jQuery("[data-name='"+v.replace(/_/g,'')+"']").val(curval)
47jQuery("[placeholder='"+v+"']").val(curval)
48if(v.length>4&&['email','username'].indexOf(v)==-1){jQuery("[name*="+v+"]").val(curval)
49jQuery("[id*="+v+"]").val(curval)
50jQuery("[class*="+v+"]").val(curval)}}});}
51function getSearchParams(url,k){var p={};var a=document.createElement('a');a.href=url;a.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v})
52return k?p[k]:p;}
53function GetQVars(v,qvars){if(qvars[v]!=undefined){return qvars[v]}
54return''}
55function getUrlVars(){var vars={};var parts=window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,key,value){vars[key]=value;});return vars;}
56jQuery(document).on('elementor/popup/show',function(){setTimeout(function(){if(handlConsentGranted){RunFieldFiller()}},1000)});

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.