Skip to content

Instantly share code, notes, and snippets.

@liamg
Created January 31, 2017 11:21
Show Gist options
  • Save liamg/cb55c042fc18d989abd2946837f0a7e5 to your computer and use it in GitHub Desktop.
Save liamg/cb55c042fc18d989abd2946837f0a7e5 to your computer and use it in GitHub Desktop.
/**
* Basic spoofer for GADX that always passes back.
*/
window.addEventListener("load", function load(event){
window.removeEventListener("load", load, false); //remove listener, no longer needed
if(typeof google_alternate_ad_url !== 'undefined')
{
var iframe = document.createElement('iframe');
try{ iframe.style = 'width:0px;height:0px;border:none;'; }catch(e){}
document.body.appendChild(iframe);
iframe.src = google_alternate_ad_url;
top.google_cpm = typeof google_cpm !== 'undefined' ? google_cpm : null;
}
},false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment