PageSourceSearch

https://new.stat.gov.pl/modules/custom/gus_icons/js/gus-icons.js?tltcfa

js stat.gov.pl collected 2026-09-24 08:06:26 UTC 856 bytes, 29 lines download raw bytes

1(function ($) {
2    triggerSelect2();
3
4    function triggerSelect2() {
5        let selector = '.field--type-gus-icons select:not(.select2-hidden-accessible)';
6        if($(selector).length){
7            $(selector).each((i, e) => {
8                $(e).select2({
9                    width: '100%',
10                    dropdownAutoWidth: true,
11                    dropdownParent: $(e).parent(),
12                    templateResult: formatIcon,
13                    templateSelection: formatIcon
14                });
15            });
16        }
17    }
18
19    function formatIcon (icon) {
20        let string = '<span>';
21        string += icon.id? `<i class="${icon.id}" aria-hidden="true"></i>` : '';
22        string += icon.text+'</span>';
23        return $(string);
24    };
25
26    $(document).on("ajaxComplete", function() {
27        triggerSelect2();
28    });
29})(jQuery);

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.