PageSourceSearch

https://stiftung-forum-recht.de/wp-content/themes/neve-child/assets/js/sfr.js?ver=1790341786

js stiftung-forum-recht.de collected 2026-10-02 15:11:31 UTC 2,288 bytes, 52 lines download raw bytes

1
2jQuery(window).on('load', function () {
3    var $ = jQuery;
4
5    //let lastFocused = null;
6    let currentFocused = document.activeElement;
7
8    $(document).on('focusin focusout', function() {
9        //lastFocused = currentFocused;
10        currentFocused = document.activeElement;
11    });
12
13    $('.premium-mega-nav-item.menu-item-has-children').on('keydown', '.premium-menu-link.premium-menu-link-parent', function(e) {
14        let key = e.which || e.keyCode;
15
16        if (key == 32 || key == 13) { // space/enter -> show menu
17            e.preventDefault();
18            e.delegateTarget.classList.add('premium-item-hovered');
19            setTimeout(() => $(e.delegateTarget).find('.premium-mega-content-container').find(`[href="${e.currentTarget.href}"]`)[0].focus(), 300);
20        }
21    }).on('keydown', '.premium-mega-content-container', function(e) {
22        let key = e.which || e.keyCode;
23
24        if (key == 27) { // esc -> hide menu (focus element outside menu)
25            e.preventDefault();
26            e.delegateTarget.children[0].focus();
27        }
28    }).on('focusout', '.premium-mega-content-container', function(e) {
29        if ($(e.currentTarget).is(':focus-within')) return;
30        let focusables = $(e.currentTarget).find(':focusable');
31
32        if (focusables.last().is(currentFocused)) $('.premium-nav-menu-container .premium-menu-link.premium-menu-link-parent').last()[0].focus();
33        else if (focusables.first().is(currentFocused)) $('.premium-nav-menu-container .premium-menu-link.premium-menu-link-parent')[0].focus();
34        e.delegateTarget.classList.remove('premium-item-hovered');
35    });
36
37    (new MutationObserver((mutations) => {
38        $('.df-ui-btn:not(:has(:focusable), [tabindex="0"])').attr('tabindex', 0);
39        $('.df-ui-btn:not(:has(:focusable)).disabled').attr('tabindex', '-1');
40    })).observe(document.body, { childList: true, subtree: true });
41    
42    $(document).on('keydown', '.df-ui-btn[tabindex="0"]', function(e) {
43        let key = e.which || e.keyCode;
44
45        if (key == 13) { // enter -> trigger click
46            $(e.currentTarget).trigger('click');
47            console.log(e.currentTarget)
48        }
49    });
50
51    $('#pojo-a11y-skip-content').attr('tabindex', 0);
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.