1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/plugin/TheaterButton/script.js
DanielnetoDotCom 035a318b6f
2020-10-19 17:16:54 -03:00

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 () {
});