Skip to content

Commit

Permalink
index: Confirm before clearing Cockpit settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl committed Jul 9, 2024
1 parent f80c0b7 commit 93143f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
});

clearSettingsButton.addEventListener('click', async function() {
if (!confirm("Are you sure you want to reset Cockpit settings?")) {
return;
}

localStorage.clear();
// We are also going to clear the cache to ensure a fresh access to all files as well
if (caches) {
Expand Down

0 comments on commit 93143f1

Please sign in to comment.