Last active
March 1, 2018 11:21
-
-
Save AlexKotel/3a473a9410960771a382 to your computer and use it in GitHub Desktop.
Load to page js by ULR
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
window.loadScript = function (url) { | |
var script = document.createElement("script"); | |
script.src = url; | |
document.head.appendChild(script); | |
} | |
window.loadStyle = function (url) { | |
var link = document.createElement("link"); | |
link.href = url; | |
document.head.appendChild(link); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment