MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / searchScript

Function searchScript

script-finder-plus/script-finder-plus.user.js:781–792  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

779 }
780
781 function searchScript() {
782 const searchWord = document.querySelector('.sf-script-search-input').value.toLowerCase() // 将要匹配的文本转换为小写
783 const scriptList = document.querySelectorAll('.sf-info-item')
784 for (let i = 0; i < scriptList.length; i++) {
785 const scriptText = scriptList[i].innerText.toLowerCase() // 将检索的文本转换为小写
786 if (scriptText.includes(searchWord)) {
787 scriptList[i].style.display = 'block'
788 } else {
789 scriptList[i].style.display = 'none'
790 }
791 }
792 }
793
794 function updateMatches() {
795 const matchCount = document.querySelectorAll('.sf-info-item:not([style*="display: none"])').length

Callers 1

setupUIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected