mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 22:55:51 +00:00
Update bindings.js
This commit is contained in:
@@ -427,8 +427,19 @@ export function bindModalEvents() {
|
||||
const container = $("#amily2_drawer_content").length ? $("#amily2_drawer_content") : $("#amily2_chat_optimiser");
|
||||
|
||||
// Collapsible sections logic
|
||||
container.on('click', '.collapsible-legend', function() {
|
||||
container.on('click touchend', '.collapsible-legend', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const legend = $(this);
|
||||
// Debounce to prevent double firing on touch devices
|
||||
const now = Date.now();
|
||||
const lastTouch = legend.data('lastTouch') || 0;
|
||||
if (now - lastTouch < 500) {
|
||||
return;
|
||||
}
|
||||
legend.data('lastTouch', now);
|
||||
|
||||
const content = legend.siblings('.collapsible-content');
|
||||
const icon = legend.find('.collapse-icon');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user