From bcb2c237754178635b7e1ce34507ad75ab3ccc83 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 23 Dec 2024 02:47:34 +0100 Subject: [PATCH] """prettier""" --- static/webui/script.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/webui/script.js b/static/webui/script.js index f50526bb..e7235749 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -62,8 +62,16 @@ function logout() { } function deleteAccount() { - if (window.confirm("Are you sure you want to delete your account " + $(".displayname").text() + " (" + localStorage.getItem("email") + ")? This action cannot be undone.")) { - fetch("/custom/deleteAccount?" + window.authz).then(function() { + if ( + window.confirm( + "Are you sure you want to delete your account " + + $(".displayname").text() + + " (" + + localStorage.getItem("email") + + ")? This action cannot be undone." + ) + ) { + fetch("/custom/deleteAccount?" + window.authz).then(function () { logout(); single.loadRoute("/webui/"); // Show login screen });