Created
May 31, 2017 01:53
-
-
Save ryanckulp/e2f5664925573d9f899b8c561c76eb04 to your computer and use it in GitHub Desktop.
fomo_selz_snippet
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
var loadScript = function(location, callback){ | |
var fileRef = document.createElement('script'); | |
fileRef.setAttribute('type','text/javascript'); | |
if (callback) { | |
if (fileRef.readyState) { // IE | |
fileRef.onreadystatechange = function() { | |
if (fileRef.readyState == 'loaded' || fileRef.readyState == 'complete') { | |
fileRef.onreadystatechange = null; | |
callback(); | |
} | |
}; | |
} else { // Non-IE | |
fileRef.onload = function(){ | |
callback(); | |
}; | |
} | |
} | |
fileRef.setAttribute('src', location); | |
document.head.appendChild(fileRef); | |
}; | |
// make sure to insert YOUR Fomo snippet "src" url below! | |
loadScript("https://www.usefomo.com/api/v1/XXXXXXX/load.js"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment