Last active
October 10, 2023 04:18
-
-
Save lo48576/6c66c99bf584d51d12a71071ae8989ff to your computer and use it in GitHub Desktop.
Firefox の Stylus で使える、何とは言わない某の新 UI 用 CSS 。英語版 UI でテストしているので日本語版で使うならラベル文字列とかちょっと調整してね
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("twitter.com") { | |
/* | |
* Left sidebar | |
*/ | |
/* Hide menu labels */ | |
nav[aria-label="メインメニュー"] .css-901oao, | |
nav[aria-label="Primary"] .css-901oao { | |
display: none; | |
} | |
/* Hide "Tweet" Button */ | |
a[aria-label="ツイートする"], | |
a[aria-label="Tweet"], | |
a[data-testid="SideNav_NewTweet_Button"] { | |
/*display: none;*/ | |
padding-left: 0; | |
padding-right: 0; | |
border-radius: initial; | |
min-width: 40px; | |
} | |
/* Erase left margin of the sidebar */ | |
/* NOTE: This disables whole UI centering. */ | |
header.r-obd0qt.r-16y2uox.r-1g40b8q[role="banner"] { | |
flex-grow: 0; | |
} | |
/* Shrink left sidebar width */ | |
.r-o96wvk { | |
width: 80px; | |
} | |
/* Hide "explore" item */ | |
nav[aria-label="Primary"] a[href="/explore"], | |
[aria-label="調べたいものを検索"] { | |
display: none; | |
} | |
/* Shrink account switcher */ | |
div[data-testid="SideNav_AccountSwitcher_Button"] > .css-1dbjc4n.r-obd0qt.r-16y2uox { | |
display: none !important; | |
} | |
/* Hide logo */ | |
h1[role="heading"] a[aria-label="X"] { | |
display: none; | |
} | |
/* Hide "Twitter Blue" item */ | |
a[aria-label="Twitter Blue"] { | |
display: none; | |
} | |
/* Hide "Communities" item */ | |
a[aria-label="Communities"] { | |
display: none; | |
} | |
/* Hide "Premium" item */ | |
a[aria-label="Premium"] { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Right sidebar | |
*/ | |
/* Shrink right sidebar */ | |
/* This seems to be `[data-testid="sidebarColumn"]` */ | |
.r-1ovo9ad { | |
width: initial; | |
max-width: 200px; | |
} | |
/* Expand main column */ | |
/* This seems to be `[data-testid="primaryColumn"]`. */ | |
/* Note that a column in the account setting page is `section.r-1ye8kvj[role="region"][aria-label="Section navigation"]`. */ | |
.r-1ye8kvj:not([role="region"]) { | |
/* Note that `.r-1ye8kvj` is used for modal tweet box. | |
* modal box can be matched by `[aria-labelledby="modal-header"][aria-modal="true"]` selector. | |
*/ | |
max-width: inherit; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Hide right sidebar items | |
*/ | |
/* | |
* `[data-testid="sidebarColumn"] .r-vacyoi.r-ttdzmv`: the container fo right sidebar items. | |
* The first item is expected to be a search bar. | |
*/ | |
[data-testid="sidebarColumn"] .r-vacyoi.r-ttdzmv > *:first-child ~ * { | |
display: none; | |
} | |
/* Hide the footer */ | |
[aria-label="Footer"], | |
[aria-label="フッター"] { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Search bar | |
*/ | |
/* Hide mushimegane icon in input box */ | |
form[aria-label="Search Twitter"][role="search"] svg { | |
display: none; | |
} | |
/* Hide looking glass icon in candidate list */ | |
form[aria-label="Search Twitter"] [role="option"] .css-1dbjc4n.r-18kxxzh.r-5f2r5o { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Disable round icon | |
*/ | |
/* Reset border radius */ | |
/* Icon in each tweet may have `[data-testid="tweet"]`, | |
* but icons in profile pages doesn't seem to have specific `data-testid` attribute. | |
*/ | |
a .r-sdzlij { | |
border-radius: initial; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Tweet dialog | |
*/ | |
/* Modal tweet dialog */ | |
[aria-labelledby="modal-header"][aria-modal="true"] .r-1ye8kvj { | |
min-width: 40em; | |
width: 65vw; | |
} | |
} | |
@-moz-document url-prefix("https://twitter.com/explore") { | |
/* | |
* Search (explore) page | |
*/ | |
section.css-1dbjc4n[aria-labelledby^="accessible-list-"][role="region"] { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Right siderbar width adjustment | |
*/ | |
[data-testid="sidebarColumn"] { | |
/* 80px: Left sidebar width (`.r-o96wvk`), 12px: padding-{left,right} (`.r-1e081e0`) */ | |
/* 990px: main column */ | |
width: calc(100vw - (80px + 12px + 12px) - 990px); | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Retweet menu | |
*/ | |
a.css-4rbku5.css-18t94o4.css-1dbjc4n.r-1awozwy.r-1ysxnx4.r-z2wwpe.r-1loqt21.r-18u37iz.r-hv52eu.r-1ny4l3l.r-xyw6el.r-o7ynqc.r-6416eg { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Hide "Show {n} Tweets" since it will appear just to push new advertisement (which can be hidden by CSS) | |
*/ | |
.css-18t94o4.css-1dbjc4n.r-1777fci.r-1pl7oy7.r-1ny4l3l.r-o7ynqc.r-6416eg.r-13qz1uu[role="button"][tabindex="0"] { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* | |
* Disable "read before RT" | |
*/ | |
.css-4rbku5.css-18t94o4.css-1dbjc4n.r-1awozwy.r-g2wdr4.r-z2wwpe.r-1loqt21.r-18u37iz.r-hv52eu.r-1ny4l3l.r-xyw6el.r-o7ynqc.r-6416eg { | |
display: none; | |
} | |
} | |
@-moz-document domain("twitter.com") { | |
/* Hide impression */ | |
.css-1dbjc4n > a[href^="/"][href$="/analytics"][aria-label$="analytics"] { | |
display: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment