Author name of chat is hide or clip. Possible to change config in source code.
当前为
// ==UserScript==
// @name Youtube live, Chat author name hide/clip
// @name:ja Youtube live, チャット投稿者名 非表示/短縮
// @description Author name of chat is hide or clip. Possible to change config in source code.
// @description:ja チャット投稿者名が非表示または短縮表示にされます。スクリプトのソース内で設定変更できます。
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/live_chat*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// ================
// config
// ================
// if true, author name is hide
var isHideAuthorName = true;
var authorNameMaxWidth = 100;
// if true, user thumbnail is hide
var isHideThumbnail = false;
// if true, member badge is hide
var isHideBadge = false;
// if true, input panel is hide (you can't post chat / super chat)
var isHideFooter = false;
// if true, header is hide
var isHideHeader = true;
// ================
setTimeout(function () {
var stylesheet = "#author-name.yt-live-chat-author-chip ";
stylesheet += isHideAuthorName ? "{ display: none !important; }" : "{ max-width: " + authorNameMaxWidth + "px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }";
if (isHideThumbnail) {
stylesheet += "#author-photo { display: none !important; }";
}
if (isHideBadge) {
stylesheet += "#chat-badges { display: none !important; }";
}
if (isHideFooter) {
stylesheet += "#panel-pages { display: none !important; }";
}
if (isHideHeader) {
stylesheet += "yt-live-chat-header-renderer { display: none !important; }";
}
var $style = document.createElement("style");
$style.innerText = stylesheet;
document.body.appendChild($style);
}, 5000);
})();