PageSourceSearch

https://fcmetz.com/js/Views/Calendar/CalendarItems.js?v=tVke79omqj8FmtnwRu_723yM5-V9W0xSH9pb-vJhXtk

js fcmetz.com collected 2026-10-02 04:11:00 UTC 2,490 bytes, 64 lines download raw bytes

1Views.Calendar.CalendarItems = class extends Views.Page {
2    constructor() {
3        super();
4        this.init();
5    }
6
7    init() {
8        if (document.readyState === 'loading') {
9            document.addEventListener('DOMContentLoaded', () => this.addBehaviorsToLightboxes());
10        } else {
11            this.addBehaviorsToLightboxes();
12        }
13    }
14
15    addBehaviorsToLightboxes() {
16        const $calendarContainer = $('.calendar-container');
17        const $lightboxes = $calendarContainer.find('.grid-item-lightbox');
18
19        $calendarContainer.find('.calendar-container-item .button-lightbox').each((index, button) => {
20            const $lightbox = $lightboxes.eq(index);
21
22            $(button).on('click', () => {
23                const typeItem = $(button).data('type-item');
24                this.open($lightbox, typeItem);
25
26                const $closeButton = $lightbox.find('.grid-item-lightbox-button-close');
27                $closeButton.on('click', (e) => this.close(e, $lightbox));
28                $(document).on('keydown', (e) => { if (e.key === 'Escape') this.close(e, $lightbox); });
29            });
30        });
31
32        $('.grid-item-lightbox-button-url').off('click').on('click', function (e) {
33            e.stopPropagation();
34            window.location.href = $(this).attr('href');
35        });
36    }
37
38    open($lightbox, typeItem) {
39        if ($lightbox.length) {
40            const $content = $lightbox.find('.lightbox-content');
41            if ($content.is(':empty')) {
42                Utils.fetch($content, `/${Utils.getLanguageFromUrl()}/${typeItem}/_GetLightboxContent`, {
43                    body: JSON.stringify({ webPageId: parseInt($content.data('web-page-id'), 10) || 0 }),
44                    loaderId: $lightbox.find(`#articles-lightbox-loader`),
45                    action: (r) => { $content.replaceWith(r); }
46                });
47            }
48            $lightbox.css('display', 'flex');
49            setTimeout(() => $lightbox.addClass('visible'), 10);
50            Utils.disableScrolling();
51        }
52    }
53
54    close(event, $lightbox) {
55        if ($lightbox.length) {
56            event.stopPropagation();
57            const $video = $lightbox.find('video');
58            if ($video.length) $video[0].pause();
59            $lightbox.removeClass('visible');
60            setTimeout(() => $lightbox.css('display', 'none'), 200);
61            Utils.enableScrolling();
62        }
63    }
64};

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.