PageSourceSearch

https://bronnaya.ru/wp-content/themes/bronnayaTheme/js/shabat.js?ver=7.1.3

js bronnaya.ru collected 2026-10-07 02:07:52 UTC 2,395 bytes, 52 lines download raw bytes

1var formatShortDate = function(str) {
2    var monthNames = [
3    "January", "February", "March",
4    "April", "May", "June", "July",
5    "August", "September", "October",
6    "November", "December"
7    ];
8    var yearStr = str.substr(0,4);
9    var monthStr = str.substr(5,2);
10    var dayStr = str.substr(8,2);
11    var month = (+monthStr) - 1;
12    return dayStr + ' ' + monthNames[month] + ' ' + yearStr;
13};
14var formatHebcalShabbatEvents = function(response) {
15    if (typeof response === 'object' && response.items && response.items.length) {
16        var arr = response.items.map(function(x) {
17            if (typeof x === 'object' && typeof x.category === 'string') {
18                if (x.category === 'parashat') {
19                // return 'Torah portion: <a href="' + x.link + '?utm_source=shabbat1c&amp;utm_medium=wp">' + x.title + '</a>';
20                return 'ШАБАТ - ' + x.title + '';
21                } else if (x.category === 'candles') {
22                    return x.title.replace('Зажигание свечей:', '<i class="shabat_candle"></i>');
23                } else if (x.category === 'havdalah') {
24                    havdalah = x.title.replace('Авдала:', '<i class="shabat_stars"></i>');
25                    return havdalah.replace(/\s+\(\d+ min\)/, '');
26                } else {
27                    var dateStr = formatShortDate(x.date),
28                        str = x.title;
29                    if (typeof x.link === 'string') {
30                        str = x.title;
31                        // str = '<a href="' + x.link + '?utm_source=shabbat1c&amp;utm_medium=wp">' + x.title + '</a>';
32                    }
33                    // return str + ' on ' + dateStr;
34                }
35            }
36        });
37        arr = arr.filter(function(n){ return n != undefined });
38        return arr;
39    }
40    return [];
41};
42
43jQuery.ajax({
44url: "https://www.hebcal.com/shabbat/?cfg=json&geonameid=524901&M=on&lg=ru",
45cache: true
46}).done(function(data) {
47    // var h3 = typeof data.title === 'string' ? '<p class="lead">' + data.title + '</p>' : '';
48    var hebcalEvents = formatHebcalShabbatEvents(data);
49    var html = hebcalEvents.map(function(x) { return '<li>' + x + '</li>'; }).join('');
50// jQuery('.hebcal-524901').html(h3 + '<ul class="hebcal-results">' + html + '</ul>');
51    jQuery('.hebcal-524901').html('<ul class="hebcal-results">' + html + '</ul>');
52});

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.