mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Merge pull request #11369 from ssorallen/speedier-js-loading
Speedier jQuery and Twitter widgets.js
This commit is contained in:
commit
a15a6dfa96
@ -1,10 +1,9 @@
|
|||||||
<!-- Bootstrap core JavaScript
|
<!-- Bootstrap core JavaScript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
<script src="{{ page.base_url }}dist/js/bootstrap.js"></script>
|
<script src="{{ page.base_url }}dist/js/bootstrap.js"></script>
|
||||||
|
|
||||||
<script src="http://platform.twitter.com/widgets.js"></script>
|
|
||||||
<script src="{{ page.base_url }}docs-assets/js/holder.js"></script>
|
<script src="{{ page.base_url }}docs-assets/js/holder.js"></script>
|
||||||
|
|
||||||
<script src="{{ page.base_url }}docs-assets/js/application.js"></script>
|
<script src="{{ page.base_url }}docs-assets/js/application.js"></script>
|
||||||
@ -18,6 +17,21 @@
|
|||||||
<script src="{{ page.base_url }}docs-assets/js/customizer.js"></script>
|
<script src="{{ page.base_url }}docs-assets/js/customizer.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% 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; 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"));
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- Analytics
|
<!-- Analytics
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user