PageSourceSearch

https://www.bialystok.pl/projects/bialystok/js/top-buttons-portal.js

js www.bialystok.pl collected 2026-10-02 03:02:30 UTC 3,573 bytes, 111 lines download raw bytes

1$(document).ready(function() {
2    // -- high-contrast version ( width cookies ) -- //
3    var getContrast = 0;
4
5    if( $.cookie("highcontrast") ) { // check if cookie exists
6      var getContrast = $.cookie("highcontrast");
7      if ( getContrast == 1) {
8          jQuery('body').addClass('high-contrast');
9      }
10      else{
11          jQuery('body').removeClass('high-contrast');
12      }
13    }
14    else {
15        $.cookie("highcontrast", 0, { path: '/' });
16        var getContrast = $.cookie("highcontrast");
17    }
18
19    jQuery('.btn-contrast').click( function() {
20        if ( getContrast == 0 ) {
21            getContrast = 1;
22            jQuery('body').addClass('high-contrast');
23            //jQuery('body').css('font-size', '16px');
24        }
25        else {
26            getContrast = 0;
27            jQuery('body').removeClass('high-contrast');
28            jQuery('body').css('font-size', bodyDefaultSize);
29        }
30        $.cookie("highcontrast", getContrast, { path: '/' });
31        //checkMasonry('#fluid-box, #fluid-box2');
32    });
33
34    // -- font-resize function -- //
35
36    // px2em's convertation
37    toEm(jQuery('.font-fluid'));
38
39    // default body font-size for size-reset button
40    var bodyDefaultSize = jQuery('body').css('font-size');
41    $( window ).resize(function() {
42        jQuery('.font-fluid').css({
43            "font-size": "",
44            "line-height": ""
45        });
46        toEm(jQuery('.font-fluid'));
47    });
48
49    // font-size decrease
50    $('#font-size-small-btn').click(function() {
51        currentSize = parseInt($('body').css('font-size')) - 1;
52        if(currentSize >= 9) {
53            $('body').css('font-size', currentSize);
54            //checkMasonry('#fluid-box, #fluid-box2');
55        }
56    });
57
58    // font-size reset to defaults
59    $('#font-size-medium-btn').click(function() {
60        $('body').css('font-size', bodyDefaultSize);
61        //checkMasonry('#fluid-box, #fluid-box2');
62    });
63
64    // font-size increase
65    $('#font-size-large-btn').click(function() {
66        currentSize = parseInt($('body').css('font-size')) + 2;
67        if(currentSize <= 18) {
68            $('body').css('font-size', currentSize);
69            //checkMasonry('#fluid-box, #fluid-box2');
70        }
71    });
72
73    // check if masonry grid block are exist
74    /*function checkMasonry(masonrySelector) {
75        if ( masonrySelector.length ) {
76            var container = document.querySelector(masonrySelector);
77            var msnry = new Masonry( container, {
78                itemSelector: '.item',
79                columnWidth: container.querySelector('.grid-sizer')
80            });
81            msnry.layout();
82        }
83    }*/
84
85
86    // detect if we have calendar
87
88    /*if ( jQuery ('.component-calendarium').length ) {
89        checkMasonry('#fluid-box, #fluid-box2');
90    }*/
91
92    // -- let's convent everything to em :)
93    function toEm(input) {
94        jQuery(input).each( function() {
95            // font-size
96            var inputSize = parseFloat(jQuery(this).css("font-size"));
97            var emSize    = parseFloat($("body").css("font-size"));
98
99            // line-height
100            var inputLineHeight = parseFloat(jQuery(this).css("line-height"));
101            var emLineHeight    = parseFloat($("body").css("line-height"));
102
103            var sizeResult    = (inputSize / emSize) + 'em';
104            var lineResult    = (inputLineHeight / inputSize) + 'em';
105            jQuery(this).css('font-size', sizeResult);
106            jQuery(this).css('line-height', lineResult);
107        });
108    }
109
110    // -- /font-resize function -- //
111});

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.