mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Added profile picture support for YouTube
This commit is contained in:
@@ -233,8 +233,8 @@ async function CustomEvent(data) {
|
|||||||
// YouTube Events
|
// YouTube Events
|
||||||
case ('YouTubeNewSponsor'):
|
case ('YouTubeNewSponsor'):
|
||||||
{
|
{
|
||||||
if (data.profileImageUrl)
|
if (data.userProfileUrl)
|
||||||
avatarEl.src = data.profileImageUrl;
|
avatarEl.src = data.userProfileUrl;
|
||||||
else
|
else
|
||||||
avatarEl.style.display = 'none';
|
avatarEl.style.display = 'none';
|
||||||
|
|
||||||
@@ -249,8 +249,8 @@ async function CustomEvent(data) {
|
|||||||
break;
|
break;
|
||||||
case ('YouTubeGiftMembershipReceived'):
|
case ('YouTubeGiftMembershipReceived'):
|
||||||
{
|
{
|
||||||
if (data.profileImageUrl)
|
if (data.gifterProfileUrl)
|
||||||
avatarEl.src = data.profileImageUrl;
|
avatarEl.src = data.gifterProfileUrl;
|
||||||
else
|
else
|
||||||
avatarEl.style.display = 'none';
|
avatarEl.style.display = 'none';
|
||||||
titleEl.innerText = `Gifted Membership`;
|
titleEl.innerText = `Gifted Membership`;
|
||||||
@@ -266,8 +266,8 @@ async function CustomEvent(data) {
|
|||||||
break;
|
break;
|
||||||
case ('YouTubeSuperChat'):
|
case ('YouTubeSuperChat'):
|
||||||
{
|
{
|
||||||
if (data.profileImageUrl)
|
if (data.userProfileUrl)
|
||||||
avatarEl.src = data.profileImageUrl;
|
avatarEl.src = data.userProfileUrl;
|
||||||
else
|
else
|
||||||
avatarEl.style.display = 'none';
|
avatarEl.style.display = 'none';
|
||||||
titleEl.style.fontSize = '2em';
|
titleEl.style.fontSize = '2em';
|
||||||
@@ -286,9 +286,8 @@ async function CustomEvent(data) {
|
|||||||
break;
|
break;
|
||||||
case ('YouTubeSuperSticker'):
|
case ('YouTubeSuperSticker'):
|
||||||
{
|
{
|
||||||
// TODO: Need to add image URL of Super Sticker
|
if (data.stickerImageUrl)
|
||||||
if (data.profileImageUrl)
|
avatarEl.src = data.stickerImageUrl;
|
||||||
avatarEl.src = data.profileImageUrl;
|
|
||||||
else
|
else
|
||||||
avatarEl.style.display = 'none';
|
avatarEl.style.display = 'none';
|
||||||
titleEl.style.fontSize = '2em';
|
titleEl.style.fontSize = '2em';
|
||||||
|
|||||||
Reference in New Issue
Block a user