1/** 2 * Handles dismissible notices from the Notice block. 3 */ 4 5document.addEventListener( 'DOMContentLoaded', function() { 6 7 var notices = document.querySelectorAll('.qb-block-notice.qb-dismissable[data-id]' ); 8 9 notices.forEach( function( element ) { 10 11 var uid = element.getAttribute( 'data-id' ); 12 13 if ( ! localStorage.getItem('notice-' + uid ) ) { 14 element.style.display = 'block'; 15 } 16 17 var dismissible = element.querySelector( '.qb-notice-dismiss' ); 18 19 if ( dismissible ) { 20 dismissible.addEventListener( 'click', function( event ) { 21 event.preventDefault(); 22 localStorage.setItem( 'notice-' + uid, '1' ); 23 element.style.display = ''; 24 } ); 25 } 26 } ); 27} );
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.