1(function ($, Drupal, once, drupalSettings) { 2 'use strict'; 3 4 Drupal.behaviors.osggSiteSearchFacetsFallback = { 5 attach: function (context) { 6 if (!drupalSettings.facets_views_ajax) { 7 return; 8 } 9 10 Object.entries(drupalSettings.facets_views_ajax).forEach(function ([facetId, settings]) { 11 if (settings.view_id !== 'site_search' || settings.current_display_id !== 'block_1') { 12 return; 13 } 14 15 const widgets = once('osgg-site-search-facet-fallback-' + facetId, '[data-drupal-facet-id="' + facetId + '"].js-facets-widget', context); 16 17 if (!widgets.length) { 18 return; 19 } 20 21 window.setTimeout(function () { 22 $(widgets) 23 .off('facets_filter.facets') 24 .on('facets_filter.facets', function (_event, url) { 25 window.location = url; 26 }); 27 }, 0); 28 }); 29 } 30 }; 31})(jQuery, Drupal, once, drupalSettings);
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.