Skip to content

Commit

Permalink
いいね数、リツイート数、ブックマーク数が隠れるよう修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukesaitoh committed May 19, 2024
1 parent 2ec4cf1 commit 70d13da
Showing 1 changed file with 51 additions and 27 deletions.
78 changes: 51 additions & 27 deletions app/styles/contentscript.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,35 @@ body {
}

&.isReactionNumberHidden {
div[data-testid="primaryColumn"] article:not(:hover) div[role="group"] div[role="button"] span {
opacity: 0 !important;
transition-property: transform, opacity !important;
}

article[data-testid="tweet"] div:has(>div>div>div>div>a>time) ~ div > div > div:has(>span) {
display: none;
div[data-testid="primaryColumn"] article:not(:hover) button {
&[data-testid="reply"] ,
&[data-testid="retweet"] ,
&[data-testid="unretweet"] ,
&[data-testid="like"] ,
&[data-testid="unlike"],
&[data-testid="bookmark"],
&[data-testid="removeBookmark"] {
span[data-testid="app-text-transition-container"] {
opacity: 0 !important;
transition-property: transform, opacity !important;
}
}
}

&.isReactionNumberAlwaysHidden {
div[data-testid="primaryColumn"] article div[role="group"] div[role="button"] span {
opacity: 0 !important;
transition-property: transform, opacity !important;
div[data-testid="primaryColumn"] article button {
&[data-testid="reply"] ,
&[data-testid="retweet"] ,
&[data-testid="unretweet"] ,
&[data-testid="like"] ,
&[data-testid="unlike"],
&[data-testid="bookmark"],
&[data-testid="removeBookmark"] {
span[data-testid="app-text-transition-container"] {
opacity: 0 !important;
transition-property: transform, opacity !important;
}
}
}
}
}
Expand Down Expand Up @@ -78,15 +94,19 @@ body {
}

div[role="dialog"] {
div[role="group"]:not(:hover) div[role="button"] {
&[data-testid="reply"] span[data-testid="app-text-transition-container"],
&[data-testid="retweet"] span[data-testid="app-text-transition-container"],
&[data-testid="unretweet"] span[data-testid="app-text-transition-container"],
&[data-testid="like"] span[data-testid="app-text-transition-container"],
&[data-testid="unlike"] span[data-testid="app-text-transition-container"]
div[role="group"]:not(:hover) button {
&[data-testid="reply"],
&[data-testid="retweet"],
&[data-testid="unretweet"],
&[data-testid="like"],
&[data-testid="unlike"],
&[data-testid="bookmark"],
&[data-testid="removeBookmark"]
{
opacity: 0 !important;
transition-property: transform, opacity !important;
span[data-testid="app-text-transition-container"] {
opacity: 0 !important;
transition-property: transform, opacity !important;
}
}
}
a[href$="/retweets"]:not(:hover) span[data-testid="app-text-transition-container"],
Expand All @@ -106,17 +126,21 @@ body {
}

div[role="dialog"] {
div[role="group"] div[role="button"] {
&[data-testid="reply"] span[data-testid="app-text-transition-container"],
&[data-testid="retweet"] span[data-testid="app-text-transition-container"],
&[data-testid="unretweet"] span[data-testid="app-text-transition-container"],
&[data-testid="like"] span[data-testid="app-text-transition-container"],
&[data-testid="unlike"] span[data-testid="app-text-transition-container"]
div[role="group"] button {
&[data-testid="reply"],
&[data-testid="retweet"],
&[data-testid="unretweet"],
&[data-testid="like"],
&[data-testid="unlike"],
&[data-testid="bookmark"],
&[data-testid="removeBookmark"]
{
opacity: 0 !important;
transition-property: transform, opacity !important;
span[data-testid="app-text-transition-container"] {
opacity: 0 !important;
transition-property: transform, opacity !important;
}
}
}
}
a[href$="/retweets"] span[data-testid="app-text-transition-container"],
a[href$="/retweets/with_comments"] span[data-testid="app-text-transition-container"],
a[href$="/likes"] span[data-testid="app-text-transition-container"] {
Expand Down

0 comments on commit 70d13da

Please sign in to comment.