<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var mod_pagespeed_L2DxnQM8fC = "function _audioPlayer(is_live = false) {\n\n    var obj = this;\n\n    this.is_live = is_live;\n\n    this.HTML_box = $(\".player_section_content\");\n    this.HTML_player = $(this.HTML_box).find(\"video\");\n    if(this.HTML_player.length==1) {\n        this.HTML_player = $(this.HTML_player)[0];\n    }\n    else {\n        this.HTML_player = null;\n    }\n    this.HTML_play_stop_btn = $(this.HTML_box).find(\".play_pause_player\");\n\n    this.HTML_twenty_seconds_btn = $(this.HTML_box).find(\".twenty_second_btn\");\n    this.HTML_podcast_time_box = $(this.HTML_box).find(\".podcast_time\");\n\n    this.HTML_progress_bar_box = $(this.HTML_box).find(\".track\");\n    this.HTML_progress_bar_bar = $(this.HTML_progress_bar_box).find(\".player_progress_bar\");\n    this.HTML_progress_bar_bar_progress = $(this.HTML_progress_bar_box).find(\".current_value\");\n    this.progress_bar_obj = null;\n\n    this.HTML_volume_box = $(this.HTML_box).find(\".volume\");\n    this.HTML_volume_bar = $(this.HTML_volume_box).find(\".player_progress_bar\");\n    this.HTML_volume_bar_progress = $(this.HTML_volume_bar).find(\".current_value\");\n    this.HTML_volume_mute_unmute_btn = $(this.HTML_volume_box).find(\".vol_btn\");\n    this.volume_bar_obj = null;\n\n    this.is_play = false;\n    this.is_autoplay = false;\n    this.is_first_open = false;\n    this.volume = 100;\n    this.play_interval = null;\n    this.interval_check_player_is_play = null;\n\n    this.touched = false;\n\n    this.duration = 0;\n\n    this.spinner_icon = `&lt;svg class=\"spinner orange_spinner\" &gt;&lt;circle class=\"path\" cx=\"50%\" cy=\"50%\" r=\"40%\" fill=\"none\" stroke-width=\"3\"&gt;&lt;/circle&gt;&lt;/svg&gt;`;\n\n    this.init = function() {\n        if(obj.HTML_player) {\n\n            // $(\".player_progress_bar\").css('height','20px');\n            // $(\".player_progress_bar .current_value\").css('height','20px');\n\n            obj.isAutoplayed();\n            obj.isFirstOpen();\n            obj.playPauseEvents();\n            obj.progressBarEvents();\n            obj.volumeEvents();\n            obj.twentySecondsEvents();\n            obj.onFinishEvent();\n            obj.setTimeOnPlayer();\n            obj.mediaIsAutoPlayedEvent();\n        }\n    }\n\n    this.isFirstOpen = function () {\n        if ($(obj.HTML_player).data('first_open') == '1') {\n            obj.is_first_open = true;\n        }\n    }\n    this.isAutoplayed = function () {\n        if (obj.HTML_player.hasAttribute('autoplay') ) {\n            obj.is_autoplay = true;\n        }\n    }\n    this.mediaIsAutoPlayedEvent = function () {\n        const isChrome = !!window.chrome &amp;&amp; (!!window.chrome.webstore || !!window.chrome.runtime);\n\n        if (obj.is_autoplay &amp;&amp; isChrome) {\n            obj.setActionOnPlayPauseButton(obj.HTML_play_stop_btn);\n        } else if(obj.is_autoplay) {\n            obj.setActionOnPlayPauseButton(obj.HTML_play_stop_btn);\n        }\n    }\n\n    this.playPauseEvents = function() {\n        $(obj.HTML_play_stop_btn).click(function(){\n           obj.setActionOnPlayPauseButton(this);\n        });\n    }\n\n    this.setActionOnPlayPauseButton = function (button_obj) {\n        $(button_obj).toggleClass('active')\n        if($(button_obj).hasClass('active')){\n            $(button_obj).find('.sr-only').text('zatrzymaj odtwarzanie')\n        }else{\n            $(button_obj).find('.sr-only').text(' odtwĂłrz')\n        }\n        if(!obj.is_play) {\n            obj.play();\n        }\n        else {\n            obj.touched = true;\n            obj.pause();\n        }\n    }\n\n    this.twentySecondsEvents = function () {\n        $(obj.HTML_twenty_seconds_btn).click(function () {\n            obj.touched = true;\n            if ($(this).hasClass('p_btn2')) {\n                obj.HTML_player.currentTime -= 20;\n            }\n            if ($(this).hasClass('p_btn4')) {\n                let tmp_current_time = obj.HTML_player.currentTime+20;\n                if(tmp_current_time&gt;obj.duration) {\n                    tmp_current_time = obj.duration;\n                }\n                obj.HTML_player.currentTime = tmp_current_time;\n            }\n        });\n    }\n\n    this.progressBarEvents = function() {\n        obj.progress_bar_obj = new _progresBar(this.HTML_progress_bar_bar, this.HTML_progress_bar_bar_progress, function(percent){\n            obj.touched = true;\n            obj.HTML_player.currentTime = (obj.duration*(percent/100));\n            if(obj.is_play) {\n                obj.play();\n            }\n        });\n    }\n\n    this.play = function() {\n        obj.HTML_player.play();\n        obj.HTML_play_stop_btn.append(obj.spinner_icon);\n        if(obj.is_live)\n            $(obj.HTML_podcast_time_box).text('NawiÄzuje poĹÄczenie z serwerem');\n        obj.interval_check_player_is_play = setInterval(function () {\n            if (obj.HTML_player.currentTime != 0) {\n                obj.runPlayer();\n            };\n        },10);\n    }\n\n    this.runPlayer = function () {\n        obj.HTML_play_stop_btn.find('svg').remove();\n        clearInterval(obj.interval_check_player_is_play);\n        if(!obj.duration) {\n            if(!obj.is_live) {\n                obj.duration = obj.HTML_player.duration;\n            }\n            else {\n                obj.durationInterval();\n            }\n        }\n        $(obj.HTML_play_stop_btn).addClass(\"pause_btn3\").removeClass(\"p_btn3\");\n        obj.is_play = true;\n\n        obj.play_interval = setInterval(function(){\n            let percent = obj.HTML_player.currentTime/obj.duration*100;\n            if(obj.is_live&amp;&amp;!obj.touched) {\n                percent = 100;\n            }\n            obj.progress_bar_obj.updateProgress(percent);\n            obj.setTimeOnPlayer();\n        },10);\n    }\n\n    this.pause = function() {\n        obj.touched = true;\n        obj.HTML_player.pause();\n        $(obj.HTML_play_stop_btn).removeClass(\"pause_btn3\").addClass(\"p_btn3\");\n        obj.is_play = false;\n\n        clearInterval(obj.play_interval);\n    }\n\n    this.volumeEvents = function() {\n        obj.volume_bar_obj = new _progresBar(this.HTML_volume_bar, this.HTML_volume_bar_progress, function(percent){\n            obj.setVolumeLevel(percent);\n        });\n        obj.volume_bar_obj.updateProgress(100);\n\n        $(obj.HTML_volume_mute_unmute_btn).click(function(){\n            if(obj.HTML_player.volume==0) {\n                obj.setVolumeLevel(100);\n                $(obj.HTML_volume_mute_unmute_btn).children(\".volume_icon\").attr('src', '/img/volume_normal.svg').attr('alt', 'wycisz');\n            }\n            else {\n                obj.setVolumeLevel(0);\n                $(obj.HTML_volume_mute_unmute_btn).children(\".volume_icon\").attr('src', '/img/volume_mute.svg').attr('alt', 'wĹÄcz gĹos');\n            }\n        });\n\n    }\n\n    this.setVolumeLevel = function(level) {\n        if(level&lt;0) {\n            level = 0;\n        }\n        else if(level&gt;100) {\n            level = 100;\n        }\n        if(level&gt;0) {\n            level = level/100;\n        }\n        obj.HTML_player.volume = level;\n    }\n\n    this.onFinishEvent = function() {\n        obj.HTML_player.addEventListener('ended',function(){\n            obj.pause();\n        });\n    }\n\n    this.setTimeOnPlayer = function() {\n        $(obj.HTML_podcast_time_box).css(\"opacity\",1);\n        let currentTime = obj.HTML_player.currentTime;\n        let duration = obj.duration;\n        let text = `${this.calculateSecondsToTime(currentTime)} / ${this.calculateSecondsToTime(duration)}`;\n        if(obj.is_live) {\n            if (obj.touched)\n                text = (currentTime.toFixed(4) / duration.toFixed(4) &gt;= 0.95) ? ' NA ĹťYWO' : text;\n            else\n                text = ' NA ĹťYWO';\n        }\n        $(obj.HTML_podcast_time_box).text(text);\n    }\n\n    this.calculateSecondsToTime = function(seconds) {\n        if (isNaN(seconds)) {\n            return '00:00'\n        }\n        let hour = Math.floor(seconds / 3600);\n        let minute = Math.floor((seconds % 3600) / 60);\n        let second = Math.floor(seconds % 60);\n        let time = '';\n\n        time += this.convertTimeToString(hour,true);\n        time += this.convertTimeToString(minute,true,true);\n        time += this.convertTimeToString(second,false,true);\n\n        return time;\n    }\n\n    this.convertTimeToString = function(time, show_dot = false,show_if_zero = false) {\n        let result = '';\n        if(time != 0) {\n            if(time.toString().length === 1) {\n                if(!show_dot) {\n                    result += `0${time}`;\n                } else {\n                    result += `0${time}:`;\n                }\n            } else {\n                if(!show_dot) {\n                    result += `${time}`;\n                } else {\n                    result += `${time}:`;\n                }\n            }\n        }else {\n            if (show_if_zero) {\n                if(!show_dot) {\n                    result += `00`;\n                } else {\n                    result += `00:`;\n                }\n            } else {\n                result += ``;\n            }\n\n        }\n        return result;\n    }\n\n    this.durationInterval = function() {\n        setInterval(function(){\n            obj.duration+=0.01;\n        },10);\n    }\n\n    $(obj.init());\n\n}\n\nfunction _progresBar(parent, progres, update_progress_event) {\n\n    let obj = this;\n\n    this.HTML_parent = parent;\n    this.HTML_progres = progres;\n\n    this.update_progress_event = update_progress_event;\n    this.percent_progres_percent = 0;\n\n    this.mouse_move_on = false;\n\n    this.init = function() {\n        obj.mouseMoveOnBarEvent();\n    }\n\n    this.mouseMoveOnBarEvent = function() {\n        $(obj.HTML_parent).mousedown(function(e){\n            obj.updatePositionByMousePosition(e);\n            obj.mouse_move_on = true;\n        });\n\n        $(obj.HTML_parent).on('click mousemove',function(e){\n            if(obj.mouse_move_on) {\n                obj.updatePositionByMousePosition(e);\n            }\n        });\n\n        $(\"body\").mouseup(function(){\n            obj.mouse_move_on = false;\n        });\n    }\n\n    this.updatePositionByMousePosition = function(e) {\n        this.percent_progres_percent = (e.offsetX/$(obj.HTML_parent).width())*100;\n        this.updateProgresBarWidth();\n    }\n\n    this.updateProgresBarWidth = function() {\n        obj.update_progress_event(obj.percent_progres_percent);\n        obj.updateProgresBarWidthDisplay();\n    }\n\n    this.updateProgresBarWidthDisplay = function() {\n        $(obj.HTML_progres).css({'width':obj.percent_progres_percent+\"%\"});\n    }\n\n    this.updateProgress = function(percent) {\n        obj.percent_progres_percent = percent;\n        obj.updateProgresBarWidthDisplay();\n    }\n\n    obj.init();\n\n}\n";
var mod_pagespeed_McyP94_aDa = "function _textAudioPlayer(audio_player){\n    var obj = this;\n\n    this.HTML_frame = $('&lt;div class=\"text_player\"&gt;' +\n        '    &lt;div class=\"text_player_play_content\"&gt;' +\n        '        &lt;div&gt;' +\n        '            &lt;div class=\"play_btn_holder\"&gt;' +\n        '                &lt;button class=\"text_player_btn\"&gt;&lt;span class=\"sr-only\"&gt;odtwĂłrz&lt;/span&gt;&lt;/button&gt;' +\n        '            &lt;/div&gt;&lt;div class=\"play_time\"&gt;' +\n        '                &lt;p&gt;00:00 / 00:00&lt;/p&gt;' +\n        '            &lt;/div&gt;' +\n        '        &lt;/div&gt;' +\n        '    &lt;/div&gt;&lt;div class=\"text_player_progress\"&gt;' +\n        '        &lt;div class=\"progress_bar\"&gt;' +\n        '            &lt;div class=\"progress_point\"&gt;' +\n        '' +\n        '            &lt;/div&gt;' +\n        '        &lt;/div&gt;' +\n        '    &lt;/div&gt;&lt;div class=\"text_player_volume\"&gt;' +\n        '        &lt;div&gt;' +\n        '            &lt;button class=\"vol_btn\"&gt;&lt;span class=\"sr-only\"&gt;wycisz&lt;/span&gt;&lt;/button&gt;' +\n        '            &lt;div class=\"progress_bar\"&gt;' +\n        '                &lt;div class=\"progress_point\"&gt;' +\n        '' +\n        '                &lt;/div&gt;' +\n        '            &lt;/div&gt;' +\n        '        &lt;/div&gt;' +\n        '    &lt;/div&gt;' +\n        '&lt;/div&gt;');\n\n    this.HTML_player_box = $(obj.HTML_frame);\n    this.HTML_player = $(audio_player)[0];\n    this.HTML_time_box = $(this.HTML_player_box).find('.play_time');\n\n    this.HTML_play_stop_btn = $(this.HTML_player_box).find('.text_player_btn');\n\n    this.HTML_track_box = $(this.HTML_player_box).find('.text_player_progress');\n    this.HTML_track_bar = $(this.HTML_track_box).find('.progress_bar');\n    this.HTML_track_bar_progress = $(this.HTML_track_box).find('.progress_point');\n    this.progress_bar_obj = null;\n\n    this.HTML_volume_box = $(this.HTML_player_box).find('.text_player_volume');\n    this.HTML_volume_bar = $(this.HTML_volume_box).find('.progress_bar');\n    this.HTML_volume_mute_unmute_btn = $(this.HTML_player_box).find('.vol_btn');\n    this.HTML_volume_bar_progress = $(this.HTML_volume_bar).find('.progress_point');\n    this.volume_bar_obj = null;\n\n    this.is_play = false;\n    this.volume = 100;\n\n    this.duration = 0;\n\n    this.init = function() {\n        if(obj.HTML_player) {\n            $(obj.HTML_player).after(obj.HTML_frame);\n            $(obj.HTML_player).hide();\n\n            obj.duration = obj.HTML_player.duration;\n\n            obj.playPauseEvents();\n            obj.progressBarEvents();\n            obj.volumeEvents();\n            obj.onFinishEvent();\n            obj.setTimeOnPlayer();\n        }\n    }\n\n    this.playPauseEvents = function() {\n        $(obj.HTML_play_stop_btn).click(function(){\n            obj.HTML_play_stop_btn.toggleClass('active');\n            if($(this).hasClass('active')){\n                $(this).find('.sr-only').text('zatrzymaj odtwarzanie')\n            }else{\n                $(this).find('.sr-only').text(' odtwĂłrz')\n            }\n\n            textAudioExemplars.forEach(function (item) {\n                 if (item.HTML_player !== obj.HTML_player) {\n                     if (item.HTML_play_stop_btn.hasClass('active')) {\n                         item.HTML_play_stop_btn.removeClass('active');\n                     }\n\n                     if ($(item).hasClass('active')) {\n                         $(item).removeClass('active');\n                     }\n\n                     item.touched = true;\n                     item.pause();\n                 }\n            });\n\n            if(!obj.is_play) {\n                obj.play();\n            }\n            else {\n                obj.touched = true;\n                obj.pause();\n            }\n        });\n    }\n\n    this.progressBarEvents = function() {\n        obj.progress_bar_obj = new _textProgresBar(this.HTML_track_bar, this.HTML_track_bar_progress, function(percent){\n            obj.touched = true;\n            obj.HTML_player.currentTime = (obj.duration*(percent/100));\n            if(obj.is_play) {\n                obj.play();\n            }\n        });\n    }\n\n    this.play = function() {\n        if (!obj.HTML_player_box.hasClass('active')) {\n            obj.HTML_player_box.toggleClass('active');\n        }\n\n        obj.HTML_player.play();\n        obj.duration = obj.HTML_player.duration;\n        obj.is_play = true;\n\n        obj.play_interval = setInterval(function(){\n            let percent = obj.HTML_player.currentTime/obj.duration*100;\n            obj.progress_bar_obj.updateProgress(percent);\n            obj.setTimeOnPlayer();\n        },10);\n    }\n\n    this.pause = function() {\n        if (obj.HTML_player_box.hasClass('active')) {\n            obj.HTML_player_box.removeClass('active');\n        }\n        obj.touched = true;\n        obj.HTML_player.pause();\n        obj.is_play = false;\n\n        clearInterval(obj.play_interval);\n    }\n\n    this.volumeEvents = function() {\n        obj.volume_bar_obj = new _textProgresBar(this.HTML_volume_bar, this.HTML_volume_bar_progress, function(percent){\n            obj.setVolumeLevel(percent);\n        });\n        obj.volume_bar_obj.updateProgress(100);\n\n        $(obj.HTML_volume_mute_unmute_btn).click(function(){\n            obj.HTML_volume_mute_unmute_btn.toggleClass('active');\n            if($(this).hasClass('active')){\n                $(this).find('.sr-only').text('wĹÄcz dĹşwiÄk')\n            }else{\n                $(this).find('.sr-only').text(' wycisz')\n            }\n            if (obj.HTML_player.volume === 0) {\n                obj.setVolumeLevel(100);\n            } else {\n                obj.setVolumeLevel(0);\n            }\n        });\n    }\n\n    this.setVolumeLevel = function(level) {\n        if(level&lt;0) {\n            level = 0;\n        }\n        else if(level&gt;100) {\n            level = 100;\n        }\n        if(level&gt;0) {\n            level = level/100;\n        }\n        obj.HTML_player.volume = level;\n    }\n\n    this.onFinishEvent = function() {\n        obj.HTML_player.addEventListener('ended',function(){\n            obj.HTML_play_stop_btn.toggleClass('active');\n            obj.pause();\n        });\n    }\n\n    this.setTimeOnPlayer = function() {\n        if(!obj.duration) {\n            $(obj.HTML_time_box).css(\"opacity\",0);\n        }\n        else {\n            $(obj.HTML_time_box).css(\"opacity\",1);\n            let text = `${this.calculateSecondsToTime(obj.HTML_player.currentTime)} / ${this.calculateSecondsToTime(obj.duration)}`;\n\n            $(obj.HTML_time_box).text(text);\n        }\n\n    }\n\n    this.calculateSecondsToTime = function(seconds) {\n        if (isNaN(seconds)) {\n            return '00:00'\n        }\n\n        let hour = Math.floor(seconds / 3600);\n        let minute = Math.floor((seconds % 3600) / 60);\n        let second = Math.round(seconds % 60);\n        let time = '';\n\n        time += this.convertTimeToString(hour,true);\n        time += this.convertTimeToString(minute,true,true);\n        time += this.convertTimeToString(second,false,true);\n\n        return time;\n    }\n\n    this.convertTimeToString = function(time, show_dot = false,show_if_zero = false) {\n        let result = '';\n        if(time != 0) {\n            if(time.toString().length === 1) {\n                if(!show_dot) {\n                    result += `0${time}`;\n                } else {\n                    result += `0${time}:`;\n                }\n            } else {\n                if(!show_dot) {\n                    result += `${time}`;\n                } else {\n                    result += `${time}:`;\n                }\n            }\n        }else {\n            if (show_if_zero) {\n                if(!show_dot) {\n                    result += `00`;\n                } else {\n                    result += `00:`;\n                }\n            } else {\n                result += ``;\n            }\n\n        }\n        return result;\n    }\n\n    this.durationInterval = function() {\n        setInterval(function(){\n            obj.duration+=0.01;\n        },10);\n    }\n\n    $(obj.init());\n\n    // obj.HTML_track_bar.slider();\n    //\n    // obj.HTML_volume_bar.slider({\n    //     value: 20,\n    //     step: 1,\n    //     range: 'min',\n    //     min: 0,\n    //     max: 100,\n    //     change: () =&gt; {\n    //         if (obj.HTML_volume_mute_unmute_btn.hasClass('active')) {\n    //             obj.HTML_volume_mute_unmute_btn.toggleClass('active');\n    //         }\n    //\n    //         this.HTML_player.volume = (obj.HTML_volume_bar.slider('value') / 100);\n    //     }\n    // });\n}\n\nfunction _textProgresBar(parent, progres, update_progress_event)\n{\n    let obj = this;\n\n    this.HTML_parent = parent;\n    this.HTML_progres = progres;\n    this.HTML_dot = $(\"&lt;div&gt;&lt;/div&gt;\");\n    this.HTML_touch_handler = $(\"&lt;div&gt;&lt;/div&gt;\");\n    $(obj.HTML_touch_handler).css({'position':'absolute','left':0,'top':'-29px','width':'100%','height':'60px','z-index':2,'cursor':'pointer'});\n\n    this.update_progress_event = update_progress_event;\n    this.percent_progres_percent = 0;\n\n    this.mouse_move_on = false;\n\n    this.init = function() {\n        obj.prepareDot();\n        obj.mouseMoveOnBarEvent();\n    }\n\n    this.prepareDot = function() {\n        $(obj.HTML_parent).css({'position':'relative'});\n        $(obj.HTML_parent).append(obj.HTML_dot);\n        $(obj.HTML_dot).addClass(\"dot\");\n        $(obj.HTML_dot).css({'position':'absolute','left':0});\n        $(obj.HTML_parent).append(obj.HTML_touch_handler);\n    }\n\n    this.mouseMoveOnBarEvent = function() {\n        $(obj.HTML_touch_handler).mousedown(function(e){\n            obj.updatePositionByMousePosition(e);\n            obj.mouse_move_on = true;\n        });\n\n        $(obj.HTML_touch_handler).on('click mousemove',function(e){\n            if(obj.mouse_move_on) {\n                obj.updatePositionByMousePosition(e);\n            }\n        });\n\n        $(\"body\").mouseup(function(){\n            obj.mouse_move_on = false;\n        });\n    }\n\n    this.updatePositionByMousePosition = function(e) {\n        this.percent_progres_percent = (e.offsetX/$(obj.HTML_parent).width())*100;\n        this.updateProgresBarWidth();\n    }\n\n    this.updateProgresBarWidth = function() {\n        obj.update_progress_event(obj.percent_progres_percent);\n        obj.updateProgresBarWidthDisplay();\n    }\n\n    this.updateProgresBarWidthDisplay = function() {\n        // let childrens = $(obj.HTML_progres).parent().children();\n        // $(childrens[1]).css({'left': obj.percent_progres_percent + \"%\"});\n        $(obj.HTML_progres).css({'width':obj.percent_progres_percent+\"%\"});\n        $(obj.HTML_dot).css({'left':obj.percent_progres_percent+\"%\"});\n    }\n\n    this.updateProgress = function(percent) {\n        obj.percent_progres_percent = percent;\n        obj.updateProgresBarWidthDisplay();\n    }\n\n    obj.init();\n\n}\n";
var mod_pagespeed_jOimtkiVKV = "$(document).ready(\n    function (){\n\n        $('iframe[src*=\"youtube\"]').each(function () {\n            const youtube_id = getYoutubeId($(this).attr('src'));\n            let div_width = ($(this).attr('width') == undefined) ? $(this).width() : $(this).attr('width');\n            let div_height = ($(this).attr('height') == undefined) ? $(this).height() : $(this).attr('height');\n\n            if (div_width == undefined || div_width == null || div_width == 0) {\n                div_width = $(this).parent().width()\n            }\n            if (div_height == undefined || div_height == null || div_height == 0) {\n                div_height = $(this).parent().height()\n            }\n            if(youtube_id != false)\n                if (div_height == undefined || div_height == null || div_height == 0) {\n                    $(this).replaceWith($('&lt;div class=\"youtube_iframe\" data-id_url=\"'+youtube_id+'\"&gt;&lt;/div&gt;'));\n                } else {\n                    $(this).replaceWith($('&lt;div class=\"youtube_iframe\" data-id_url=\"'+youtube_id+'\" style=\"width: '+div_width+'px; height: '+div_height+'px; position: relative\"&gt;&lt;/div&gt;'));\n                }\n        });\n\n        $('.youtube_iframe').click(function () {\n            $(this).find('.youtube_thumb').fadeOut(300);\n            const youtube_id = getYoutubeId($(this).data('id_url'));\n            if(youtube_id != false) {\n                const iframe = '&lt;iframe style=\"position:absolute; top:0; left:0; width:100%; height:100%;\" src=\"https://www.youtube.com/embed/'+youtube_id+'?vq=hd720&amp;showinfo=0&amp;autohide=1&amp;color=white&amp;controls=2&amp;modestbranding=1&amp;theme=light&amp;autoplay=1\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen&gt;&lt;/iframe&gt;';\n                $(this).append(iframe);\n            }\n        });\n\n        function addThumb() {\n            $('.youtube_iframe').each(function () {\n                const obj = $(this);\n                const youtube_id = getYoutubeId(obj.data('id_url'));\n\n                if(youtube_id != false) {\n                    const youtube_thumb = `&lt;div class=\"youtube_thumb\" style=\"background-image: url('https://i.ytimg.com/vi/${youtube_id}/default.jpg')\"&gt;&lt;div class=\"youtube_icon\"&gt;&lt;/div&gt;&lt;/div&gt;`;\n                    obj.html(youtube_thumb);\n                    const thumb = obj.find('.youtube_thumb');\n                    getBetterThumbnail(obj,youtube_id);\n\n                    const vidurl = 'https://www.youtube.com/watch?v='+youtube_id;\n                    fetch(`https://noembed.com/embed?dataType=json&amp;url=${vidurl}`)\n                        .then(res =&gt; res.json())\n                        .then((data) =&gt; {\n                            const avater = `\u003c!--&lt;a class=\"channel-logo\" target=\"_blank\" href=\"${data.author_url}\" aria-label=\"ZdjÄcie kanaĹu sanah\" style=\"background-image: url('https://yt3.ggpht.com/WvqpPy3xG8pW69xWTFy-jROmKZprK3vdHbwcXNyfRG4zr6ZsMrWw6o4sO2ZfDnCToNh6zl_9Fw=s68-c-k-c0x00ffffff-no-rj');\"&gt;&lt;/a&gt;\u002d-&gt;`;\n                            const title = `&lt;div class=\"channel-title\"&gt;${data.title}&lt;/div&gt;`;\n                            const channel = `&lt;div class=\"channel\" &gt;${avater}${title}&lt;/div&gt;`;\n                            thumb.append(channel);\n                        })\n                }\n            });\n        };\n\n        addThumb();\n\n    }\n);\n\nfunction getBetterThumbnail(obj,youtube_id)\n{\n    const div_w = obj.width();\n    const thumb = obj.find('.youtube_thumb');\n\n    let img_quality = 'default';\n    if (div_w &lt;= 120) {\n        img_quality = 'mqdefault';\n    }\n    if (div_w &gt; 120 &amp;&amp; div_w &lt;= 360) {\n        img_quality = 'hqdefault';\n    }\n    if (div_w &gt; 360 &amp;&amp; div_w &lt;= 480) {\n        img_quality = 'sddefault';\n    }\n    if (div_w &gt; 480) {\n        img_quality = 'maxresdefault';\n    }\n\n    const image_url = 'https://i.ytimg.com/vi/'+youtube_id+'/'+img_quality+'.jpg';\n    const img = new Image();\n    img.src = image_url;\n\n    setTimeout(function ()\n    {\n        if ($(img)[0].width &gt; 120 &amp;&amp; $(img)[0].height &gt; 90) {\n            $(thumb).css({'background-image':'url(\"'+image_url+'\")'});\n        } else {\n            const image_url = 'https://i.ytimg.com/vi/'+youtube_id+'/0.jpg';\n            $(thumb).css({'background-image':'url(\"'+image_url+'\")'});\n        };\n    },100);\n};\n\n\nfunction getYoutubeId(id_url){\n    if(id_url.includes('http')) {\n        const regExp = /^.*((youtu.be\\/)|(v\\/)|(\\/u\\/\\w\\/)|(embed\\/)|(watch\\?))\\??v?=?([^#&amp;?]*).*/;\n        const match = id_url.match(regExp);\n        return (match&amp;&amp;match[7].length==11)? match[7] : false;\n    } else {\n        return id_url;\n    };\n};\n";
</pre></body></html>