X-Git-Url: https://git.yukkurigames.com/?a=blobdiff_plain;f=meta%2Fstatic%2Fjs%2Fmain.js;h=8f2924a0a591b1afe4d1f16f64ed11bdc5b158a0;hb=cfa1a6d3d0f2fd3a9539e5a19601a7ad22b136fc;hp=8b137891791fe96927ad78e64b0aad7bded08bdc;hpb=f5f267a53e90455937409ad2bd15324e717c8e04;p=mlpccg-meta.git diff --git a/meta/static/js/main.js b/meta/static/js/main.js index 8b13789..8f2924a 100644 --- a/meta/static/js/main.js +++ b/meta/static/js/main.js @@ -1 +1,23 @@ +function rateDeck() { + $.getJSON('/meta/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' +}); + +tournaments.clearPrefetchCache() +tournaments.initialize(); + +$(document).ready(function() { + $('.typeahead-tournaments').typeahead({ + highlight: true + }, { + displayKey: 'name', + source: tournaments.ttAdapter() + }); +});