diff options
| author | Ross Allen <[email protected]> | 2013-11-05 07:39:50 -1000 |
|---|---|---|
| committer | Ross Allen <[email protected]> | 2013-11-05 07:39:50 -1000 |
| commit | 18318b81b080de83567488031f13d9394ae21c16 (patch) | |
| tree | 5dcb55d3bbf66799590707bd51655bcfd6927636 /_includes | |
| parent | 68fc2f2515b147ed0e55831f66e30e1e769e1079 (diff) | |
| download | bootstrap-18318b81b080de83567488031f13d9394ae21c16.tar.xz bootstrap-18318b81b080de83567488031f13d9394ae21c16.zip | |
Add async attribute to Twitter widget script
Diffstat (limited to '_includes')
| -rw-r--r-- | _includes/footer.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/_includes/footer.html b/_includes/footer.html index 14f6db9a1..56518ac49 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -20,11 +20,13 @@ {% comment %} Inject Twitter widgets asynchronously. Snippet snipped from Twitter's JS interface site: https://dev.twitter.com/docs/tfw-javascript + + * "js.async=1;" added to add async attribute to the generated script tag. {% endcomment %} <script> window.twttr = (function (d,s,id) { var t, js, fjs = d.getElementsByTagName(s)[0]; - if (d.getElementById(id)) return; js=d.createElement(s); js.id=id; + if (d.getElementById(id)) return; js=d.createElement(s); js.id=id; js.async=1; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } }); }(document, "script", "twitter-wjs")); |
