Last active
October 5, 2015 20:04
-
-
Save nola/539e28b20410201a8c2f to your computer and use it in GitHub Desktop.
DFP html5 clicktag file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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