- /* ==UserStyle==
- @name YT 簡化-控制項+按鈕
- @description youtube YT簡化-控制項+按鈕+進度條自定義修改youtube Simplify - control items + buttons + progress bar customize
- @namespace 1
- @homepageURL https://greasyfork.org/zh-TW/users/4839
- @author leadra
- @preprocessor stylus
- @version 1.7.3
- @license MIT
- @var checkbox ctrl_thin "控制項簡化" 1
- @var checkbox hide_btn "隱藏自動子母迷你劇院全螢" 1
- @var checkbox hide_btn2 "隱藏下載+超級感謝" 1
- @var checkbox hide_section "隱藏頻道音樂遊戲資訊" 0
- @var checkbox hide_right "隱藏右+下欄位" 0
- @var checkbox info_hide "隱藏資訊卡" 1
- @var checkbox hide_endcard "隱藏結束連結卡-移入才顯示" 1
- @var checkbox hide_ctrl "隱藏控制列-移入才顯示" 1
- @var checkbox title_h "影片標題+按鈕上下間距0" 1
- @var number title_top ">>>標題上間距" [0, -50, 20, 10, "px"]
- @var checkbox hide_ad "影片列表-廣告隱藏" 1
- @var checkbox ad_resume "影片列表-看過影片變暗" 0
- @var checkbox noround_livechat "去除圓角-聊天室+影片" 0
- @var checkbox noround_btn "去除圓角-按鈕" 0
- @var checkbox progress_bar "進度條自定義" 1
- @var number progress_bar_size "進度條圖片大小" [80, 0, 200, 10, "px"]
- @var text progress_url "進度條URL" "url(https://raw.githubusercontent.com/leadra/pic/main/kurara.gif)"
- @var checkbox no_tab "----------Tabview(腳本)--------->>>按鈕極小化" 1
- @var checkbox scroll_hide ">>>卷軸Y隱藏" 1
- @var checkbox times_watched ">>>觀看次數位置上移" 0
- @var checkbox speed_button "--------YT Speed (腳本)------->>>按鈕位置修改" 0
- @var number speed_top ">>>按鈕上下(%)" [1.5, -10, 20, 0.5, "%"]
- @var number speed_left ">>>按鈕左右(%)" [30, 0, 70, 5, "%"]
- @var number speed_size ">>>按鈕大小(px)" [13, 0, 30, 1, "px"]
- ==/UserStyle== */
-
- /*
- 搭配腳本用:
- ----------Tabview(腳本)---------按鈕極小化
- https://greasyfork.org/zh-TW/scripts/428651
- >>>觀看次數位置上移(搭配Tabview服用,以免資訊列變窄)
- >>>卷軸Y隱藏
-
- YT Speed Buttons(L改)
- https://greasyfork.org/zh-TW/scripts/484535
- >>>按鈕位置修改+大小
- */
-
- /*引用感謝[CSS]
- YT隱藏控制項(滑鼠移入才會顯示https://greasyfork.org/zh-TW/scripts/446045
- YT隱藏進度條(滑鼠移入才會顯示https://greasyfork.org/zh-TW/scripts/437994
- YT播放器簡化https://greasyfork.org/zh-TW/scripts/445999
- YT網頁版面調整https://github.com/sapondanaisriwan/AdashimaaTube
- YT進度條突出顯示https://greasyfork.org/zh-TW/scripts/402635
- YT主題:皮卡丘介面https://userstyles.org/styles/194352/poketube
- YT電影廣告消除https://greasyfork.org/zh-TW/scripts/468212
- YT所有頁面:看過影片變暗https://greasyfork.org/zh-TW/scripts/419722
- YT隱藏「下載、剪輯和感謝(包括推廣)」按鈕https://greasyfork.org/zh-TW/scripts/447614
- YT隱藏結束卡https://greasyfork.org/zh-TW/scripts/408725
- */
- @-moz-document url-prefix("https://www.youtube.com/watch?v=") {
- /*顯示隱藏即時通訊鈕-高度調整//@var checkbox hide_chat_head "即時通訊鈕緊縮" 0
- if hide_chat_head{
- #show-hide-button > .ytd-live-chat-frame.style-scope{padding:0px!important;margin: -0px 0px -0px 0px!important;}
- //文字部分.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--text{padding:0px!important;margin: -0px 0px -0px 0px!important;line-height:1em;height:1em;opacity:0.5;}
- //tabview聊天室新開視窗按鈕位置修正ytd-watch-flexy[flexy][is-two-columns_] #chat.tyt-chat-frame-ready:not([collapse]) tyt-iframe-popup-btn.tyt-btn-enabled {padding: 0px !important;margin: 0px 30px -0px 0px!important;width:2em;height:2em;bottom:auto;}}*/
-
- //去除圓角-聊天室+影片
- 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 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;
- }}
-
- //控制項簡化:保留音量提示
- if ctrl_thin{
- .ytp-bezel,//中間LOGO
- .ytp-doubletap-ui-legacy,//左右側前進、後退
- .ytp-doubletap-ui,//去除縮略圖上的播放提示
- .ytp-gradient-top,//上邊漸進黑
- //.ytp-gradient-bottom,//下邊漸進黑
- .ytp-chrome-top,//全螢幕上方標題
- //.ytp-pip-button.ytp-button,//子母畫面(舊版)
- //.ytp-size-button.ytp-button,//劇院模式
- //.ytp-miniplayer-button.ytp-button,//迷你
- //.ytp-autonav-toggle-button,//自動播放(背景元素無法去除)
- //.c4-player-container.c4-flexible-player-container,
- 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_btn{#movie_player div.ytp-chrome-controls button.ytp-pip-button.ytp-button,button[data-tooltip-target-id="ytp-autonav-toggle-button"],.ytp-miniplayer-button.ytp-button,.ytp-size-button.ytp-button,.ytp-fullscreen-button.ytp-button{display:none !important;}}
- /*按鈕隱藏>下載+超級感謝*/
- if hide_btn2{ytd-download-button-renderer ,#flexible-item-buttons [aria-label="Thanks"],#flexible-item-buttons [title="Show support with Super Thanks"] {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 ,#offer-module.ytd-watch-next-secondary-results-renderer{display: none;}
- //影片列表-廣告
- td-promoted-sparkles-web-renderer,ytd-ad-slot-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 info_hide {#columns #player .ytp-iv-player-content, ytd-watch-flexy .ytp-iv-player-content{display: none;}}
- /*影片標題+按鈕上下間距*/
- if title_h{
- /*標題上間距*/
- body ytd-watch-flexy[cinematics-enabled] #below.ytd-watch-flexy{letter-spacing:-0px;margin: title_top 0px -0px 0px!important;}//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 -0px 0px!important;}
- /*會員專屬標題*/
- .badge-style-type-members-only.ytd-badge-supported-renderer {margin: -0px 0px -60px 140px;position: relative ; z-index: -10;}
- //標題列-頻道名稱
- .style-scope.ytd-video-owner-renderer{
- padding:0px 0px;
- margin: 0px 0px 0px -0px!important;
- max-width: 300px!important;
- line-height:1em!important;
- }
- .ytd-channel-name{padding:0px 0px 0px 0px;margin: 0px 0px 0px -0px;}
- //#upload-info.ytd-video-owner-renderer{padding:0;margin: -0px 0px -0px -0px!important;}
- //頻道訂閱數
- #owner-sub-count.ytd-video-owner-renderer{
- font-size: 16px;
- line-height:1em!important;
- }
- //觀看次數文字
- #info-container.ytd-watch-info-text{
- margin: 0px 0px 0px 10px;
- font-size:16px;
- }
- }
-
- //隱藏頻道音樂遊戲資訊🎵🎮
- if hide_section{ytd-video-description-infocards-section-renderer , ytd-horizontal-card-list-renderer.style-scope.ytd-structured-description-content-renderer , #contents.ytd-rich-metadata-row-renderer {display: none ;}}
- //隱藏右+下欄位
- if hide_right{ytd-watch-flexy[cinematics-enabled] #secondary.ytd-watch-flexy {display: none ;}//{position: fixed ; z-index: 1;left:0;opacity:0.7}
- ytd-watch-metadata.watch-active-metadata.style-scope.ytd-watch-flexy{display: none ;}
- }
- //隱藏右+下欄位
- if hide_endcard {
- div[class*="video-player"]:not(:hover) div[class^="ytp-ce"],
- div[class*="ytp-autohide"] div[class^="ytp-ce"] {
- display: none !important;
- }}
- /*炒飯進度條*/
- 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-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;
- background-image: progress_url;
- 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)}
- // chat欄位無邊界+影片上方空白消除+chat聊天室欄寬
- #columns {margin: -0px 0px 0px 0px !important; max-width: 100% !important;
- & > #primary,& > #secondary{padding-top: 0!important;}
- & > #secondary {width: chat_width;}}}
- */
- //Tabview(腳本)按鈕極小化
- if no_tab {
- ytd-watch-flexy #right-tabs .tab-btn[tyt-tab-content]{
- padding:0;
- font-size:18px;
- line-height:1em;
- }
- }
- //卷軸Y隱藏
- if scroll_hide{
- html {
- scrollbar-color: auto !important;
- scrollbar-width: auto !important;
- }
- ::-webkit-scrollbar {
- display:none!important;
- }
- }
- //觀看次數上移
- if times_watched {
- //觀看次數區
- #bottom-row.ytd-watch-metadata{
- margin: -0px 0px 0px 0px!important;
- max-width: 25%!important;
- position: relative;
- z-index:-0;
- left:450px;
- bottom:35px;
- }
- //標題列右側
- #actions-inner.ytd-watch-metadata{max-width: 80%;}
- //標題列右側按鈕
- .yt-spec-button-shape-next__button-text-content{
- max-width:35px;
- margin: -0px -0px -0px -5px!important;
- }
- .yt-spec-button-shape-next--mono.yt-spec-button-shape-next--tonal {
- padding:0px 5px 0px 10px;margin: 0px 0px 0px -0px;
- }
- }
-
- //YT速度按鈕位置https://greasyfork.org/zh-TW/scripts/484535
- if speed_button{
- div.vsb-container {margin-left: speed_left !important;
- margin-top: speed_top !important;
- position: fixed;
- font-size:speed_size;
- }
- }
-
- }