Remove text from category pills on mobile and don't make them take full height of title box

This commit is contained in:
Ajay
2023-07-14 17:55:55 -04:00
parent 9b627f4e8f
commit cee00a87c1
3 changed files with 24 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ export class CategoryPill {
this.root = createRoot(this.container);
this.ref = React.createRef();
this.root.render(<CategoryPillComponent ref={this.ref} vote={this.vote} />);
this.root.render(<CategoryPillComponent ref={this.ref} vote={this.vote} showTextByDefault={!this.onMobileYouTube} />);
if (this.onMobileYouTube) {
if (this.mutationObserver) {
@@ -76,6 +76,7 @@ export class CategoryPill {
// Use a parent because YouTube does weird things to the top level object
// react would have to rerender if container was the top level
const parent = document.createElement("span");
parent.id = "categoryPillParent";
parent.appendChild(this.container);
referenceNode.prepend(parent);