Skip to content

Commit

Permalink
Fixed no scroll bar bug on youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
z0ccc committed Sep 22, 2022
1 parent 4215978 commit db44fd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/components/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const loadComments = (mountNode: HTMLElement | undefined) => {
mountNode!.parentNode!.insertBefore(redditImgWrap, mountNode!);

chrome.storage.sync.get('sort', ({ sort }) => {
ReactDOM.render(<App onYoutube sortSetting={sort} url={window.location.href} />, redComments);
ReactDOM.render(
<App onYoutube sortSetting={sort} url={window.location.href} />,
redComments
);
ReactDOM.render(<CommentToggle />, redditImgWrap);
});
};
Expand Down
17 changes: 10 additions & 7 deletions src/styles/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,22 @@ button {
justify-content: space-between;
}

#subreddits::-webkit-scrollbar {
height: 7px;
#redComments::-webkit-scrollbar {
width: 7px;
}

::-webkit-scrollbar {
#subreddits::-webkit-scrollbar {
height: 7px;
width: 7px;
}

::-webkit-scrollbar-track {
#redComments::-webkit-scrollbar-track,
#subreddits::-webkit-scrollbar-track {
display: none;
}

::-webkit-scrollbar-thumb {
#redComments::-webkit-scrollbar-thumb,
#subreddits::-webkit-scrollbar-thumb {
background: var(--scrollbar);
border-radius: 2px;
}
Expand Down Expand Up @@ -253,7 +256,7 @@ button {
margin: 0 0 3px 0;
}

.infoWrap>*:not(:last-child) {
.infoWrap > *:not(:last-child) {
margin: 0 6px 0 0;
}

Expand Down Expand Up @@ -355,4 +358,4 @@ blockquote {

input[type='checkBox'] {
margin: 0 6px 0 0;
}
}

0 comments on commit db44fd1

Please sign in to comment.