1class customMessage { 2 constructor() { 3 clearTimeout(window.timeoutId) 4 undoMessage(); 5 } // Not Working 6 7 static success(text, optionalText = '', optionalLink = '', time) { 8 let main_wrap = this.common(text, time); 9 main_wrap.css({'backgroundColor': '#20bf6b', 'boxShadow': '0px 0px 15px rgb(32 191 107 / 59%)'}); 10 11 main_wrap.find('.custom_alert_banner__url').remove(); 12 if (optionalText !== '' && optionalLink !== '') { 13 let url_div = '<a href="' + optionalLink + '" class="custom_alert_banner__url">' + optionalText + '</a>'; 14 $(url_div).insertAfter('.custom_alert_banner__text'); 15 } 16 } 17 18 static error(text, time) { 19 let main_wrap = this.common(text, time); 20 main_wrap.find('.custom_alert_banner__url').remove(); 21 main_wrap.css({'backgroundColor': '#eb3b5a', 'boxShadow': '0px 0px 15px rgb(235 59 90 / 59%)'}); 22 } 23 24 static warning(text, time) { 25 let main_wrap = this.common(text, time); 26 main_wrap.find('.custom_alert_banner__url').remove(); 27 main_wrap.css({'backgroundColor': '#F79F1F', 'boxShadow': '0px 0px 15px rgb(247 159 31 / 59%)'}) 28 } 29 30 static common(text, time = 5000) { 31 let bannerWrapper = $(".custom_alert_banner__content"); 32 bannerWrapper.find('.custom_alert_banner__text').text(text) 33 bannerWrapper.addClass('active'); 34 35 window.timeoutId = setTimeout(() => { 36 undoMessage() 37 }, 50000000); 38 39 return bannerWrapper; 40 } 41} 42 43$('.custom_alert_banner__close').on('click', function () { 44 undoMessage() 45}); 46 47function undoMessage() { 48 let bannerWrapper = $(".custom_alert_banner__content"); 49 bannerWrapper.removeClass('active'); 50 bannerWrapper.find('.custom_alert_banner__url').remove(); 51}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.