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 507df78 commit 3f0bab0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions settings/settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

// Function to set the document icon
function setDocumentIcon(iconUrl) {
const link = document.querySelector("link[rel*='icon']") || document.createElement('link');
Expand Down Expand Up @@ -71,14 +72,12 @@ var askOnCloseButton = document.getElementById("askOnClosebtn");
//askOnCloseButton.checked = askOnClose;

function askFunction() {
alert("funtion did run");
if(askOnCloseButton.checked) {
//alert("checked");
alert("function did run " + askOnCloseButton.checked);
if (askOnCloseButton.checked) {
showToast('Anti-close enabled', '#', 'green', 2000);
localStorage.setItem("askOnCloseLS", "true");
}
else if(askOnCloseButton.checked == false) {
//alert("dischecked");
else if (askOnCloseButton.checked == false) {
showToast('Anti-close disabled', '#', 'green', 2000);
localStorage.setItem("askOnCloseLS", "false");
}
Expand Down

0 comments on commit 3f0bab0

Please sign in to comment.