/* ==UserStyle==
@name YT 簡化-控制項+按鈕
@description youtube YT簡化-控制項+按鈕+進度條修改
@namespace 1
@author leadra
@preprocessor stylus
@version 1.2
@license MIT
@var checkbox ctrl_thin "控制項簡化" 1
@var checkbox hide_mplayer "按鈕隱藏>迷你+劇院+全螢幕" 1
@var checkbox hide_ctrl "控制列隱藏-移入才顯示" 1
@var checkbox title_h "影片標題+按鈕上下間距" 1
@var checkbox hide_ad "影片列表-廣告隱藏" 1
@var checkbox ad_resume "影片列表-看過影片變暗" 1
@var checkbox hide_chat_head "即時通訊鈕height" 1
@var number chat_head_height "即時通訊鈕height(15=無)" [35, 15, 55, 5, "px"]
@var checkbox noround_livechat "去除圓角-聊天室+影片" 0
@var checkbox noround_btn "去除圓角-按鈕" 0
@var checkbox gameSection "🎮 Hide Game" 1
@var checkbox musicSection "🎵 Hide Music" 0
@var checkbox hideRightSideVideos "🎦 Hide Right Side" 0
@var checkbox progress_bar "炒飯進度條" 1
@var number progress_bar_size "炒飯進度條大小" [80, 40, 200, 10, "px"]
@var text caption-custom-shadow "炒飯進度條URL" "url(https://cdn.discordapp.com/attachments/1061231391083352116/1115256873764003920/tank_png2.png)"
@var checkbox no-tab "----------Tabview(腳本)---------按鈕極小化" 1
==/UserStyle== */
/*參考
https://greasyfork.org/zh-TW/scripts/428651-tabview-youtube
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
https://userstyles.org/styles/194352/poketube
https://greasyfork.org/zh-TW/scripts/468212
https://greasyfork.org/zh-TW/scripts/419722
*/
@-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) ;
}}
//去除圓角-聊天室
if noround_livechat {
ytd-live-chat-frame#chat.ytd-watch-flexy{
border-radius: 0px;
}
//去除圓角-影片
ytd-watch-flexy[rounded-player-large]:not([fullscreen]):not([theater]) #ytd-player.ytd-watch-flexy {
border-radius: 0px !important;}
//if video-no-round-angle {ytd-watch-flexy[rounded-player-large][default-layout] #ytd-player.ytd-watch-flexy.ytd-watch-flexy {border-radius: 0;}}
}
//去除圓角-按鈕
if noround_btn {
html .yt-spec-button-shape-next--size-m,
html .yt-spec-button-shape-next--size-m.yt-spec-button-shape-next--segmented-start,
html .yt-spec-button-shape-next--size-m.yt-spec-button-shape-next--icon-button.yt-spec-button-shape-next--segmented-end{
border-radius:0;
}}
/*控制項簡化
去除中間LOGO信息
去除左右側前進、後退信息
去除四邊漸進層
保留音量信息
去除縮略圖上的鼠標播放提醒信息*/
if ctrl_thin{
.ytp-bezel,//中間LOGO信息
.ytp-doubletap-ui-legacy,//左右側前進、後退信息
.ytp-gradient-top,//上邊漸進黑
//.ytp-gradient-bottom,//下邊漸進黑
.ytp-doubletap-ui,
.ytp-chrome-top,//全螢幕上方標題
//.ytp-size-button.ytp-button,//劇院模式
//.ytp-miniplayer-button.ytp-button,//迷你
.ytp-pip-button.ytp-button,//子母畫面
//.ytp-autonav-toggle-button,//自動播放(背景元素無法去除)
//.c4-player-container.c4-flexible-player-container,
ytd-thumbnail-overlay-loading-preview-renderer{
display:none !important;
} }
//.ytp-pip-button{display:unset!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;}
}
/*影片列表-看過影片變暗[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;
}
}
/*影片標題+按鈕上下間距*/
if title_h{
/*標題上空白*/
body ytd-watch-flexy[cinematics-enabled] #below.ytd-watch-flexy{letter-spacing:-0.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 140px;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;}
}
//隱藏音樂-遊戲資訊+右邊欄位
/* ❌ 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 {
background-color: #fff0;
height: progress_bar_size;
width: progress_bar_size;
//url(https://cdn.discordapp.com/attachments/1061231391083352116/1115256873764003920/tank_png2.png)
background-image: caption-custom-shadow;
background-repeat: no-repeat;
background-position: center;
background-size: progress_bar_size;
bottom: 0px;
left: progress_bar_size *-(6.5/10) ;
transform: rotate(0deg);
transform: scale(1.1);
border-radius: 0px
}
}
/*
@var checkbox chat_height "聊天室延伸(tabview衝突)" 0
@var number chat_width "聊天室欄寬" [400, 300, 800, 10, "px"]
// 聊天室延伸(tabview腳本衝突) チャット欄を画面一番下まで伸ばす
if chat_height {
ytd-live-chat-frame#chat {
height: calc(100vh *0.92) !important; //height: calc(100vh - 100px)
}
// 動画プレイヤー&チャット欄
#columns {
// 横幅を広く使うことでチャット欄を広くする
margin: -0px 0px 0px 0px !important;
max-width: 100% !important;
//影片上方空白消除
& > #primary,
& > #secondary{
padding-top: 0!important;
}
// コメント欄の幅を広げた状態で画面幅を狭めると画面が崩れる問題を防止
& > #primary > #primary-inner > #player > #player-container-outer {
.html5-video-container {
height: 100% !important;
& > video.video-stream.html5-main-video {
max-width: 100% !important;
max-height: 100% !important;
}}}
// chat聊天欄位_寬度コメント欄の幅を指定の幅にする
& > #secondary {
width: chat_width;
}
}
}
*/
//Tabview(腳本)按鈕極小化
if no-tab {
.ytd-watch-flexy.style-scope:not([fullscreen]) #material-tabs{
min-height:15px;
margin:-15px 0px -5px 0px;
background:rgba(0, 0, 0, 0);
height: 35px!important;
//min-height:tab-h;//@var range tab-h "Tabview高度" [15, 0, 15 , 5 ,"px"]
//tab資訊全隱藏if tab-h == 0 {display:none!important;}
}
//去除上下邊界空白
html body ytd-watch-flexy[class] #right-tabs {
contain: paint;
}
}
}