From 06825331d66a8223121d77402019ba6c02223f79 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Tue, 5 Sep 2023 12:05:20 +0300 Subject: [PATCH] Confirmation for WI entry delete --- public/scripts/world-info.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index e818df279..90e999e1f 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -718,6 +718,10 @@ async function deleteWorldInfoEntry(data, uid) { return; } + if (!confirm(`Delete the entry with UID: ${uid}? This action is irreversible!`)) { + throw new Error("User cancelled deletion"); + } + delete data.entries[uid]; }