Skip to content

Commit

Permalink
Update settings.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaTheLEGEND authored Sep 22, 2023
1 parent 83a908f commit 58ff965
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ var askOnCloseButton = document.getElementById("askOnClose");

askOnCloseButton.value = askOnClose;

document.getElementById('askOnClose').addEventListener('change', askOnCloseSwitchFunction);
document.getElementById('askOnClose').addEventListener('change', function() {
console.log('Checkbox state changed');
askOnCloseSwitchFunction(); // Call your function here
});

function askOnCloseSwitchFunction() {
showToast('Settings updated.', '#', 'green', 2000);
Expand Down

0 comments on commit 58ff965

Please sign in to comment.