Created
April 22, 2016 09:42
-
-
Save uguratar/30e1c1985a63bf4f187f6ec530a7ea4b 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
function loadScript(url, callback) | |
{ | |
// Adding the script tag to the head as suggested before | |
var head = document.getElementsByTagName('head')[0]; | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = url; | |
// Then bind the event to the callback function. | |
// There are several events for cross browser compatibility. | |
script.onreadystatechange = callback; | |
script.onload = callback; | |
// Fire the loading | |
head.appendChild(script); | |
} | |
var myLennyfy = function() { | |
lennyfy(); | |
}; | |
loadScript("https://cdn.rawgit.com/uguratar/a82c5674771c0015dd26ec07e5539856/raw/c6c6d09e7f56ca5c275a98c5a5b27eb0da8129a9/lennyfy.js", myLennyfy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment