1/** 2 * @file 3 * Main JavaScript file for Dismiss module. 4 */ 5 6(function ($, Drupal) { 7 /** 8 * Add the dismiss icon to the message list. 9 */ 10 Drupal.behaviors.dismiss = { 11 attach(context, settings) { 12 // Prepend the Dismiss button to each message box. 13 $('.messages').each(function () { 14 const flag = $(this).children().hasClass('dismiss'); 15 if (!flag) { 16 $(this).prepend( 17 '<button class="dismiss"><span class="element-invisible"></span></button>', 18 ); 19 } 20 }); 21 // When the Dismiss button is clicked hide this set of messages. 22 $('.dismiss').click(function (event) { 23 $(this).parent().hide('fast'); 24 // In case this message is inside a form, prevent form submission. 25 event.preventDefault(); 26 }); 27 }, 28 }; 29})(jQuery, Drupal);
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.