Mattthew commited on
Commit
53eb224
1 Parent(s): 6d48646

fixe bug in / menu tag search

Browse files

fixed issues where previously, checking a tag in the / menu, then unchecking that tag in the main area, the artists matching those tags weren't hidden

Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -1240,7 +1240,7 @@ function unhideArtistsPermissive() {
1240
  // permissive mode unhides images that match ANY checked tag
1241
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1242
  var imageItems = document.querySelectorAll('.image-item');
1243
- var checkboxes = Array.from(document.querySelectorAll('input[type="checkbox"]'))
1244
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1245
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1246
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);
@@ -1260,7 +1260,7 @@ function unhideArtistsStrict() {
1260
  // strict mode unhides images that match ALL checked tags
1261
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1262
  var imageItems = document.querySelectorAll('.image-item');
1263
- var checkboxes = Array.from(document.querySelectorAll('input[type="checkbox"]'))
1264
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1265
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1266
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);
@@ -1289,7 +1289,7 @@ function unhideAristsExact() {
1289
  // exact mode unhides images that match ALL checked tags and NO unchecked tags
1290
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1291
  var imageItems = document.querySelectorAll('.image-item');
1292
- var checkboxes = Array.from(document.querySelectorAll('input[type="checkbox"]'))
1293
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1294
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1295
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);
 
1240
  // permissive mode unhides images that match ANY checked tag
1241
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1242
  var imageItems = document.querySelectorAll('.image-item');
1243
+ var checkboxes = Array.from(document.querySelectorAll('#toggles input[type="checkbox"]'))
1244
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1245
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1246
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);
 
1260
  // strict mode unhides images that match ALL checked tags
1261
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1262
  var imageItems = document.querySelectorAll('.image-item');
1263
+ var checkboxes = Array.from(document.querySelectorAll('#toggles input[type="checkbox"]'))
1264
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1265
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1266
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);
 
1289
  // exact mode unhides images that match ALL checked tags and NO unchecked tags
1290
  // the set of checkboxes is derived from the unique tags within the imageItem (Artists) tagList dataSet
1291
  var imageItems = document.querySelectorAll('.image-item');
1292
+ var checkboxes = Array.from(document.querySelectorAll('#toggles input[type="checkbox"]'))
1293
  .filter(cb => !cb.parentNode.classList.contains("top_control"));
1294
  checkboxes.push(document.querySelector('input[name="favorite"]'));
1295
  var checked = checkboxes.filter(cb => cb.checked).map(cb => cb.name);