芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.2/com_modules/js/admin-module-search.min.js
const elSearch=document.getElementById("comModulesSelectSearch"),elSearchContainer=document.getElementById("comModulesSelectSearchContainer"),elSearchHeader=document.getElementById("comModulesSelectTypeHeader"),elSearchResults=document.getElementById("comModulesSelectResultsContainer"),alertElement=document.querySelector(".modules-alert"),elCards=[].slice.call(document.querySelectorAll(".comModulesSelectCard"));if(elSearch&&elSearchContainer){elSearch.addEventListener("keyup",(e=>{const t=e.target.value;let o=!1;"undefined"!=typeof sessionStorage&&sessionStorage.setItem("Joomla.com_modules.new.search",t),elCards.forEach((e=>{if(e.classList.remove("d-none"),!t)return;const s=e.querySelector(".new-module-title"),l=e.querySelector(".card-body"),a=s?s.textContent:"",n=l?l.textContent:"";a&&!a.toLowerCase().includes(t.toLowerCase())&&n&&!n.toLowerCase().includes(t.toLowerCase())?e.classList.add("d-none"):o=!0})),o||!t?(alertElement.classList.add("d-none"),elSearchHeader.classList.remove("d-none"),elSearchResults.classList.remove("d-none")):(alertElement.classList.remove("d-none"),elSearchHeader.classList.add("d-none"),elSearchResults.classList.add("d-none"))})),elSearchContainer.classList.remove("d-none"),elSearch.focus();try{"undefined"!=typeof sessionStorage&&(elSearch.value=sessionStorage.getItem("Joomla.com_modules.new.search")||"",elSearch.dispatchEvent(new KeyboardEvent("keyup")))}catch(e){}}