Remove the `data-autocomplete-antecedent`, `data-autocomplete-category`, and `data-autocomplete-post-count` data attributes from the autocomplete menu. These weren't used by Danbooru itself and they bloat the HTML.
22 lines
781 B
Plaintext
22 lines
781 B
Plaintext
<ul>
|
|
<% autocomplete_results.each do |result| %>
|
|
<%= tag.li class: "ui-menu-item", "data-autocomplete-type": result.type, "data-autocomplete-value": result.value do %>
|
|
<div class="ui-menu-item-wrapper" tabindex="-1">
|
|
<%= link_to_result result do %>
|
|
<% if result.antecedent.present? %>
|
|
<span class="autocomplete-antecedent"><%= highlight_antecedent(result) %></span>
|
|
<span class="autocomplete-arrow">→</span>
|
|
<%= result.label %>
|
|
<% else %>
|
|
<%= highlight_result(result) %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if result.post_count %>
|
|
<%= tag.span humanized_number(result.post_count), class: "post-count" %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|