1function _toConsumableArray(arr) { 2 if (Array.isArray(arr)) { 3 const arr2 = Array(arr.length); 4 for (let i = 0; i < arr.length; i++) { 5 arr2[i] = arr[i]; 6 } 7 return arr2; 8 } 9 return Array.from(arr); 10} 11 12(function (Drupal) { 13 Drupal.behaviors.flagAttach = { 14 attach: function attach(context) { 15 const links = [].concat( 16 _toConsumableArray(context.querySelectorAll('.flag a')), 17 ); 18 links.forEach(function (link) { 19 return link.addEventListener('click', function (event) { 20 return event.target.parentNode.classList.add('flag-waiting'); 21 }); 22 }); 23 }, 24 }; 25 26 Drupal.AjaxCommands.prototype.actionLinkFlash = function ( 27 ajax, 28 response, 29 status, 30 ) { 31 if (status === 'success') { 32 if (response.message.length) { 33 const para = document.createElement('P'); 34 para.innerText = response.message; 35 36 para.setAttribute('class', 'js-flag-message'); 37 38 para.addEventListener( 39 'animationend', 40 function (event) { 41 return event.target.remove(); 42 }, 43 false, 44 ); 45 46 document.querySelector(response.selector).appendChild(para); 47 } 48 } else { 49 const links = [].concat( 50 _toConsumableArray(document.querySelectAll('.flag-waiting')), 51 ); 52 links.forEach(function (link) { 53 return link.classList.remove('flag-waiting'); 54 }); 55 } 56 }; 57})(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.