1/** 2 * @file 3 * Add support for Better Exposed Filters integration. 4 */ 5(function (Drupal, once) { 6 'use strict'; 7 8 function applyChosenBef(select) { 9 const chosenContainer = select.nextElementSibling; 10 if (chosenContainer && chosenContainer.classList.contains('chosen-container')) { 11 const chosenSearchInput = chosenContainer.querySelector('.chosen-search-input'); 12 if (chosenSearchInput) { 13 chosenSearchInput.setAttribute('data-bef-auto-submit-exclude', 'true'); 14 } 15 } 16 } 17 18 Drupal.behaviors.chosenBef = { 19 attach: function (context, settings) { 20 once('chosenBef', 'select', context).forEach(function (select) { 21 if ( 22 select.nextElementSibling && 23 select.nextElementSibling.classList.contains('chosen-container') 24 ) { 25 applyChosenBef(select); 26 } else { 27 select.addEventListener('chosen:ready', function () { 28 applyChosenBef(select); 29 }); 30 } 31 }); 32 }, 33 }; 34})(Drupal, once);
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.