Update tag.html

This commit is contained in:
Meekdai 2024-04-02 18:07:39 +08:00
parent ddad57bc46
commit 9def4814f9

View File

@ -90,9 +90,8 @@ function showList(){
showLabels.setAttribute("onclick","javascript:updateShowTag('All');");
tagLable.appendChild(showLabels);
}
for(i in jsonData){
for(label of jsonData[i]['labels']){
if(!(tagList.includes(label))){
for(label of jsonData['labelColorDict']){
tagList.push(label);
let showLabels=document.createElement("button");
showLabels.setAttribute("class","Label");
@ -101,8 +100,9 @@ function showList(){
showLabels.setAttribute("onclick","javascript:updateShowTag('"+label+"');");
tagLable.appendChild(showLabels);
}
}
for(i in jsonData){
if(i!='labelColorDict'){
let div=document.createElement("div");
div.setAttribute("class","lists "+jsonData[i]['label']);
let item=document.createElement("a");
@ -148,6 +148,7 @@ function showList(){
SideNav.appendChild(div);
}
}
}
function updateShowTag(label){
if(window.location.hash.slice(1)!=encodeURI(label)){