Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Mar 19, 2023
1 parent 453641a commit 26e15eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
/*--------------------------------------------------------------
>>> COMMENTS:
----------------------------------------------------------------
# Sidebar
# Comments
# Collapsed
# Hidden
# Squared User Images
# Hide avatars
--------------------------------------------------------------*/

html[it-comments-sidebar-position='true'] #comments { max-width: min(1100px, 30vw) !important; margin-right: -10px !important; }
@media screen and (max-width: 2419px) and (min-width: 1438px) {
html[it-comments-sidebar-position='true'] #secondary {top:0px !important; margin-top: -10px !important; }
html[it-comments-sidebar-position='true'] #primary {top:0px !important; margin-left: 10px !important; }

/*--------------------------------------------------------------
# COLLAPSED
--------------------------------------------------------------*/
Expand Down
11 changes: 5 additions & 6 deletions content-scripts/website-context/youtube-features/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,11 @@ ImprovedTube.playerRemainingDuration = function () {
------------------------------------------------------------------------------*/
ImprovedTube.commentsSidebarPosition=()=>{ if(ImprovedTube.storage.comments_sidebar_position){
document.querySelector("#columns").appendChild(document.querySelector("#comments"));
document.querySelector("#primary-inner").appendChild(document.querySelector("#secondary"));
// }else{document.querySelector("#columns").appendChild(document.querySelector("#secondary"));
if(window.matchMedia("(max-width: 1438px)").matches){ document.querySelector("#primary-inner").appendChild(document.querySelector("#secondary"));}
// console.log("secondary and its children have been appended to primary-inner")
}else{
document.querySelector("#columns").appendChild(document.querySelector("#secondary"));
document.querySelector("#below").appendChild(document.querySelector("#comments"));
}
// }else{ document.querySelector("#below").appendChild(document.querySelector("#comments"));
}
}
/*------------------------------------------------------------------------------
4.2.2 SIDEBAR
Expand Down Expand Up @@ -309,7 +308,7 @@ ImprovedTube.description = function (el) {
if(el){el.click();} else {document.querySelector("#more").click() || document.querySelector("#expand").click() ;}
}
};

/*------------------------------------------------------------------------------
4.2.3.4 HIDE DETAIL BUTTON
------------------------------------------------------------------------------*/
Expand Down

0 comments on commit 26e15eb

Please sign in to comment.