Created
December 24, 2016 01:07
-
-
Save davidgilbertson/6a66e05d6f193281a4c6b54d19acf3fd to your computer and use it in GitHub Desktop.
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 scripts = ['app.a700a9a3e91a84de5dc0.js']; // script for all users | |
var newBrowser = ( | |
'fetch' in window && | |
'Promise' in window && | |
'assign' in Object && | |
'keys' in Object | |
); | |
if (!newBrowser) { | |
scripts.unshift('polyfills.a700a9a3e91a84de5dc0.js'); // script for the less fortunate | |
} | |
scripts.forEach(function(src) { | |
var scriptEl = document.createElement('script'); | |
scriptEl.src = src; | |
scriptEl.async = false; | |
document.head.appendChild(scriptEl); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cool shit 👍