mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Toasty Click to close hint
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user