Created
December 5, 2019 22:09
-
-
Save zarathustra323/b2e39e279038069ef657abf485d61655 to your computer and use it in GitHub Desktop.
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
<!-- In the welcome ad template, replace this block of code... --> | |
<script> | |
var bgImagepath = window.location.protocol + "//" + window.location.hostname + "/sites/all/themes/penton_core_theme/images/ContentPillar_Welcome_1200.png"; | |
document.querySelector('#overlay-%%CACHEBUSTER%%').style.backgroundImage = 'url('+bgImagepath+')'; | |
var lpath1 = parent.document.getElementById("wl_flogop_div").innerHTML; | |
console.log('logo_path->' + lpath1); | |
document.querySelector('#white_logo-%%CACHEBUSTER%% > img').src = lpath1; | |
</script> | |
<!-- With this block of code... --> | |
<script> | |
var bgElement = parent.document.querySelector('[data-interstitial-prop="bg-url"]'); | |
var bgImageUrl = bgElement ? bgElement.getAttribute('data-interstitial-value') : null; | |
if (bgImageUrl) document.querySelector('#overlay-%%CACHEBUSTER%%').style.backgroundImage = 'url('+bgImageUrl+')'; | |
var logoElement = parent.document.querySelector('[data-interstitial-prop="logo-url"]'); | |
var logoImageUrl = logoElement ? logoElement.getAttribute('data-interstitial-value') : null; | |
if (logoImageUrl) document.querySelector('#white_logo-%%CACHEBUSTER%% > img').src = logoImageUrl; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment