Skip to content

twitter.com Hide by motonari728

Details

Authormotonari728

LicenseNo License

Categorytwitter

Created

Updated

Size2.8 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

twitter.comで画像のプレビューの削除等、依存性を減らす

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name       twitter.com 画像削除
@version    20240129.11.42
@namespace  ?
==/UserStyle== */

@-moz-document url-prefix("https://twitter.com/") {

img {
    display: none;
}


/* aria-labelledbyは画像ごとにvalueが違うので、valueは使えない */

/* div:has(>div[data-testid="tweetPhoto"]) {
    display: none;
} */

/* ツイートの文字を小さくする */
article span {
    line-height: 1em;
    font-size: 1em !important;
    font-weight: normal !important;
    color: white !important;
}

/* リンクの色 */
article a {
    line-height: 0.5em !important;
    font-size: 0.5em !important;
    color: white !important;
}

/* アバター画像 */
div[data-testid="Tweet-User-Avatar"] {
    display: none; 
}
/* すべての文字 */
* {
    color: white !important;
}

/* RT, いいね, bookmarkを消す */
div[aria-label][role="group"] {
    display: none;
}
/* ユーザー名を小さくする */
div[data-testid="User-Name"] div>span {
    font-size: 0.6em !important;
}
/* ユーザー名の上の空白を消して詰める */
article>div>div>div:first-child {
    display: none;
}


}

@-moz-document url("https://twitter.com/home") {

/* タイムラインのみ画像を消す */
/* 画像がdivのbackgroundに設定してあるのを消す */
[data-testid="tweetPhoto"] {
    display: none;
}
/* 画像の表示領域全体を消す */
/* 画像を含むTweet全体はarticle[aria-labelledby]なのでdivで絞り込む */
div[aria-labelledby] {
    display: none
}
}

@-moz-document regexp("https:\\/\\/twitter\\.com\\/\\w+\\/status\\/\\d+.*$") {
/* ツイートの下のDiscover more */
/* プロフィールページで誤爆するので、個別ツイートページのみを対象にする */
/* div[data-testid="cellInnerDiv"]:has(h2[role="heading"]) { */
/*     display: none; */
    /* background-color: red; */
/* } */
/* ~が以降のものすべてにマッチ */
div[data-testid="cellInnerDiv"]:has(h2[role="heading"])~div[data-testid="cellInnerDiv"] {
    display: none;
/*     background-color: red; */
}

/* 上の設定はユーザーページを開いたときの「Who to follow」に反応するので、followを含む以降は無効化 */
/* div[data-testid="cellInnerDiv"]:has(div[aria-label^="Follow"]) {
    display: block;
} */
/* div[data-testid="cellInnerDiv"]:has(div[aria-label^="Follow"])~div[data-testid="cellInnerDiv"] {
    display: block; */
    /* background-color: red; */
/* } */

/* ↓失敗。そもそも無理だわ。 */
/* 以上すべてをまとめると、role=headingを持つが、Followを持たないもの、に続くもの */
/* div[data-testid="cellInnerDiv"]:has(h2[role="heading"]):not(:has(div[aria-label^="Follow"]))~div[data-testid="cellInnerDiv"] {
    background-color: red;
} */

}

Reviews

No reviews yet.