remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-11-04 20:45:52 +02:00
parent 40a6ed5155
commit 204415c4f8
1 changed files with 9 additions and 2 deletions

View File

@ -83,8 +83,15 @@ function postToastSwitch(t, url, button1, button2, cls, callback) {
{
},
(xhr) => {
document.getElementById(button1).classList.toggle(cls);
document.getElementById(button2).classList.toggle(cls);
if (button1)
{
if (typeof(button1) == 'boolean') {
location.reload()
} else {
document.getElementById(button1).classList.toggle(cls);
document.getElementById(button2).classList.toggle(cls);
}
}
if (callback) callback(xhr);
}
);