Skip to content

Commit

Permalink
fix element "secondary" column in youtube not available and sidebar c…
Browse files Browse the repository at this point in the history
…rashing
  • Loading branch information
blackforestboi committed Jul 17, 2024
1 parent 0c2b289 commit 0b7a168
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/sidebar/annotations-sidebar/containers/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,13 @@ export class SidebarContainerLogic extends UILogic<
if (
this.options.windowAPI.location.href.includes('youtube.com/watch')
) {
const sidebarContainerWidth = document.getElementById('secondary')
.clientWidth
const sidebarWidthNumber = parseFloat(
SIDEBAR_WIDTH_STORAGE_KEY.replace('px', ''),
)
const sidebarContainerWidth =
document.getElementById('secondary')?.clientWidth ??
sidebarWidthNumber

sidebarWidth = sidebarContainerWidth - 50 + 'px'
}

Expand Down

0 comments on commit 0b7a168

Please sign in to comment.