PageSourceSearch

https://racingmuseum.org/sites/all/modules/contrib/site_alert/site_alert.js?tfp3c2

js racingmuseum.org collected 2026-10-02 05:36:34 UTC 919 bytes, 37 lines download raw bytes

1/**
2 * Contains javascript to refresh alert div contents.
3 *
4 * @file site_alert.js
5 */
6
7(function ($) {
8
9var basePath;
10
11  Drupal.behaviors.siteAlert = {
12    attach: function(context, settings) {
13      basePath = settings.basePath;
14      loadAlert($('.site-alert', context));
15    }
16  };
17
18  // Function to update alert text.
19  var loadAlert = function (siteAlert) {
20    var callback = basePath + 'ajax/site_alert';
21
22    // Object contains information about the currently loaded theme for
23    // processing by our theme callback. Without it the default theme is always
24    // assumed.
25    var options = {
26      ajax_page_state: Drupal.settings.ajaxPageState
27    };
28    siteAlert.load(callback, options);
29
30    // Update content at configured interval.
31    if (Drupal.settings.siteAlert.timeout > 0) {
32      setTimeout(function() { loadAlert(siteAlert) }, Drupal.settings.siteAlert.timeout * 1000);
33    }
34
35  }
36
37})(jQuery);

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.