Add files via upload

This commit is contained in:
87owo authored and GitHub committed 2026-05-14 22:31:46 +08:00
1 parent 133e3208ec
commit c0189e9d05
1 file changed
+8 -1
+8 -1
View File
@@ -721,7 +721,14 @@ document.addEventListener('DOMContentLoaded', () => {
});
['whitelist_window', 'quarantine_window', 'popup_window', 'custom_protect_window'].forEach(id => {
const listKey = id === 'popup_window' ? 'block_list' : (id === 'custom_protect_window' ? 'custom_rule' : id.replace('_window', ''));
const listKeyMap = {
'popup_window': 'block_list',
'custom_protect_window': 'custom_rule',
'whitelist_window': 'white_list',
'quarantine_window': 'quarantine'
};
const listKey = listKeyMap[id];
document.querySelector(`#${id} .modern-btn:not(.primary-btn)`)?.addEventListener('click', () => {
const checked = getCheckedValues(`#${id}`);
if (checked.length > 0 && window.pywebview) window.pywebview.api.remove_list_items(listKey, checked).then(refreshConfigLists);