mirror of
https://codeberg.org/claui/mobile-config-firefox.git
synced 2024-11-10 03:40:14 +00:00
test alphabetical sorting again
This commit is contained in:
parent
11fcf00269
commit
1e56cd34ad
2 changed files with 7 additions and 4 deletions
|
@ -15,6 +15,7 @@ a:visited{ color: rgb(150,100,200) }
|
||||||
a:hover{ color: rgb(200,150,100) }
|
a:hover{ color: rgb(200,150,100) }
|
||||||
pre:empty{ display: none }
|
pre:empty{ display: none }
|
||||||
.category{ padding: 0.2em 1em; cursor: pointer }
|
.category{ padding: 0.2em 1em; cursor: pointer }
|
||||||
|
.category::after{ content: " (" attr(data-value) ")"}
|
||||||
|
|
||||||
.currentCategory,
|
.currentCategory,
|
||||||
.category:hover{ background-color: grey }
|
.category:hover{ background-color: grey }
|
||||||
|
|
|
@ -106,7 +106,8 @@ function createCategories(){
|
||||||
link.title = "See on Github";
|
link.title = "See on Github";
|
||||||
link.target = "_blank";
|
link.target = "_blank";
|
||||||
}else{
|
}else{
|
||||||
node.textContent = name;
|
node.textContent = name.name;
|
||||||
|
node.setAttribute("data-value",name.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
@ -140,12 +141,13 @@ function createCategories(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let map = ret.map((a,i)=>({name:a,value:ns[i]}))
|
let map = ret.map((a,i)=>({name:a,value:ns[i]}))
|
||||||
|
return map
|
||||||
return map.sort((a,b)=>(a.value > b.value?-1:a.value < b.value ? 1:0))
|
//return map.sort((a,b)=>(a.value > b.value?-1:a.value < b.value ? 1:0))
|
||||||
})();
|
})();
|
||||||
|
|
||||||
for(let cat of CAT_NAMES){
|
for(let cat of CAT_NAMES){
|
||||||
CAT_PARENT.appendChild(createCategory(cat.name))
|
// CAT_PARENT.appendChild(createCategory(cat.name))
|
||||||
|
CAT_PARENT.appendChild(createNode(cat,"category"))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue