Last active
March 21, 2022 05:05
-
-
Save tsukumijima/30345f307a021af10785cb9ffd369ccd to your computer and use it in GitHub Desktop.
Twitter に表示される自分のアカウント名とアイコンを隠すユーザースタイル
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
/* ==UserStyle== | |
@name TwitterHideAccounts | |
@description Twitter に表示される自分のアカウント名とアイコンを隠すユーザースタイル | |
@namespace https://gist.github.com/tsukumijima | |
@updateURL https://gist.github.com/tsukumijima/30345f307a021af10785cb9ffd369ccd/raw/TwitterHideAccounts.user.css | |
@author tsukumi | |
@version 1.2.0 | |
@license MIT | |
==/UserStyle== */ | |
@-moz-document domain("twitter.com") { | |
/* アカウント名とスクリーンネームを表示しない */ | |
[data-testid="SideNav_AccountSwitcher_Button"] > div:nth-child(2) > div > div > div > div, /* アカウント名 */ | |
[data-testid="SideNav_AccountSwitcher_Button"] > div:nth-child(2) > div > div > div > div > div, /* スクリーンネーム */ | |
[data-testid="UserCell"] > div > div:nth-child(2) > div > div > div > div > div > div, /* アカウント名 */ | |
[data-testid="UserCell"] > div > div:nth-child(2) > div > div > div > div > div > div > div, /* スクリーンネーム */ | |
[data-testid="AccountSwitcher_Switch_Button"] > div > div:nth-child(2) > div > div > div > div > div > div, /* アカウント名 */ | |
[data-testid="AccountSwitcher_Switch_Button"] > div > div:nth-child(2) > div > div > div > div > div > div > div, /* スクリーンネーム */ | |
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span { /* スクリーンネーム */ | |
font-size: 0px !important; | |
} | |
/* アカウント名をアスタリスクでマスクする */ | |
[data-testid="SideNav_AccountSwitcher_Button"] > div:nth-child(2) > div > div:nth-child(1) > div > div > span > span::after, | |
[data-testid="UserCell"] > div > div:nth-child(2) > div > div > div > div > div > div > span::after, | |
[data-testid="AccountSwitcher_Switch_Button"] > div > div:nth-child(2) > div > div > div > div > div > div > span::after { | |
content: "********"; | |
font-size: 15px; | |
vertical-align: top; | |
} | |
/* スクリーンネームをアスタリスクでマスクする */ | |
[data-testid="SideNav_AccountSwitcher_Button"] > div:nth-child(2) > div > div:nth-child(2) > div > div > div > span::after, | |
[data-testid="UserCell"] > div > div:nth-child(2) > div > div > div > div > div > div > div > span::after, | |
[data-testid="AccountSwitcher_Switch_Button"] > div > div:nth-child(2) > div > div > div > div > div > div > div > span::after { | |
content: "@**********"; | |
font-size: 15px; | |
vertical-align: top; | |
} | |
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span { | |
vertical-align: top; | |
} | |
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span::after { | |
content: "@**********からログアウト"; | |
font-size: 15px; | |
vertical-align: top; | |
} | |
[data-testid="SideNav_AccountSwitcher_Button"] > div > [role="presentation"] >div > div::after, | |
[data-testid="UserCell"] > div > div > [role="presentation"] > div > div > div > div::after { | |
content: ""; | |
} | |
/* アカウントのアイコンをぼかす */ | |
[data-testid="SideNav_AccountSwitcher_Button"] > div > div > div > div > div > div > [role="presentation"] >div > div > div > div, /* 自分のアカウントのアイコン */ | |
[data-testid="UserCell"] > div > div > div > div > div > div > div > [role="presentation"] > div > div > div > div, /* アカウント切り替えメニュー */ | |
[data-testid="AccountSwitcher_Switch_Button"] > div > div > div > div > div > div > div > [role="presentation"] > div > div > div > div, /* アカウント切り替えモーダル */ | |
[role="progressbar"][aria-valuemax][aria-valuemin] + div + div > div > div > div > div > div > div > div > div > div > div > div > div > [role="presentation"] > div > div > div > div, /* ツイート画面のアイコン */ | |
[aria-label="タイムライン: 会話"] [role="progressbar"][aria-valuemax][aria-valuemin] + div > div > div > div > div > div > div > div > div > div > div > [role="link"] > div > div > div > div, /* 返信のツイート画面のアイコン */ | |
[data-testid="primaryColumn"] > div > div:nth-child(2) > div > div > div > div > div > div > div > div > div > div > div > div > [role="link"] > div > div > div > div /* ホーム画面上部のツイートフォームのアイコン */ { | |
filter: blur(5px); | |
} | |
/* プロフィール表示時のメニューのハイライトを削除 */ | |
nav[role="navigation"] > a[aria-label="プロフィール"] > div > div:nth-child(2).r-b88u0q { | |
color: #0f1419 !important; | |
} | |
nav[role="navigation"] > a[aria-label="プロフィール"] > div > div:nth-child(1) > svg { | |
height: 0rem; | |
} | |
nav[role="navigation"] > a[aria-label="プロフィール"] > div > div:nth-child(1):after { | |
content: url( 'data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%230f1419" viewBox="0 0 24 24" class="r-18jsvk2 r-4qtqp9 r-yyyyoo r-lwhw9o r-dnmrzs r-bnwqim r-1plcrui r-lrvibr"><g><path d="M12 11.816c1.355 0 2.872-.15 3.84-1.256.814-.93 1.078-2.368.806-4.392-.38-2.825-2.117-4.512-4.646-4.512S7.734 3.343 7.354 6.17c-.272 2.022-.008 3.46.806 4.39.968 1.107 2.485 1.256 3.84 1.256zM8.84 6.368c.162-1.2.787-3.212 3.16-3.212s2.998 2.013 3.16 3.212c.207 1.55.057 2.627-.45 3.205-.455.52-1.266.743-2.71.743s-2.255-.223-2.71-.743c-.507-.578-.657-1.656-.45-3.205zm11.44 12.868c-.877-3.526-4.282-5.99-8.28-5.99s-7.403 2.464-8.28 5.99c-.172.692-.028 1.4.395 1.94.408.52 1.04.82 1.733.82h12.304c.693 0 1.325-.3 1.733-.82.424-.54.567-1.247.394-1.94zm-1.576 1.016c-.126.16-.316.246-.552.246H5.848c-.235 0-.426-.085-.552-.246-.137-.174-.18-.412-.12-.654.71-2.855 3.517-4.85 6.824-4.85s6.114 1.994 6.824 4.85c.06.242.017.48-.12.654z"></path></g></svg>' ); | |
width: 1.75rem; | |
height: 1.75rem; | |
} | |
/** ダークモード対応 **/ | |
body[data-nightmode="true"] nav[role="navigation"] > a[aria-label="プロフィール"] > div > div:nth-child(2).r-b88u0q { | |
color: #ffffff !important; | |
} | |
body[data-nightmode="true"] nav[role="navigation"] > a[aria-label="プロフィール"] > div > div:nth-child(1):after { | |
content: url( 'data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="0 0 24 24" class="r-18jsvk2 r-4qtqp9 r-yyyyoo r-lwhw9o r-dnmrzs r-bnwqim r-1plcrui r-lrvibr"><g><path d="M12 11.816c1.355 0 2.872-.15 3.84-1.256.814-.93 1.078-2.368.806-4.392-.38-2.825-2.117-4.512-4.646-4.512S7.734 3.343 7.354 6.17c-.272 2.022-.008 3.46.806 4.39.968 1.107 2.485 1.256 3.84 1.256zM8.84 6.368c.162-1.2.787-3.212 3.16-3.212s2.998 2.013 3.16 3.212c.207 1.55.057 2.627-.45 3.205-.455.52-1.266.743-2.71.743s-2.255-.223-2.71-.743c-.507-.578-.657-1.656-.45-3.205zm11.44 12.868c-.877-3.526-4.282-5.99-8.28-5.99s-7.403 2.464-8.28 5.99c-.172.692-.028 1.4.395 1.94.408.52 1.04.82 1.733.82h12.304c.693 0 1.325-.3 1.733-.82.424-.54.567-1.247.394-1.94zm-1.576 1.016c-.126.16-.316.246-.552.246H5.848c-.235 0-.426-.085-.552-.246-.137-.174-.18-.412-.12-.654.71-2.855 3.517-4.85 6.824-4.85s6.114 1.994 6.824 4.85c.06.242.017.48-.12.654z"></path></g></svg>' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment