Mattthew commited on
Commit
0b20068
1 Parent(s): b25deba

small bug fix and made "added" date less specific

Browse files

now you can hide low-count tags when all-tags is checked
now just the added month. might remove that later too. we'll see if it's helpful

Files changed (2) hide show
  1. artists_and_tags.js +0 -0
  2. index.js +4 -1
artists_and_tags.js CHANGED
The diff for this file is too large to render. See raw diff
 
index.js CHANGED
@@ -2069,6 +2069,7 @@ function showHideCategories() {
2069
 
2070
  function showHideLowCountTags() {
2071
  var hideLowCount = document.querySelector('input[name="low_count"]').checked;
 
2072
  var checkboxes = document.querySelectorAll('input[type="checkbox"]');
2073
  checkboxes.forEach(function(checkbox) {
2074
  if(hideLowCount) {
@@ -2078,7 +2079,9 @@ function showHideLowCountTags() {
2078
  && !classes.contains('top_control')) {
2079
  let count = parseInt(checkbox.parentNode.querySelector('.count').textContent.replace(/,/g, '').trim().substring(2),10);
2080
  if(count <= lowCountThreshold) {
2081
- if(checkbox.checked) {
 
 
2082
  checkbox.parentNode.dataset.hideDeferred = true;
2083
  } else {
2084
  if(!checkbox.parentNode.classList.contains('is_most_used')) {
 
2069
 
2070
  function showHideLowCountTags() {
2071
  var hideLowCount = document.querySelector('input[name="low_count"]').checked;
2072
+ var checkAll = document.querySelector('input[name="check-all"]').checked;
2073
  var checkboxes = document.querySelectorAll('input[type="checkbox"]');
2074
  checkboxes.forEach(function(checkbox) {
2075
  if(hideLowCount) {
 
2079
  && !classes.contains('top_control')) {
2080
  let count = parseInt(checkbox.parentNode.querySelector('.count').textContent.replace(/,/g, '').trim().substring(2),10);
2081
  if(count <= lowCountThreshold) {
2082
+ if(checkbox.checked && checkAll == false) {
2083
+ // low-count checkboxes that are checked aren't unchecked
2084
+ // unless all checkboxes are checked
2085
  checkbox.parentNode.dataset.hideDeferred = true;
2086
  } else {
2087
  if(!checkbox.parentNode.classList.contains('is_most_used')) {