Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Twitter に表示される自分のアカウント名とアイコンを隠すユーザースタイル
/* ==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.0.0
@license MIT
==/UserStyle== */
@-moz-document domain("twitter.com") {
/* アカウント名とスクリーンネームを表示しない */
[data-testid="SideNav_AccountSwitcher_Button"] > div > div >div > div,
[data-testid="UserCell"] > div > div > div > div > div > div > div > span ,
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span,
[data-testid="AccountSwitcher_Switch_Button"] > div > div > div > div > div > div > div > span {
font-size: 0px !important;
}
/* アカウント名をアスタリスクでマスクする */
[data-testid="SideNav_AccountSwitcher_Button"] > div > div >div:nth-child(1) > div > span::after,
[data-testid="UserCell"] > div > div > div > div > div > div:nth-child(1) > div > span > span::after,
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span::after,
[data-testid="AccountSwitcher_Switch_Button"] > div > div > div > div > div > div:nth-child(1) > div > span::after {
content: "********";
font-size: 15px;
}
/* スクリーンネームをアスタリスクでマスクする */
[data-testid="SideNav_AccountSwitcher_Button"] > div > div >div:nth-child(2) > div > span::after,
[data-testid="UserCell"] > div > div > div > div > div > div:nth-child(2) > div > span::after,
[data-testid="AccountSwitcher_Logout_Button"] > div > div > span::after,
[data-testid="AccountSwitcher_Switch_Button"] > div > div > div > div > div > div:nth-child(2) > div > span::after {
content: "@**********";
font-size: 15px;
}
[data-testid="UserCell"] > div > div > [role="presentation"] > div > div > div > div::after,
[data-testid="SideNav_AccountSwitcher_Button"] > div > [role="presentation"] >div > div::after{
content: "";
}
/* アカウントのアイコンをぼかす */
[data-testid="UserCell"] > div > div > [role="presentation"] > div > div > div > div,
[data-testid="SideNav_AccountSwitcher_Button"] > div > [role="presentation"] >div > div,
[data-testid="primaryColumn"] > div > div > div > div > div > div > div > div > div [role="link"]:not([aria-label="知り合いのフォロワー"]) > div > div > div > div,
[data-testid="AccountSwitcher_Switch_Button"] > div > div > [role="presentation"] > div > div > div > div,
[aria-labelledby="modal-header"][aria-modal="true"] > div > div > div > div > div > div > div > div > div > div > div > [role="presentation"] > 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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment