PageSourceSearch

https://www.brzesko.pl/templates/Front/umbrzesko/assets/js/wcag.js

js brzesko.pl collected 2026-10-02 03:13:24 UTC 2,396 bytes, 96 lines download raw bytes

1
2window.onload = function () {
3    let wcag = sessionStorage.getItem('wcag');
4
5    if(wcag) {
6        $('body').addClass(wcag);
7
8        console.log($(`.wcag a`));
9        $(`.wcag a#${wcag}`).addClass('active');
10    }
11};
12
13let classes = [];
14
15function setStorage (wcagClass) {
16    if($('body').hasClass(wcagClass)) sessionStorage.setItem('wcag', wcagClass);
17    else sessionStorage.setItem('wcag', '');
18}
19
20$('.wcag li').click(function (e) {
21
22    const id = $(this).find('a')[0].id;
23
24    switch(id) {
25        case 'accesibilityparagraphspacing':
26            $('body').toggleClass('a-paragraph');
27
28            setStorage('a-paragraph');
29            break;
30
31        case 'accesibilitylinesspacing':
32            let wcagClass = 'a-lines';
33
34            setStorage('a-lines');
35            break;
36
37        case 'accesibilitywordsspacing':
38            $('body').toggleClass('a-word');
39
40            setStorage('a-word');
41            break;
42
43        case 'accesibilityletterspacing':
44            $('body').toggleClass('a-letter');
45
46            setStorage('a-letter');
47
48            break;
49        case 'accesibilityfontnormal':
50            $('body').removeClass(['fbig', 'fbigger']);
51            sessionStorage.setItem('wcag', '');
52            break;
53
54        case 'accesibilityfontbig':
55            $('body').removeClass('fbigger');
56            $('body').toggleClass('fbig');
57
58            setStorage('fbig');
59
60            break;
61        case 'accesibilityfontbigger':
62            $('body').removeClass('fbig');
63            $('body').toggleClass('fbigger');
64
65            setStorage('fbigger');
66            break;
67        case 'accesibilityhc':
68            $('body').toggleClass('hc');
69            setStorage('hc');
70
71            // $('img').replaceWith(function() {
72            //     return $(this).prop('alt');
73            // });
74            break;
75        default:
76        // code block
77    }
78});
79//
80// window.onbeforeunload = popup;
81//
82// function popup() {
83//     return 'I see you are leaving the site';
84// }
85// $(document).ready(function () {
86//
87//     $('ul.dropdown.menu li a').focus(function () {
88//         console.log('focus');
89//
90//         $('ul.dropdown.menu').removeClass('js-dropdown-active');
91//         $(this).closest('ul.dropdown.menu').addClass('js-dropdown-active');
92//
93//     });
94// });
95
96

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.