HEX
Server: Apache
System: Linux 95-217-38-122.cprapid.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
User: targetplatform (1004)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /mnt/data/targetplatform/public_html/wp-content/plugins/better-playlist/js/better-playlist.js
jQuery(document).ready(function ($) {

    $(".bsp-wrapper").on('click', '.bsp-videos-items a', function (e) {

        e.preventDefault();

        var $this = $(this),
            $playlist_wrapper = $this.closest('.bsp-wrapper'),
            $player_wrapper = $this.closest('.bsp-wrapper').find('.bsp-player'),
            ID = $(this).data('video-id'),
            URL = $player_wrapper.data('frame-url').replace('{video-id}',ID);

        //append video player
        $player_wrapper.html('<iframe type="text/html" width="100%" height="100%"\n        src="'+URL+'"\n        frameborder="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>');

        //set current class for active li
        $this.closest('li')
            .addClass('bsp-current-item')
            .siblings('li')
            .removeClass('bsp-current-item');

        //get active video index & display to user
        var index = $playlist_wrapper
            .find('.bsp-current-item .bsp-video-index')
            .html();

        $playlist_wrapper
            .find('.bsp-current-playing .bsp-current-index')
            .html(index)

    });


    (function fix_element_query(){

        if (typeof elementQuery != 'function') {
            return;
        }

        elementQuery({
            ".bsp-wrapper": {
                "max-width": ["480px","680px","780px"]
            }
        });

    })();

});