diff --git a/media/js/src/modules/site.js b/media/js/src/modules/site.js index df86ab4..64be7d8 100644 --- a/media/js/src/modules/site.js +++ b/media/js/src/modules/site.js @@ -51,19 +51,17 @@ this.keyboardShortcuts(); this.inFieldLabels(); - if (this.$snipts.length) { - var SniptListView = Snipt.SniptListView; - this.snipt_list = new SniptListView({ 'snipts': this.$snipts }); + var SniptListView = Snipt.SniptListView; + this.snipt_list = new SniptListView({ 'snipts': this.$snipts }); - this.$body.click(function() { - if (!window.ui_halted && !window.from_modal && window.$selected) { - window.$selected.trigger('deselect'); - } - if (window.from_modal) { - window.from_modal = false; - } - }); - } + this.$body.click(function() { + if (!window.ui_halted && !window.from_modal && window.$selected) { + window.$selected.trigger('deselect'); + } + if (window.from_modal) { + window.from_modal = false; + } + }); $search_query = this.$search_query; $search_query.focus(function() { diff --git a/templates/404.html b/templates/404.html index 7e6a5c1..f6c9c3f 100644 --- a/templates/404.html +++ b/templates/404.html @@ -2,6 +2,7 @@ {% block page-title %}Page Not Found - {{ block.super }}{% endblock %} {% block body-class %}error{% endblock %} +{% block inline-js %}{% endblock %} {% block content %} 404: Page Not Found diff --git a/templates/500.html b/templates/500.html index d0c2883..91f0131 100644 --- a/templates/500.html +++ b/templates/500.html @@ -2,6 +2,7 @@ {% block page-title %}Server Error - {{ block.super }}{% endblock %} {% block body-class %}error{% endblock %} +{% block inline-js %}{% endblock %} {% block content %} 500: Server Error diff --git a/templates/api-contest.html b/templates/api-contest.html index 44f5731..ef0c7a1 100644 --- a/templates/api-contest.html +++ b/templates/api-contest.html @@ -4,6 +4,7 @@ {% block body-class %}{{ block.super }} api static api-contest{% endblock %} {% block sub-header %}{% endblock %} +{% block inline-js %}{% endblock %} {% block content %}
diff --git a/templates/base.html b/templates/base.html index 73ae7f7..6160910 100644 --- a/templates/base.html +++ b/templates/base.html @@ -36,9 +36,11 @@ + {% block inline-js %} + {% endblock %}