PageSourceSearch

https://genuss-guide.net/modules/custom/ep_search/js/ep_search.js?tltmr4

js genuss-guide.net collected 2026-09-26 13:06:17 UTC 1,246 bytes, 31 lines download raw bytes

1/**
2 * @file
3 * Main js file for ep_search module.
4 */
5(function ($, Drupal) {
6    Drupal.behaviors.ep_search = {
7        attach: function (context, settings) {
8            // Make send button disabled and only allow submit if text exists.
9            var formTopSearch = '#form-search-top-bar ';
10            var searchSubmit = $(formTopSearch + '.form-submit ');
11
12            searchSubmit.attr('disabled', 'disabled');
13            $(formTopSearch + 'input[name="search_input"]', context).keyup(function (e) {
14                searchSubmit.attr('disabled', 'disabled');
15                if (($(this).val().trim()).length) {
16                    searchSubmit.attr('disabled', false);
17                }
18            });
19            $(formTopSearch + 'input[name="search_input"]', context).on('paste', function () {
20                searchSubmit.attr('disabled', 'disabled');
21                var that = this;
22                setTimeout(function() {
23                    // gets the copied text after a specified time (100 milliseconds)
24                    if (($(that).val().trim()).length) {
25                        searchSubmit.attr('disabled', false);
26                    }
27                }, 100);
28            });
29        }
30    };
31})(jQuery, 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.