YouTube – Standard DOM Capture
Implementation: sources/youtube.js
- Needs the live chat tab open in a signed-in browser session. Membership and gift cards only render for the channel owner or authorized moderators.
- Viewer counts require Show viewer count or Hype Mode to be enabled in settings.
- For follower alerts and additional events, enable WebSocket mode in extension settings.
| Event | When it Fires | Payload Notes |
|---|---|---|
sponsorship |
Membership welcome header without explicit chat text (new members, gifted bundles landing). | membership populated with translated “MEMBERSHIP”; subtitle contains streak/tier when detected. |
giftpurchase |
Gift bundle purchase banner (ytd-sponsorships-live-chat-gift-purchase). |
membership becomes gift_giver; subtitle carries the gift count when known; no hasDonation or donoValue. |
giftredemption |
Gift redemption announcement for recipients. | membership becomes “MEMBERSHIP”; subtitle includes “Gifted by …”. |
sponsorship |
Structured welcome cards or localized “Welcome to …” text. | membership “MEMBERSHIP”; subtitle carries tier/title; nameColor uses membership green when allowed. |
resub |
Upgrade banners that include “upgraded to …”. | subtitle captures new tier label; membership remains “MEMBERSHIP”. |
superchat, supersticker, jeweldonation |
Super Chats, Super Stickers, donation announcement cards, and YouTube Gifts powered by Jewels (yt-gift-message-view-model). |
hasDonation carries the value; event identifies the YouTube paid item type. YouTube Gifts use N Jewels when present, or 1 YouTube Gift when YouTube hides the count. Gift images use contentimg, gift labels use subtitle, and minimal gift details are mirrored under meta.youtubeGift. |
thankyou |
Fallback message when a donation amount exists but no chat text was supplied. | Keeps hasDonation and auto-injects “Thank you for your donation!” for overlays. |
redirect |
YouTube redirect banner appears in live chat (the closest equivalent to a raid notice). | DOM-only capture from yt-live-chat-banner-redirect-renderer. Sets event to redirect and uses membership as the label so overlays render it like other system notices. |
viewer_update |
30s poll of Social Stream’s viewer endpoint (fallback to page scrape on quota errors). | meta is the live viewer integer; contributes to aggregated viewer_updates in the background script. |
Membership blocks also set membership for moderator/member chat, while subtitle carries either month counts or tier names. sourceName/sourceImg populate once getChannelInfo succeeds. Standard DOM chat now includes meta.messageId when YouTube exposes a native live-chat message ID, which the dock uses for delete sync.