PageSourceSearch

https://www.blm.gov/modules/contrib/better_exposed_filters/js/bef_reset_ajax.js?tlu9fw

js blm.gov collected 2026-09-24 06:23:37 UTC 788 bytes, 26 lines download raw bytes

1/**
2 * @file
3 * bef_reset_ajax.js
4 *
5 * Handles reset button behavior when AJAX is enabled for BEF.
6 */
7
8(function (Drupal, once) {
9
10  /**
11   * Handles reset button clicks to properly clear URL parameters with AJAX.
12   */
13  Drupal.behaviors.befResetAjax = {
14    attach: function (context) {
15      // Match any reset button in views exposed forms.
16      once('bef-reset-ajax', 'form.views-exposed-form input[name="reset"], form.views-exposed-form button[name="reset"]', context).forEach(function (resetButton) {
17        resetButton.addEventListener('click', function (e) {
18          e.stopImmediatePropagation();
19          // Navigate to the clean URL.
20          window.location.href = window.location.origin + window.location.pathname;
21        });
22      });
23    }
24  };
25
26})(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.