Created
August 7, 2014 23:22
-
-
Save Minasokoni/c8748dd7c23798f6ce73 to your computer and use it in GitHub Desktop.
DFP bg takeover
This file contains 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
var bgColor = '#163596', | |
bgImg = 'http://i.imgur.com/7MDjqNU.jpg'; | |
var space = window.parent.document.body, | |
ad = space.querySelectorAll('#AD'), | |
adClickURL = '%%CLICK_URL_UNESC%%'; | |
space.style.backgroundColor = bgColor; | |
space.style.backgroundImage = 'url(%%VIEW_URL_UNESC%%' + bgImg + '?v=%%CACHEBUSTER%%)'; | |
space.style.backgroundPosition = 'top center'; | |
space.style.backgroundRepeat = 'no-repeat'; | |
space.className = 'dfp-ad'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment