18 lines
527 B
JavaScript
18 lines
527 B
JavaScript
(function() {
|
|
var loadTwitterFeed = function() {
|
|
if (!document.getElementById("twitter-wjs")) {
|
|
var fjs = document.getElementsByTagName("script")[0];
|
|
var js = document.createElement("script");
|
|
js.id = "twitter-wjs";
|
|
js.src = "//platform.twitter.com/widgets.js";
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
}
|
|
};
|
|
|
|
// Attach onload handler
|
|
if (window.addEventListener)
|
|
window.addEventListener("load", loadTwitterFeed, false);
|
|
else if (window.attachEvent)
|
|
window.attachEvent("onload", loadTwitterFeed);
|
|
})();
|