PageSourceSearch

https://ampforwp.com/wp-content/plugins/affiliatewp-external-refer…wp-external-referral-links.min.js?ver=1.2.2

js ampforwp.com collected 2026-10-02 14:50:25 UTC 3,763 bytes, 1 lines download raw bytes

1!function(factory){var registeredInModuleLoader=!1;if("function"==typeof define&&define.amd&&(define(factory),registeredInModuleLoader=!0),"object"==typeof exports&&(module.exports=factory(),registeredInModuleLoader=!0),!registeredInModuleLoader){var OldCookies=window.Cookies,api=window.Cookies=factory();api.noConflict=function(){return window.Cookies=OldCookies,api}}}(function(){function extend(){for(var i=0,result={};i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes)result[key]=attributes[key]}return result}function init(converter){function api(key,value,attributes){var result;if("undefined"!=typeof document){if(arguments.length>1){if(attributes=extend({path:"/"},api.defaults,attributes),"number"==typeof attributes.expires){var expires=new Date;expires.setMilliseconds(expires.getMilliseconds()+864e5*attributes.expires),attributes.expires=expires}try{result=JSON.stringify(value),/^[\{\[]/.test(result)&&(value=result)}catch(e){}return value=converter.write?converter.write(value,key):encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),key=encodeURIComponent(String(key)),key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),key=key.replace(/[\(\)]/g,escape),document.cookie=[key,"=",value,attributes.expires?"; expires="+attributes.expires.toUTCString():"",attributes.path?"; path="+attributes.path:"",attributes.domain?"; domain="+attributes.domain:"",attributes.secure?"; secure":""].join("")}key||(result={});for(var cookies=document.cookie?document.cookie.split("; "):[],rdecode=/(%[0-9A-Z]{2})+/g,i=0;i<cookies.length;i++){var parts=cookies[i].split("="),cookie=parts.slice(1).join("=");'"'===cookie.charAt(0)&&(cookie=cookie.slice(1,-1));try{var name=parts[0].replace(rdecode,decodeURIComponent);if(cookie=converter.read?converter.read(cookie,name):converter(cookie,name)||cookie.replace(rdecode,decodeURIComponent),this.json)try{cookie=JSON.parse(cookie)}catch(e){}if(key===name){result=cookie;break}key||(result[name]=cookie)}catch(e){}}return result}}return api.set=api,api.get=function(key){return api.call(api,key)},api.getJSON=function(){return api.apply({json:!0},[].slice.call(arguments))},api.defaults={},api.remove=function(key,attributes){api(key,"",extend(attributes,{expires:-1}))},api.withConverter=init,api}return init(function(){})}),jQuery(document).ready(function($){function affwp_erl_has_referral_variable(e){return location.search.indexOf(e+"=")>=0}function affiliatewp_erl_get_query_vars(){for(var hash,vars=[],hashes=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<hashes.length;i++)hash=hashes[i].split("="),vars.push(hash[0]),vars[hash[0]]=hash[1];return vars}function updateQueryStringParameter(uri,ref_var,aff_id){var re=new RegExp("([?|&])"+ref_var+"=.*?(&|#|$)","i");if(uri.match(re))return uri.replace(re,"$1"+ref_var+"="+aff_id+"$2");var hash="",separator=-1!==uri.indexOf("?")?"&":"?";return-1!==uri.indexOf("#")&&(hash=uri.replace(/.*#/,"#"),uri=uri.replace(/#.*/,"")),uri+separator+ref_var+"="+aff_id+hash}var referral_variable=affwp_erl_vars.referral_variable,cookie=Cookies.get(affwp_erl_vars.cookie),cookie_expiration=affwp_erl_vars.cookie_expiration;if(affwp_erl_has_referral_variable(referral_variable))var ref=affiliatewp_erl_get_query_vars()[referral_variable];if(ref&&!cookie){var cookie_value=ref;Cookies.set(affwp_erl_vars.cookie,cookie_value,{expires:parseInt(cookie_expiration),path:"/"})}if(affiliate_id=cookie||ref,affiliate_id){var url=affwp_erl_vars.url,target_urls=$("a[href^='"+url+"']");$(target_urls).each(function(){current_url=$(this).attr("href"),$(this).attr("href",updateQueryStringParameter(current_url,referral_variable,affiliate_id))})}});

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.