mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 06:55:51 +00:00
ci: auto build & obfuscate [2026-04-11 18:45:22] (Jenkins #14)
This commit is contained in:
@@ -1195,6 +1195,8 @@ function bindWorldBookSettings() {
|
||||
const refreshButton = document.getElementById('table_refresh_worldbooks');
|
||||
const bookListContainer = document.getElementById('table_worldbook_checkbox_list');
|
||||
const entryListContainer = document.getElementById('table_worldbook_entry_list');
|
||||
const bookSearchInput = document.getElementById('table_worldbook_search');
|
||||
const entrySearchInput = document.getElementById('table_entry_search');
|
||||
|
||||
if (!enabledCheckbox || !limitSlider || !limitValueSpan || !sourceRadios.length || !manualSelectWrapper || !refreshButton || !bookListContainer || !entryListContainer) {
|
||||
log('无法找到世界书设置的相关UI元素,绑定失败。', 'warn');
|
||||
@@ -1380,6 +1382,26 @@ function bindWorldBookSettings() {
|
||||
}
|
||||
});
|
||||
|
||||
if (bookSearchInput) {
|
||||
bookSearchInput.addEventListener('input', () => {
|
||||
const keyword = bookSearchInput.value.trim().toLowerCase();
|
||||
bookListContainer.querySelectorAll('.checkbox-item').forEach(item => {
|
||||
const text = item.textContent.toLowerCase();
|
||||
item.style.display = text.includes(keyword) ? '' : 'none';
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (entrySearchInput) {
|
||||
entrySearchInput.addEventListener('input', () => {
|
||||
const keyword = entrySearchInput.value.trim().toLowerCase();
|
||||
entryListContainer.querySelectorAll('.checkbox-item').forEach(item => {
|
||||
const text = item.textContent.toLowerCase();
|
||||
item.style.display = text.includes(keyword) ? '' : 'none';
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
enabledCheckbox.dataset.eventsBound = 'true';
|
||||
log('世界书设置已成功绑定。', 'success');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user