YT 控制簡化+炒飯條

youtube simple

Från och med 2023-09-23. Se den senaste versionen.

/* ==UserStyle==
@name YT 控制簡化+炒飯條
@description  youtube simple
@description:zh-tw YT控制簡化+聊天切換鈕(隱藏即時通訊)
@author       leadra
@preprocessor stylus
@version     1.0
@license      MIT
@var checkbox   progress_bar                    "炒飯進度條"                                  1
@var number     progress_bar_size                          "炒飯進度條"                         [200, 40, 200, 10, "px"]

@var checkbox   hide_mplayer                    "隱藏迷你+劇院+全螢幕"                                  1
@var checkbox   hide_ad                    "隱藏廣告-影片列表"                                  1
@var checkbox   title_h                    "影片標題上下間距"                                  1
@var checkbox   ad_resume                    "看過影片變暗"                                  1
@var checkbox   hide_ctrl                    "控制項隱藏-移入才顯示"                                  1
@var checkbox   hide_chat_head                    "聊天室切換height"                                  1
@var number     chat_head_height                          "聊天室切換height(15=無)"                         [35, 15, 55, 5, "px"]

@var checkbox gameSection              "🎮 Hide Game" 1
@var checkbox musicSection             "🎵 Hide Music" 0
@var checkbox hideRightSideVideos      "🎦 Hide Right Side" 0
@namespace https://greasyfork.org/users/4839
==/UserStyle== */
/*參考
https://greasyfork.org/zh-TW/scripts/446045
https://greasyfork.org/zh-TW/scripts/437994
https://greasyfork.org/zh-TW/scripts/445999
https://github.com/sapondanaisriwan/AdashimaaTube
https://greasyfork.org/zh-TW/scripts/402635-youtube-progress-bar-highlighting
https://userstyles.org/styles/194352/poketube
*/
@-moz-document url-prefix("https://www.youtube.com/watch?v=") {
/*聊天室切換調整*/
if hide_chat_head{    
#show-hide-button > .ytd-live-chat-frame.style-scope{
        display:inline-flex;
        height:chat_head_height;
        opacity:0.3;
        padding:0px!important;
        margin: -10px 0px -10px 0px!important;
        //height: calc(100vh *0.02) ; 
     }}
/*控制項簡化
去除中間LOGO信息
去除左右側前進、後退信息
去除四邊漸進層
保留音量信息
去除縮略圖上的鼠標播放提醒信息*/
.ytp-chrome-top,//全螢幕上方標題
.ytp-doubletap-ui,
.ytp-doubletap-ui-legacy,//左右側前進、後退信息
.ytp-gradient-top,//上邊漸進黑
//.ytp-size-button.ytp-button,//劇院模式
//.ytp-miniplayer-button.ytp-button,//迷你
//.ytp-gradient-bottom,//下邊漸進黑
//.ytp-pip-button.ytp-button,//子母畫面
//.ytp-autonav-toggle-button,//自動播放(背景元素無法去除)
//.c4-player-container.c4-flexible-player-container,
.ytp-bezel//中間LOGO信息
ytd-thumbnail-overlay-loading-preview-renderer{
display:none !important;
} 
/*下邊漸進黑+控制項隱藏-移入顯示*/
if hide_ctrl{
.ytp-gradient-bottom,.ytp-chrome-bottom {opacity:0;}
.ytp-chrome-bottom:hover  {opacity:1;background:rgba(0, 0, 0, .4);}
        }
/*隱藏迷你+劇院+全螢幕*/        
if hide_mplayer{.ytp-size-button.ytp-button,.ytp-miniplayer-button.ytp-button,.ytp-fullscreen-button.ytp-button{display:none !important;}}


/*隱藏廣告*/
if hide_ad{
    /*影片列表-電影購買[https://greasyfork.org/zh-TW/scripts/468212]*/
 ytd-watch-next-secondary-results-renderer.ytd-watch-flexy ytd-compact-movie-renderer.style-scope.ytd-item-section-renderer {display: none;}
    #offer-module.ytd-watch-next-secondary-results-renderer {display: none;}
    /*影片列表-廣告*/
    td-promoted-sparkles-web-renderer{display: none;}
                    }

