fix(debug): 复选框变更时自动保存状态到localStorage

This commit is contained in:
augushong
2026-05-24 09:03:02 +08:00
parent e263d172cd
commit 4668865b4f

View File

@@ -761,6 +761,11 @@ if (isset($tables) && is_array($tables)) {
}
restoreCheckboxState();
updateDisabledState();
// Auto-save on checkbox change
var checkboxes = document.querySelectorAll('#debug-toolbar input[type="checkbox"]');
checkboxes.forEach(function(cb) {
cb.addEventListener('change', saveCheckboxState);
});
}
// Run init on DOMContentLoaded or immediately if already loaded