Added portrait-mode toggle

This commit is contained in:
rainbow napkin 2026-05-18 01:21:56 -04:00
parent f9a6321b7b
commit d41e9d1df9
4 changed files with 43 additions and 7 deletions

View file

@ -542,8 +542,8 @@ class chatBox{
}
togglePortrait(){
//If our window width is more than or equal to window height (not portrait mode)
if(window.innerWidth >= window.innerHeight){
//If our window width is more than or equal to window height (not portrait mode), or portrait mode is on while its supposed to be disabled
if(window.innerWidth >= window.innerHeight || (localStorage.getItem("disablePortrait") == 'true' && this.portrait)){
//Disable portrait CSS modifiers
this.channelDiv.style.flexDirection = "row";
this.clickDragger.enabled = true;
@ -556,7 +556,9 @@ class chatBox{
//resize player in-case of empty flex basis
this.resizeAspect();
}else{
//Otherwise, if portrait mode is enabled
}else if(localStorage.getItem("disablePortrait") != 'true'){
//Modify CSS for portrait displays
this.channelDiv.style.flexDirection = "column";
this.clickDragger.enabled = false;