pull/245/head
BlafKing 2024-03-19 20:22:45 +01:00
parent c6f41adac0
commit e527eead12
No known key found for this signature in database
GPG Key ID: BFD6B0BCA6280F8B
1 changed files with 14 additions and 2 deletions

View File

@ -436,7 +436,13 @@ function addOnClickToButtons() {
buttonIds.forEach(buttonId => {
let button = document.getElementById(buttonId);
if (button) {
button.onclick = () => createCivitAICardButtons(button);
const originalOnclick = button.onclick;
button.onclick = null;
button.addEventListener('click', (event) => {
if(originalOnclick) originalOnclick.call(button, event);
createCivitAICardButtons(button);
});
}
});
@ -444,7 +450,13 @@ function addOnClickToButtons() {
if (tab) {
const buttons = tab.querySelectorAll('div > button:not(:first-child)');
buttons.forEach(button => {
button.onclick = () => createCivitAICardButtons(button);
const originalOnclick = button.onclick;
button.onclick = null;
button.addEventListener('click', (event) => {
if(originalOnclick) originalOnclick.call(button, event);
createCivitAICardButtons(button);
});
});
}
});