mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
improve autoplay
This commit is contained in:
parent
0ad9951dfa
commit
e5c7d47d69
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue