PageSourceSearch

https://www1.tri-rail.com/assets/js/app/app-alerts.js

js tri-rail.com collected 2026-10-02 05:45:58 UTC 1,963 bytes, 51 lines download raw bytes

1$(function () {
2
3    var alerts = [];
4
5    var url = App.apiBaseUrl + '/api/alerts/get-active-alerts';
6
7    function success(alerts) {
8        if (alerts === null) return;
9
10        var alertsHtml = "";
11        var alertColor = App.colors.orange;
12        for (var i = 0; i < alerts.length; i++) {
13            var alert = alerts[i][0];
14            if (alert === null) return;
15
16            if (alert.color && alert.color.length > 3) {
17                alertColor = alert.color;
18            }
19
20            alertsHtml = alertsHtml + '<div class="colored-alert-banner__wrap"><div class="container"><div class="colored-alert-banner">'
21                + '<marquee><i class="alert-icon fa fa-bell" style="color: #fff; font-size: 1.3em;"></i>';
22
23            if (alert.actionUrl) {
24                alertsHtml = alertsHtml + '<a href="' + alert.actionUrl + '" class="colored-alert-banner--text" target="_blank">'
25                    + '<strong>' + alert.title + '</strong> '
26                    + alert.body + '</a>';
27            } else {
28                alertsHtml = alertsHtml + '<div class="colored-alert-banner--text">'
29                    + '<strong>' + alert.title + '</strong> '
30                    + alert.body + '</div>';
31            }
32
33            alertsHtml = alertsHtml + '</marquee></div></div><button class="colored-alert-banner--close"><i class="fa fa-times "></i></button></div>';
34        }
35
36        $('#app-alerts').replaceWith(alertsHtml);
37        $('.colored-alert-banner__wrap').css('background-color', App.colors[alertColor]);
38    }
39
40    $.ajax({
41        dataType: "json",
42        url: url,
43        data: alerts,
44        success: success,
45        error: function (xhr, ajaxOptions, thrownError) {
46            if (xhr.responseText === undefined)
47                console.log('The "Alerts" API Service is currently unavailable.  Please try again later or contact customer service.');
48        }
49    });
50
51}());

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.