HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/www/wp-content/plugins/wp_mvplayer/js/custom_frontend.js
jQuery( document ).ready(function() {
    jQuery(".all-vid-pl li:first").addClass("active");

    deleteCookiesWithPrefix("mvplayer");
    deleteCookiesWithPrefix("check_preview");
    
});      
// setTimeout( function(){ 
//     jQuery('.vid-list-mp4 a').click(function () {
//         jQuery("li.vid-list-mp4.active").removeClass("active");
//         jQuery(this).parent('li').addClass('active');
//         var src = jQuery(this).attr('data-src');
//         jQuery('.fp-player').find('video').attr('src', "");
//         jQuery('.fp-player').find('video').attr('src', src);
//         jQuery('.fp-player').find('video')[0].load();
//         jQuery('.fp-player').find('video')[0].play();
//     });
// }, 1000);

function deleteCookiesWithPrefix(prefix) {
    // Split the document.cookie string into an array of cookies
    var cookies = document.cookie.split(";");

    for (var i = 0; i < cookies.length; i++) {
        var cookie = cookies[i];
        var eqPos = cookie.indexOf("=");
        var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
        

        // Check if the cookie name starts with the specified prefix
        if (name.trim().startsWith(prefix)) {
            console.log(name)
            // Set the cookie's value to an empty string and expire it
            document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
        }
    }
}