Update footer-scripts.html

This commit is contained in:
Dean Attali 2016-06-04 01:49:32 -07:00
parent 262e11b4f8
commit 4796b6129c

View File

@ -1,10 +1,3 @@
<!-- everything has to be repeated twice because on 2016-02-01 GitHub pages migrated to jekyll 3; see bug https://github.com/jekyll/jekyll/issues/4439 -->
{% if page.common-ext-js %}
{% for js in page.common-ext-js %}
<script src="{{ js }}"></script>
{% endfor %}
{% endif %}
{% if layout.common-ext-js %} {% if layout.common-ext-js %}
{% for js in layout.common-ext-js %} {% for js in layout.common-ext-js %}
<script src="{{ js }}"></script> <script src="{{ js }}"></script>
@ -16,22 +9,12 @@
<script src="{{ js }}"></script> <script src="{{ js }}"></script>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if layout.ext-js %}
{% for js in layout.ext-js %}
<script src="{{ js }}"></script>
{% endfor %}
{% endif %}
{% if page.js %} {% if page.js %}
{% for js in page.js %} {% for js in page.js %}
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script> <script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if layout.js %}
{% for js in layout.js %}
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
{% endfor %}
{% endif %}
{% if layout.common-js %} {% if layout.common-js %}
{% for js in layout.common-js %} {% for js in layout.common-js %}
@ -47,19 +30,5 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if page.common-js %}
{% for js in page.common-js %}
<!-- doing something a bit funky here because I want to be careful not to include JQuery twice! -->
{% if js contains 'jquery' %}
<script>
if (typeof jQuery == 'undefined') {
document.write('<script src="{{ js | prepend: site.baseurl | replace: "//", "/" }}"></scr' + 'ipt>');
}
</script>
{% else %}
<script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
{% endif %}
{% endfor %}
{% endif %}
{% include google_analytics.html %} {% include google_analytics.html %}