Last active
August 29, 2015 14:20
-
-
Save stuwilli/6e2c1e77835e30cd55ea to your computer and use it in GitHub Desktop.
Kickstart FW LinkTag From Head
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
(function() { | |
function kickStartLinkTag() { | |
if (typeof brightcove !== 'undefined') { | |
if (Object.keys(brightcove.experiences).length === 0) { | |
if (typeof AdOps !== 'undefined' && typeof AdOps.fw !== 'undefined') { | |
AdOps.fw.initLinkTag(); | |
} | |
} | |
} | |
} | |
if (document.addEventListener) { | |
document.addEventListener('DOMContentLoaded', kickStartLinkTag); | |
} else { | |
document.attachEvent('onreadystatechange', function() { | |
if (document.readyState === 'interactive') { | |
kickStartLinkTag(); | |
} | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment