Defer JavaScript loading
This avoids waiting for the JS to download before rendering the page.
This commit is contained in:
parent
da121e5eb4
commit
374ec19b77
4 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@
|
||||||
{% block category %}supporter{% endblock %}
|
{% block category %}supporter{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
|
<script type="text/javascript" src="{% static 'js/\supporter-page.js' %}" defer></script>
|
||||||
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'css/tachyons.css' %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static 'css/tachyons.css' %}"/>
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="{% static 'css/conservancy.css' %}" />
|
<link rel="stylesheet" type="text/css" media="screen" href="{% static 'css/conservancy.css' %}" />
|
||||||
<link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="{% static 'css/conservancy-bigscreen.css' %}" />
|
<link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="{% static 'css/conservancy-bigscreen.css' %}" />
|
||||||
<script type="text/javascript" src="{% static 'js/jquery-1.7.2.js' %}"></script>
|
<script type="text/javascript" src="{% static 'js/jquery-1.7.2.js' %}" defer></script>
|
||||||
<script type="text/javascript" src="{% static 'js/conservancy.js' %}"></script>
|
<script type="text/javascript" src="{% static 'js/conservancy.js' %}" defer></script>
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
function my_display (sel, b) {
|
function my_display (sel, b) {
|
||||||
if (b) { sel.slideDown(); }
|
if (b) { sel.slideDown(); }
|
||||||
else { sel.slideUp(); }
|
else { sel.slideUp(); }
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% block category %}sustainer{% endblock %}
|
{% block category %}sustainer{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}"></script>
|
<script type="text/javascript" src="{% static 'js/supporter-page.js' %}" defer></script>
|
||||||
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
<link href="{% static 'css/forms.css' %}" rel="stylesheet" type="text/css"/>
|
||||||
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today’s most pressing social issues, but it’s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %}
|
{% include "opengraph_partial.html" with url="/sustainer/" title="Support Conservancy!" description="Software freedom is critical to many of today’s most pressing social issues, but it’s only effective when FOSS is for everyone. Support Conservancy today to help make that happen!" %}
|
||||||
{% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/static/img/conservancy-logo.png' %}
|
{% include "opengraph_urllist_partial.html" with property='image' urls='' fallback='/static/img/conservancy-logo.png' %}
|
||||||
|
|
Loading…
Reference in a new issue