Skip to content

YouTube 検索結果のサムネ縮小化 by hori68

Details

Authorhori68

LicenseCC-BY-4.0

CategoryYouTube

Created

Updated

Size4.6 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

検索結果ページのサムネを数年前の小さいサイズに戻します

Notes

ショート動画のバカでかいのはどうしようか考え中。

Source code

/* ==UserStyle==
@name           YouTube 検索結果のサムネ縮小化
@namespace      userstyles.world/user/hori68
@version        1.1
@description    検索結果ページのサムネを数年前の小さいサイズに戻します
@author         hori68
@license        CC-BY-4.0
@preprocessor   stylus
@var select     channel_icon     "チャンネルアイコン"     ["YES:表示", "NO:非表示"]
@var select     max_width        "横幅最大"        ["FREE:制限しない", "1100:1100px", "1000:1000px",
                                                    "900:900px", "800:800px"]
==/UserStyle== */

@-moz-document domain("youtube.com") {
    i = !important //
    ytd-search ytd-two-column-search-results-renderer {
        -webkit-justify-content: normal i;
        justify-content: normal i;
        #primary.ytd-two-column-search-results-renderer {
            if max_width == 1100{
                max-width: 1100px i;
            }else if max_width == 1000{
                max-width: 1000px i;
            }else if max_width == 900{
                max-width: 900px i;
            }else if max_width == 800{
                max-width: 800px i;
            }
            
            /* 広告 */
            ytd-promoted-video-renderer ytd-thumbnail.ytd-promoted-video-renderer {
                max-width: 246px i;
                width: 246px i;
                height: 138px i;
            }

            /* トップニュース */
            ytd-grid-video-renderer{
                width: 246px i;
                ytd-thumbnail.ytd-grid-video-renderer {
                    max-width: 246px i;
                    width: 246px i;
                    height: 138px i;
                }
                if channel_icon == "NO" {
                    div#details a#channel-thumbnail{
                        display: none i;
                    }
                }
            }
            
            /* 動画 */
            ytd-video-renderer{
                ytd-thumbnail.ytd-video-renderer {
                    max-width: 246px i;
                    width: 246px i;
                    height: 138px i;
                }
                if channel_icon == "YES"{
                    #channel-info.ytd-video-renderer {
                        padding: 0 0 i;
                    }
                    ytd-video-meta-block{
                        padding-left: 32px i;
                        min-height: 18px i; /* karappo no toki ni kuzurenai you */
                    }
                    div#channel-info > a {
                        top: -14px i;
                        position: relative i;
                    }
                    div#channel-info ytd-channel-name{
                        top: -6px i;
                        position: relative i;
                    }
                    #description-text.ytd-video-renderer {
                        margin-top: -6px i;
                    }
                    #description-text.ytd-video-renderer {
                        margin-bottom: 4px i;
                    }
                }else{
                    div#channel-info a yt-img-shadow{
                        display:none i;
                    }
                    div#channel-info.ytd-video-renderer{
                        padding: 0px 0px 8px 0px i;
                    }
                    div#channel-info ytd-channel-name{
                        padding-left: 0px i;
                    }
                }
            }
            
            /* 再生リスト */
            ytd-playlist-renderer ytd-playlist-thumbnail.ytd-playlist-renderer {
                max-width: 246px i;
                width: 246px i;
                height: 138px i;
            }
            
            /* ミックスリスト */
            ytd-radio-renderer ytd-playlist-thumbnail.ytd-radio-renderer {
                max-width: 246px i;
                width: 246px i;
                height: 138px i;
            }
            
            /* チャンネル */
            ytd-channel-renderer #avatar-section.ytd-channel-renderer {
                max-width: 246px i;
                width: 246px i;
                height: 138px i;
            }
            
            /* 映画 */
            ytd-movie-renderer div.thumbnail-container.ytd-movie-renderer {
                max-width: 246px i;
                width: 246px i;
            }

            ytd-search ytd-video-renderer.ytd-item-section-renderer:last-child{
                margin-bottom: 0px i;
            }/* section to iu 20ko kurai no douga gotoni arawareru sukima sakujo */
        }
    }
}

Reviews

No reviews yet.