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=/";
}
}
}