mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
38 lines
1 KiB
JavaScript
38 lines
1 KiB
JavaScript
|
|
function compress(t) {
|
|
console.log("compress");
|
|
$("#modeYoutubeTop").prependTo("#modeYoutubeBottomContent");
|
|
if(typeof t !== 'undefined' && $(t).length){
|
|
$(t).removeClass('ypt-compress');
|
|
$(t).addClass('ypt-expand');
|
|
}
|
|
}
|
|
function expand(t) {
|
|
console.log("expand");
|
|
$("#modeYoutubeTop").prependTo("#modeYoutubePrincipal");
|
|
if(typeof t !== 'undefined' && $(t).length){
|
|
$(t).removeClass('ypt-expand');
|
|
$(t).addClass('ypt-compress');
|
|
}
|
|
}
|
|
function toogleEC(t) {
|
|
if(typeof t !== 'undefined' && $(t).length){
|
|
if ($(t).hasClass('ypt-expand')) {
|
|
expand(t);
|
|
Cookies.set('compress', false, {
|
|
path: '/',
|
|
expires: 365
|
|
});
|
|
t.controlText('Default view');
|
|
} else {
|
|
compress(t);
|
|
Cookies.set('compress', true, {
|
|
path: '/',
|
|
expires: 365
|
|
});
|
|
t.controlText('Theater mode');
|
|
}
|
|
}
|
|
}
|
|
$(document).ready(function () {
|
|
});
|