let fast=document.querySelectorAll(".fast .label"),dels=(fast.forEach(e=>{e.addEventListener("click",function(){clickStoreMenu(e.getAttribute("type"))})}),document.querySelectorAll(".label .del")),delBtn=(dels.forEach(t=>{t.addEventListener("click",function(e){e.preventDefault(),delHistory(t.getAttribute("cid"),t.getAttribute("type"),t.getAttribute("stype"))})}),document.getElementById("delall"));function delHistory(e,t,l){getFetch(`/plugin/${t}/resource/status?type=${l}&status=false&id=`+e).then(e=>{location.reload()})}function clickStoreMenu(l){fast.forEach(e=>{e.classList.remove("active"),e.getAttribute("type")===l&&e.classList.add("active")}),scrollPageTop(),document.querySelectorAll(".category_list").forEach(e=>{var t=e.getAttribute("type");t&&(e.style.display="none",t===l)&&(e.style.display="block")})}delBtn&&delBtn.addEventListener("click",function(){confirm("\u786e\u5b9a\u8981\u6e05\u9664\u5168\u90e8\u8bb0\u5f55\u5417\uff1f")&&getFetch("/browse/resource/empty").then(e=>{0===e.code&&(alert("\u5df2\u6e05\u9664\u5168\u90e8\u8bb0\u5f55\uff01"),location.reload())})});