/*影片標題上下間距*/
if title_h{
    /*標題上空白*/
body ytd-watch-flexy[cinematics-enabled] #below.ytd-watch-flexy{letter-spacing:-.5px;margin: -0px 0px -0px 0px!important;}
    /*標題*/
#below h1.ytd-watch-metadata ,yt-formatted-string[data-title-details]{line-height:1em;}
    /*頻道名稱上方空白*/
.style-scope.ytd-watch-metadata{margin: -0px 0px -0px 0px!important;}
#top-row.ytd-watch-metadata{margin: -0px 0px -3px 0px!important;}
    /*會員專屬標題*/
.badge-style-type-members-only.ytd-badge-supported-renderer {margin: -0px 0px -60px 145px;position: relative ;    z-index: -10;}
//.ytd-channel-name{padding:0px 0px 0px 0px;margin: 0px 0px 0px -0px;}
//.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--tonal{padding:0px 5px 0px 10px;margin: 0px 0px 0px -0px;}
//.style-scope.ytd-video-owner-renderer{padding:0px 0px;margin: 0px 0px 0px -0px!important;}
//.style-scope .ytd-video-owner-renderer.no-transition{padding:0px 0px;margin: 0px 0px 0px -0px;}
                }

/*看過影片變暗[https://greasyfork.org/zh-TW/scripts/419722]*/
if ad_resume{
//#progress.ytd-thumbnail-overlay-resume-playback-renderer {bottom: 0px; position: absolute;z-index:1;background: rgba(0, 0, 0, .5);min-height: 95px;}
ytd-thumbnail-overlay-resume-playback-renderer::after {
    background: rgba(0, 0, 0, .5);
    content: "看過";
    //text-align:center;
    font-size:20px;
    display: block;
    bottom: 0;
    height: 95px;
    width: 100%;
    position: absolute;
    z-index: 10;
                                                                                                                    }
                        }

        /* ❌ Remove Music Section */
        #items > ytd-video-description-music-section-renderer {
            display: none if musicSection;
        }

        /* ❌ Remove Game Section */
        #contents.ytd-rich-metadata-row-renderer {
            display: none if gameSection;
        }
        /*隱藏右邊欄位*/
        ytd-watch-flexy[cinematics-enabled] #secondary.ytd-watch-flexy {
            display: none if hideRightSideVideos;
        }
        
/*炒飯進度條*/
if progress_bar{
    .ytp-scrubber-button,.ytp-play-progress {
        background: #ffe100a6;
        transform: rotate(0deg);
        filter: drop-shadow(0 0 1px gold) drop-shadow(0 0 2px gold) drop-shadow(0 0 3px gold);
    }
    /*控制項高亮*/
//.ytp-time-display span:hover {text-shadow: 0 0 1px whitesmoke, 0 0 2px black !important;filter: drop-shadow(0 0 3px gold) drop-shadow(0 0 5px gold) !important}
    .ytp-volume-panel:hover,
    .ytp-chrome-controls a:hover svg,
    .ytp-chrome-controls button:hover svg {
        filter: drop-shadow(0 0 1px black) drop-shadow(0 0 2px gold)  drop-shadow(0 0 5px gold) !important;
    }
    
.ytp-scrubber-pull-indicator {/*pika*/
    background-color: #fff0;
    height: progress_bar_size;
    width: progress_bar_size;
    background-image: url(https://cdn.discordapp.com/attachments/1061231391083352116/1115256873764003920/tank_png2.png);
       
    background-repeat: no-repeat;
    background-position: center;
    background-size: progress_bar_size;
    bottom: 0px;
    left: progress_bar_size *-(8/10) ;
    transform: rotate(0deg);
	transform: scale(1.1);
	border-radius: 0px
}
}
        
}