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 21, 2023
1 parent 618b3cd commit 8e8e52a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,23 @@ document.getElementById('backend-set').addEventListener('click', setNewBackend);
showToast('Custom Backend loaded. === '+url, 's.html', 'green', 4000);
localStorage.setItem('backendUrl', url)
}


// start config for "ask before closing" button

var askOnClose = localStorage.getItem("askOnClose")
var askOnCloseButton = document.getElementById("askOnClose")

askOnCloseButton.value = askOnClose;

document.getElementById('askOnClose').addEventListener('change', askoncloseSwitchFunction);

function askoncloseSwitchFunction() {
localstorage.setItem("askOnClose", document.getElementById('askOnClose').value);
}






0 comments on commit 8e8e52a

Please sign in to comment.