From c05defba0e1ea1354771022186bd7026ebfd80ec Mon Sep 17 00:00:00 2001 From: Alex Pankratov Date: Wed, 10 Aug 2022 17:18:21 +0200 Subject: [PATCH] Customize confirm() and alert() a bit --- nullboard.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nullboard.html b/nullboard.html index b760753..92a8e2a 100644 --- a/nullboard.html +++ b/nullboard.html @@ -1698,6 +1698,15 @@ return Math.min(Math.max(this, min), max); }; + /* + * add a blank line to push 'Prevent this page from opening ...' + * tack-on from the actual message we are trying to display + */ + var confirm_org = window.confirm; + var alert_org = window.alert; + window.confirm = function(msg) { return confirm_org(msg + "\n "); } + window.alert = function(msg) { return alert_org (msg + "\n "); } +