Created
June 2, 2011 09:40
-
-
Save jakearchibald/1004177 to your computer and use it in GitHub Desktop.
Twitter widgets
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
(function(document){ | |
var script = 'script', | |
twitterWidgets = document.createElement(script), | |
lastScript = document.getElementsByTagName(script)[0]; | |
twitterWidgets.async = twitterWidgets.src = 'http://platform.twitter.com/widgets.js'; | |
lastScript.parentNode.insertBefore(twitterWidgets, lastScript); | |
})(document); | |
// compressed 177 bytes | |
(function(a){var b="script",c=a.createElement(b),d=a.getElementsByTagName(b)[0];c.async=c.src="http://platform.twitter.com/widgets.js",d.parentNode.insertBefore(c,d)})(document) | |
// insertAfter might work too, saving another byte, but haven't tested |
@miketaylr, do you happen to have more details on when the current version(s) of Opera actually respect .async=true
?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fair points, Kyle.