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

Function resetFileList

missav-explorer/missav-explorer.user.js:2353–2372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2351
2352 // 恢复初始文件列表函数
2353 function resetFileList() {
2354 const files = Array.from(fileListContainer.children) // 获取文件列表的所有子元素(文件项)
2355 files.forEach(file => {
2356 file.style.display = '' // 显示所有文件项
2357 })
2358 searchButton.textContent = '搜索列表' // 恢复搜索按钮文本为"搜索"
2359
2360 // 更新文件数量标签内容为 "文件数量:"
2361 const fileCountLabel = document.getElementById('fileCountLabel')
2362 if (fileCountLabel) {
2363 fileCountLabel.textContent = '文件数量:'
2364 }
2365
2366 // 更新包裹文件数量的元素内容为当前文件数量
2367 const fileCountElement = document.querySelector('.file-count')
2368 if (fileCountElement) {
2369 const currentFileCount = files.length // 获取当前文件数量
2370 fileCountElement.textContent = currentFileCount
2371 }
2372 }
2373 //搜索结束
2374 //---------------
2375

Callers 1

toggleSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected