YT Theater Chat

YouTube Livestreams Theater Mode擴充的CSS修正

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

/* ==UserStyle==
@name           YT Theater Chat
@namespace      https://greasyfork.org/zh-TW/users/4839
@homepageURL    https://greasyfork.org/zh-TW/scripts/478850
@version        1.3.1
@description    YouTube Livestreams Theater Mode擴充的CSS修正
@author         Leadra
@license        MIT
@preprocessor   stylus
@var range      text_pr                "聊天行距"        [-2, -10, 10, 1, "px"]
@var checkbox   hide_ctrl         "永久顯示控制列"           1
@var checkbox   search_hide       "隱藏式搜尋"           1
@var number     hide_se           "顯示偵測高度px"       [10, 0, 50, 2, "px"]
@var number     player_top           "影片靠上px"       [-20, -30, 0, 5, "px"]
@var checkbox   related_vi         "隱藏建議影片"           0
@var checkbox	theater_chat	"劇場模式chat邊界"			1
@var checkbox	user_pic		"劇場模式大頭貼顯示"			1
@var checkbox	input_set		"input打字區調整"			0
@var checkbox	hide_user_name	"name隱藏"				0
==/UserStyle== */
@-moz-document url-prefix("https://www.youtube.com/live_chat"), url-prefix("https://www.youtube.com/watch"), url-prefix("https://www.youtube.com/live/") {
    /* --------------------------------------------------------------- */
/*YouTube Livestreams Theater Mode 邊界調整*/
if theater_chat {
[data-ytlstm-theater-mode] yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer {
        margin: 10px -0px -0px -0px ;
}
/*
 #items {
    padding: 0px 0px 0px -0px !important;
    margin: -0px -0px -0px -0px !important;
}*/
/*聊天行距*/
 #items > * {padding: 0px 0px 0px 10px !important;margin: text_pr -0px text_pr -15px !important;}
yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer .yt-live-chat-text-message-renderer{
        margin: text_pr -0px text_pr -0px ;
}
/*相容tabview後規則失效-使用上面的items全面更改
[data-ytlstm-theater-mode] yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer
#chat #items .yt-live-chat-text-message-renderer {padding: 0px 0px 0px 0px;margin: 0px 0px -0px -0px ;}*/
[data-ytlstm-theater-mode] yt-live-chat-text-message-renderer.yt-live-chat-item-list-renderer
#message.yt-live-chat-text-message-renderer {
    padding: 0px 0px 0px 0px;
    margin: 10px 0px -0px -0px ;}

    [data-ytlstm-chat-over-video] yt-live-chat-text-message-renderer #content {
    padding: 0px;
    margin: 0px 0px -0px -0px ;
    border-radius: 10px;
}
 /* 大頭貼profile picture */
    //#avatar.yt-live-chat-message-input-renderer,
    //#avatar.yt-live-chat-message-input-renderer > img,
     #author-photo.yt-live-chat-text-message-renderer,
    #author-photo.yt-live-chat-text-message-renderer > img {
        margin: 0px;
        /*強制顯示大頭貼*/
    if user_pic {display: block!important;}
    }
/*chat聊天室框架恢復原設定*/
html:not(:hover)[data-ytlstm-chat-over-video] yt-live-chat-message-input-renderer,
[data-ytlstm-chat-over-video] yt-live-chat-banner-manager,
[data-ytlstm-chat-over-video] yt-live-chat-restricted-participation-renderer,   
html:not(:hover)[data-ytlstm-chat-over-video] #contents #ticker,
html:not(:hover)[data-ytlstm-chat-over-video] #contents #separator ,
html:hover[data-ytlstm-chat-over-video] #contents #ticker,
html:hover[data-ytlstm-chat-over-video] #contents #separator ,
html:hover[data-ytlstm-chat-over-video] yt-live-chat-message-input-renderer,
//html:hover[data-ytlstm-chat-over-video] yt-live-chat-header-renderer,
//html:not(:hover)[data-ytlstm-chat-over-video] yt-live-chat-header-renderer,
{
    display: block!important;
    margin:  -0px;
}
html:hover[data-ytlstm-chat-over-video] yt-live-chat-header-renderer{display: block;}//position: absolute;z-index:1;
html:not(:hover)[data-ytlstm-chat-over-video] yt-live-chat-header-renderer{display: none;}
html:not(:hover)[data-ytlstm-chat-over-video] yt-live-chat-ticker-renderer{display: none!important;}
html:hover[data-ytlstm-chat-over-video] yt-live-chat-ticker-renderer{display: block!important;}

/*chatheader聊天頂部欄位調整*/
yt-live-chat-header-renderer {
    margin:-0px 0px -0px 0px!important;
    padding: unset;
}
    yt-dropdown-menu.yt-sort-filter-sub-menu-renderer {
margin: 0px 0px 0px 0px;
    }
}

if input_set{
/*input頭像*/
    //#avatar.yt-live-chat-message-input-renderer {margin:0px 0px -0px 0px !important;visibility:hidden!important;display:block;}
/* input打字輸入區 */
    yt-live-chat-message-input-renderer {
        padding: 0px 0px 0px 0px!important;
        margin:0px 0px 0px -0px!important;
        //overflow: unset;//隱藏元素不消除佔位
    }
    /*input總區塊*/
#input-panel.yt-live-chat-renderer.iron-selected {
            background-color:rgba(0, 0, 0,0.1);
    }
    }

    /*name隱藏*/
    if hide_user_name {
        yt-live-chat-text-message-renderer > #content > yt-live-chat-author-chip > #author-name {
            display: none;
        }
    }
    
}
@-moz-document url-prefix("https://www.youtube.com/watch"), url-prefix("https://www.youtube.com/live/") {

	/*永久顯示控制列*/
if hide_ctrl{
	[data-ytlstm-theater-mode]{
.ytp-chrome-bottom {opacity:1 !important;}}
//.ytp-chrome-bottom:hover  {opacity:1;background:rgba(0, 0, 0, .4) !important;}
        }
		[data-ytlstm-theater-mode]{
		ytd-watch-flexy[flexy] #player-container.ytd-watch-flexy{
			top:player_top;
		}}
	/*隱藏式搜尋*/
if search_hide{
		
	:root {
	[data-ytlstm-theater-mode]{
  --ytd-toolbar-height: 0px;
		--ytd-masthead-height: 0px;
	}
	}
#masthead-container #masthead{
	opacity:0;
	width:100% !important;
	hide_se = hide_se - 56px;
	margin-top:hide_se !important;
	padding:0px!important;
	//display:none!important;
	}
#masthead-container:not([data-open=true]) #masthead:hover{
	opacity:1;
  	margin-top:-0px!important;
	background:#000
	}
 #related{display:none;if related_vi}
}

}