Browse Source

Remove redundant subject check in catalog-search.js

The comment selection included it.
main
discomrade 2 years ago
parent
commit
070ae35161
  1. 3
      js/catalog-search.js

3
js/catalog-search.js

@ -21,11 +21,10 @@ if (active_page == 'catalog') {
//search and hide none matching threads
function filter(search_term) {
$('.replies').each(function () {
var subject = $(this).children('.intro').text().toLowerCase();
var comment = $(this).clone().children().slice(0,2).remove().end().end().text().trim().toLowerCase();
search_term = search_term.toLowerCase();
if (subject.indexOf(search_term) == -1 && comment.indexOf(search_term) == -1) {
if (comment.indexOf(search_term) == -1) {
$(this).parents('div[id="Grid"]>.mix').css('display', 'none');
} else {
$(this).parents('div[id="Grid"]>.mix').css('display', 'inline-block');

Loading…
Cancel
Save