From 6cd8f725ae0875d2ac984b3c9c71e3638bf8d57a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 26 Mar 2018 21:54:53 +0200 Subject: [PATCH] Double confirmation for anime deletes --- scripts/Actions/Object.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/Actions/Object.ts b/scripts/Actions/Object.ts index 7dac7d59..9d57290e 100644 --- a/scripts/Actions/Object.ts +++ b/scripts/Actions/Object.ts @@ -18,7 +18,14 @@ export function deleteObject(arn: AnimeNotifier, button: HTMLButtonElement) { if(!confirm(`Are you sure you want to delete this ${confirmType}?`)) { return } - + + // Double confirmation on anime + if(confirmType === "anime") { + if(!confirm(`Just making sure because this is not reversible. Are you absolutely sure you want to delete this ${confirmType}?`)) { + return + } + } + let endpoint = arn.findAPIEndpoint(button) arn.post(endpoint + "/delete", "")