Skip to content

Commit

Permalink
Fixed filtering against multiple tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2010
1 parent 5e66d1b commit a4ba9d3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions index.html
Expand Up @@ -101,7 +101,7 @@
title: $(this).find('title').text(),
logourl: $(this).find('logourl').text(),
storeurl: $(this).find('storeurl').text(),
filtered: true,
tagmatchcount: 0,
element: null,
tags: new Array,
};
Expand Down Expand Up @@ -167,21 +167,19 @@
for (var i in profile.tagmap[tag])
{
var game = profile.tagmap[tag][i];
game.filtered = false;
game.tagmatchcount++;
} // for
} // for

// okay, now we have a list of games that should be filtered.
for (var i in profile.gamelist)
{
var game = profile.gamelist[i];
if (game.filtered)
if (game.tagmatchcount != filtertags.length)
game.element.hide();
else
{
game.element.show();
game.filtered = true; // reset this for next time.
} // else
game.tagmatchcount = 0; // reset this for next time.
} // for
} // run_filter

Expand Down

0 comments on commit a4ba9d3

Please sign in to comment.