add new theme
[mlpccg-meta.git] / meta / static / js / main.js
index a2614b3..8177d41 100644 (file)
@@ -1,20 +1,22 @@
 function rateDeck() {
-    $.getJSON('/meta/rate', {url: $('#ponyheadURL').val()}, function(data) {
+    $.getJSON('/rate', {url: $('#ponyheadURL').val()}, function(data) {
         console.log(data);
     });
 }
 
 var tournaments = new Bloodhound({
-  datumTokenizer: Bloodhound.tokenizers.obj.nonword('name'),
-  queryTokenizer: Bloodhound.tokenizers.nonword,
-  prefetch: '/meta/tournaments'
+    datumTokenizer: Bloodhound.tokenizers.obj.nonword('name'),
+    queryTokenizer: Bloodhound.tokenizers.nonword,
+    prefetch: '/tournaments'
 });
 
+tournaments.clearPrefetchCache()
 tournaments.initialize();
 
 $(document).ready(function() {
-    $('.typeahead-tournaments').typeahead(null, {
-        name: 'tournaments',
+    $('.typeahead-tournaments').typeahead({
+        highlight: true
+    }, {
         displayKey: 'name',
         source: tournaments.ttAdapter()
     });