Toasty Click to close hint

26fd06335e104fa08225332fb731494763038f3d

RossAscends <124905043+RossAscends@users.noreply.github.com>

1 files changed, +7 -0Ignore whitespace
public/script.js+7 -0
@@ -342,12 +342,19 @@ toastr.options = {
342 'escapeHtml': true,342 'escapeHtml': true,
343};343};
344344
345
345toastr.options.onHidden = () => {346toastr.options.onHidden = () => {
346 // 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 though347 // 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
347 // so the toasts still show up inside there.348 // so the toasts still show up inside there.
348 fixToastrForDialogs();349 fixToastrForDialogs();
349};350};
350351
352toastr.options.onShown = function () {
353 const $toast = $(this); // 'this' refers to the toast element
354 const message = 'Click/Tap to close';
355 $toast.attr('title', message); // Set tooltip to the notification message
356};
357
351// Allow target="_blank" in links358// Allow target="_blank" in links
352DOMPurify.addHook('afterSanitizeAttributes', function (node) {359DOMPurify.addHook('afterSanitizeAttributes', function (node) {
353 if ('target' in node) {360 if ('target' in node) {