From 26fd06335e104fa08225332fb731494763038f3d Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Fri, 23 May 2025 20:38:05 +0900 Subject: [PATCH] Toasty Click to close hint --- public/script.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/script.js b/public/script.js index 516b6dfc9..42923e191 100644 --- a/public/script.js +++ b/public/script.js @@ -342,12 +342,19 @@ toastr.options = { 'escapeHtml': true, }; + toastr.options.onHidden = () => { // If we have any dialog still open, the last "hidden" toastr will remove the toastr-container. We need to keep it alive inside the dialog though // so the toasts still show up inside there. fixToastrForDialogs(); }; +toastr.options.onShown = function () { + const $toast = $(this); // 'this' refers to the toast element + const message = 'Click/Tap to close'; + $toast.attr('title', message); // Set tooltip to the notification message +}; + // Allow target="_blank" in links DOMPurify.addHook('afterSanitizeAttributes', function (node) { if ('target' in node) {