mirror of
https://codeberg.org/claui/mobile-config-firefox.git
synced 2024-11-10 03:40:14 +00:00
don't hide secondary category list when sec. category is clicked
This commit is contained in:
parent
4ad4c9344b
commit
cbae4403a0
1 changed files with 10 additions and 9 deletions
|
@ -88,8 +88,9 @@ async function onCategoryClicked(categoryNode,isSecondary = false){
|
||||||
|
|
||||||
let secondaryCategoriesNode = document.querySelector("#secondaryCategories");
|
let secondaryCategoriesNode = document.querySelector("#secondaryCategories");
|
||||||
|
|
||||||
if(previousCategory.fileNames.length > 9 && !isSecondary){
|
if(!isSecondary){
|
||||||
|
|
||||||
|
if(previousCategory.fileNames.length > 9){
|
||||||
let matchingSecondaries = getSecondaryCategories(previousCategory.fileNames);
|
let matchingSecondaries = getSecondaryCategories(previousCategory.fileNames);
|
||||||
for(let child of Array.from(secondaryCategories.children)){
|
for(let child of Array.from(secondaryCategories.children)){
|
||||||
matchingSecondaries.includes(child.textContent) ? child.classList.remove("hidden") : child.classList.add("hidden")
|
matchingSecondaries.includes(child.textContent) ? child.classList.remove("hidden") : child.classList.add("hidden")
|
||||||
|
@ -99,7 +100,7 @@ async function onCategoryClicked(categoryNode,isSecondary = false){
|
||||||
}else{
|
}else{
|
||||||
secondaryCategoriesNode.classList.add("hidden");
|
secondaryCategoriesNode.classList.add("hidden");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(let c of Array.from(document.querySelectorAll(".target"))){
|
for(let c of Array.from(document.querySelectorAll(".target"))){
|
||||||
previousCategory.fileNames.includes(getText(c)) ? c.classList.remove("hidden") : c.classList.add("hidden");
|
previousCategory.fileNames.includes(getText(c)) ? c.classList.remove("hidden") : c.classList.add("hidden");
|
||||||
|
|
Loading…
Reference in a new issue