* Autocomplete the `search:<label>` metatag. * Make label autocompletion do a prefix match instead of a substring match. Example: `search:ar` matches `artists`, not `characters`. This is how tags and most other things are autocompleted.
17 lines
371 B
JavaScript
17 lines
371 B
JavaScript
Danbooru.SavedSearch = {};
|
|
|
|
Danbooru.SavedSearch.initialize_all = function() {
|
|
if ($("#c-saved-searches".length)) {
|
|
Danbooru.sorttable($("#c-saved-searches table"));
|
|
}
|
|
}
|
|
|
|
Danbooru.SavedSearch.labels = function(term) {
|
|
return $.getJSON("/saved_searches/labels", {
|
|
"search[label]": term + "*",
|
|
"limit": 10
|
|
});
|
|
}
|
|
|
|
$(Danbooru.SavedSearch.initialize_all);
|