Skip to content

Instantly share code, notes, and snippets.

@nola
Last active October 5, 2015 20:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nola/539e28b20410201a8c2f to your computer and use it in GitHub Desktop.
DFP html5 clicktag file
window.onload = function() {
if (!!Enabler.isInitialized()) {
enablerInitHandler();
} else {
Enabler.addEventListener(studio.events.StudioEvent.INIT, enablerInitHandler);
}
}
function enablerInitHandler() {
document.getElementById('canvas').addEventListener('click', clickThrough, false);
document.getElementById('canvas').style.visibility = "visible";
document.getElementById('canvas').style.cursor = "pointer";
}
function clickThrough() {
window.open(window.clickTag);
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment