1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00

improve autoplay

This commit is contained in:
DanielnetoDotCom 2020-10-19 12:06:05 -03:00
parent 0ad9951dfa
commit e5c7d47d69

View file

@ -742,6 +742,7 @@ function isAutoplayEnabled(){
path: '/', path: '/',
expires: 365 expires: 365
}); });
console.log("isAutoplayEnabled #autoplay said "+(autoplay)?"Yes":"No");
return autoplay; return autoplay;
}else if ( }else if (
typeof Cookies !== 'undefined' && typeof Cookies !== 'undefined' &&
@ -750,15 +751,19 @@ function isAutoplayEnabled(){
Cookies.get('autoplay') Cookies.get('autoplay')
) { ) {
if(Cookies.get('autoplay') === 'true' || Cookies.get('autoplay') == true){ if(Cookies.get('autoplay') === 'true' || Cookies.get('autoplay') == true){
console.log("isAutoplayEnabled Cookie said Yes ");
return true; return true;
}else{ }else{
console.log("isAutoplayEnabled Cookie said No ");
return false; return false;
} }
}else{ }else{
if(typeof autoplay !== 'undefined'){ if(typeof autoplay !== 'undefined'){
console.log("isAutoplayEnabled #autoplay said "+(autoplay)?"Yes":"No");
return autoplay; return autoplay;
} }
} }
console.log("isAutoplayEnabled Default is No ");
return false; return false;
} }