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

Function toggleSelection

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

Source from the content-addressed store, hash-verified

2375
2376 // 选择列表
2377 function toggleSelection() {
2378
2379 checkboxes.forEach(checkbox => {
2380 checkbox.style.display = checkbox.style.display === 'none' ? 'inline-block' : 'none'
2381 checkbox.checked = false // 取消复选框的选中状态
2382 })
2383
2384 // 切换显示“删除选中”和“下载选中”按钮
2385 deleteSelectedButton.style.display = deleteSelectedButton.style.display === 'none' ? 'inline-block' : 'none'
2386 downloadSelectedButton.style.display = downloadSelectedButton.style.display === 'none' ? 'inline-block' : 'none'
2387 selectAllButton.style.display = selectAllButton.style.display === 'none' ? 'inline-block' : 'none'
2388 selectButton.textContent = downloadSelectedButton.style.display === 'none' ? '选择列表' : '取消选择'
2389 }
2390
2391 }
2392 //选中下载

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected