Instantly share code, notes, and snippets.
Last active
September 18, 2020 05:11
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save kphrx/ee38e0bb4d31408b17d747a68184a230 to your computer and use it in GitHub Desktop.
If you want user script/style, click raw button of youtube-chat-hidden-name.user.{js,css}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Need `.yt-live-chat-text-message-renderer >` for ignored Super Chat/stickers design. */ | |
.yt-live-chat-text-message-renderer > #author-name { | |
display: none !important; | |
} | |
/* Floating left member badge. Need `.yt-live-chat-text-message-renderer >` for ignored Super Chat/stickers design. */ | |
.yt-live-chat-text-message-renderer > #chat-badges { | |
position: absolute; | |
top: 8px; | |
left: 2px; | |
} | |
/* Remove moderator badge. */ | |
.yt-live-chat-text-message-renderer > #chat-badges yt-live-chat-author-badge-renderer[type="moderator"] { | |
display: none !important; | |
} | |
/* Add indicator to owner. */ | |
.yt-live-chat-item-list-renderer[author-is-owner]::before { | |
content: ''; | |
position: absolute; | |
top: 12px; | |
left: 8px; | |
background-color: var(--yt-live-chat-author-chip-owner-background-color); | |
height: 8px; | |
width: 8px; | |
border-radius: 50%; | |
} | |
/* Highlight moderator's chat message. */ | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
background-color: var(--yt-live-chat-message-highlight-background-color); | |
} | |
/* Change text color for moderator and owner */ | |
/* | |
yt-live-chat-text-message-renderer[author-is-owner] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-author-chip-owner-background-color); | |
} | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-moderator-color, #5e84f1); | |
} | |
*/ | |
/* Adjust timestamp margin. If remove author photo, unnecessary this. */ | |
:root { | |
--yt-live-chat-item-timestamp-margin: 0 8px; | |
} | |
#author-photo.yt-live-chat-text-message-renderer { | |
margin-right: 8px !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Hidden Name from YouTube chat | |
@namespace dev.kpherox | |
@version 1.4.1 | |
@updateURL https://gist.github.com/kPherox/ee38e0bb4d31408b17d747a68184a230/raw/youtube-chat-hidden-name.user.css | |
@author kPherox <[email protected]> | |
@license CC0 1.0 | |
==/UserStyle== */ | |
@-moz-document domain("www.youtube.com") { | |
.yt-live-chat-text-message-renderer > #author-name, | |
.yt-live-chat-text-message-renderer > #chat-badges yt-live-chat-author-badge-renderer[type="moderator"] { | |
display: none !important; | |
} | |
.yt-live-chat-text-message-renderer > #chat-badges { | |
position: absolute; | |
top: 8px; | |
left: 2px; | |
} | |
.yt-live-chat-item-list-renderer[author-is-owner]::before { | |
content: ''; | |
position: absolute; | |
top: 12px; | |
left: 8px; | |
background-color: var(--yt-live-chat-author-chip-owner-background-color); | |
height: 8px; | |
width: 8px; | |
border-radius: 50%; | |
} | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
background-color: var(--yt-live-chat-message-highlight-background-color); | |
}/* | |
yt-live-chat-text-message-renderer[author-is-owner] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-author-chip-owner-background-color); | |
} | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-moderator-color, #5e84f1); | |
}*/ | |
:root { | |
--yt-live-chat-item-timestamp-margin: 0 8px; | |
} | |
#author-photo.yt-live-chat-text-message-renderer { | |
margin-right: 8px !important; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hidden Name from YouTube chat | |
// @namespace http://kpherox.dev/ | |
// @version 1.4.1 | |
// @updateURL https://gist.github.com/kPherox/ee38e0bb4d31408b17d747a68184a230/raw/youtube-chat-hidden-name.user.js | |
// @downloadURL https://gist.github.com/kPherox/ee38e0bb4d31408b17d747a68184a230/raw/youtube-chat-hidden-name.user.js | |
// @author kPherox <[email protected]> | |
// @license CC0 1.0 | |
// @match https://www.youtube.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle(` | |
.yt-live-chat-text-message-renderer > #author-name, | |
.yt-live-chat-text-message-renderer > #chat-badges yt-live-chat-author-badge-renderer[type="moderator"] { | |
display: none !important; | |
} | |
.yt-live-chat-text-message-renderer > #chat-badges { | |
position: absolute; | |
top: 8px; | |
left: 2px; | |
} | |
.yt-live-chat-item-list-renderer[author-is-owner]::before { | |
content: ''; | |
position: absolute; | |
top: 12px; | |
left: 8px; | |
background-color: var(--yt-live-chat-author-chip-owner-background-color); | |
height: 8px; | |
width: 8px; | |
border-radius: 50%; | |
} | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
background-color: var(--yt-live-chat-message-highlight-background-color); | |
}/* | |
yt-live-chat-text-message-renderer[author-is-owner] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-author-chip-owner-background-color); | |
} | |
yt-live-chat-text-message-renderer[author-type="moderator"] { | |
--yt-live-chat-primary-text-color: var(--yt-live-chat-moderator-color, #5e84f1); | |
}*/ | |
:root { | |
--yt-live-chat-item-timestamp-margin: 0 8px; | |
} | |
#author-photo.yt-live-chat-text-message-renderer { | |
margin-right: 8px !important; | |
} | |
`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment