Demo entry 6636569

csr

   

Submitted by anonymous on Aug 25, 2017 at 14:25
Language: JavaScript. Code size: 712 Bytes.

function urlParam(name){
    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
    if (results==null){
       return null;
    }
    else{
       return decodeURI(results[1]) || 0;
    }
}

if(urlParam('adfeelgood_id')){
    window.sessionStorage.setItem("adfeelgood_id", urlParam('adfeelgood_id'));
}
if(feelgood_numorder && feelgood_amount){
    var adfeelgood_id = window.sessionStorage.getItem("adfeelgood_id");
    if(adfeelgood_id){
        document.body.appendChild(document.createElement('img')).src='http://ad.feelgood.'+feelgood_type+'/'+feelgood_offer+'?adv_sub='+feelgood_numorder+'&amount='+feelgood_amount+'&transaction_id='+adfeelgood_id;
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).