blacklist js fixes

This commit is contained in:
albert
2013-02-28 13:03:51 -08:00
parent 609357ae9e
commit d089bc8464
3 changed files with 3 additions and 3 deletions

View File

@@ -98,7 +98,7 @@
tags.push("rating:" + $post.data("rating"));
tags.push("user:" + $post.data("user"));
return Danbooru.is_subset(tags, blacklist.require) && !Danbooru.intersect(tags, blacklist.exclude).length;
return (blacklist.require.length > 0 || blacklist.exclude.length > 0) && Danbooru.is_subset(tags, blacklist.require) && !Danbooru.intersect(tags, blacklist.exclude).length;
}
Danbooru.Blacklist.post_hide = function(post) {

View File

@@ -13,7 +13,7 @@
Danbooru.is_subset = function(array, subarray) {
var all = true;
$.each(subarray, function(i, val) {
if ($.inArray(val, array) === -1) {
all = false;