MCPcopy Create free account
hub / github.com/MemeTray/MemeTray / updateSelectionState

Function updateSelectionState

tools/all-in-one/script.js:958–971  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

956}
957
958function updateSelectionState() {
959 const items = document.querySelectorAll('.results-item');
960 items.forEach((item, index) => {
961 const checkbox = item.querySelector('input[type="checkbox"]');
962 if (state.selectedFiles.has(index)) {
963 item.classList.add('selected');
964 checkbox.checked = true;
965 } else {
966 item.classList.remove('selected');
967 checkbox.checked = false;
968 }
969 });
970 updateSelectionButtons();
971}
972
973function updateSelectionButtons() {
974 const hasSelection = state.selectedFiles.size > 0;

Callers 2

selectAllFilesFunction · 0.85
deselectAllFilesFunction · 0.85

Calls 1

updateSelectionButtonsFunction · 0.85

Tested by

no test coverage detected