summaryrefslogtreecommitdiffstats
path: root/templates/public/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/public/index.html')
-rw-r--r--templates/public/index.html19
1 files changed, 9 insertions, 10 deletions
diff --git a/templates/public/index.html b/templates/public/index.html
index 3f88c18..abdb027 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -211,10 +211,8 @@
<div id="konami" style="display:none;"></div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "bootstrap-typeahead.min.js" %}"></script>
-<script type="text/javascript" src="{% static "konami.pack.js" %}"></script>
<script type="text/javascript">
-$(document).ready(function() {
+function setupTypeahead() {
$('#pkgsearch-field').typeahead({
source: function(query, callback) {
$.getJSON('/opensearch/packages/suggest', {q: query}, function(data) {
@@ -226,10 +224,9 @@ $(document).ready(function() {
menu: '<ul class="pkgsearch-typeahead"></ul>',
items: 10
}).attr('autocomplete', 'off');
-});
-$(document).ready(function() {
- var konami = new Konami();
- konami.code = function() {
+}
+function setupKonami() {
+ var konami = new Konami(function() {
$('#konami').html('<img src="{% static "vector_tux.png" %}" alt=""/>');
setTimeout(function() {
$('#konami').fadeIn(500);
@@ -237,9 +234,11 @@ $(document).ready(function() {
$('#konami').click(function() {
$('#konami').fadeOut(500);
});
- };
- konami.iphone.code = konami.code;
- konami.load();
+ });
+}
+$(document).ready(function() {
+ $.ajax({ url: "{% static "bootstrap-typeahead.min.js" %}", cache: true, dataType: "script", success: setupTypeahead });
+ $.ajax({ url: "{% static "konami.min.js" %}", cache: true, dataType: "script", success: setupKonami });
});
</script>
{% endblock %}