Begun adding support for Fourthwall

This commit is contained in:
nuttylmao
2025-03-27 10:01:28 +11:00
parent 702929c95e
commit 2d13230cff
6 changed files with 158 additions and 0 deletions
+67
View File
@@ -49,6 +49,7 @@ const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true);
const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true);
const showKofiDonations = GetBooleanParam("showKofiDonations", true); const showKofiDonations = GetBooleanParam("showKofiDonations", true);
const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true); const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true);
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
// Set fonts for the widget // Set fonts for the widget
document.body.style.fontFamily = font; document.body.style.fontFamily = font;
@@ -217,6 +218,36 @@ client.on('TipeeeStream.Donation', (response) => {
TipeeeStreamDonation(response.data); TipeeeStreamDonation(response.data);
}) })
client.on('Fourthwall.GiftPurchase', (response) => {
console.debug(response.data);
FourthwallGiftPurchase(response.data);
})
client.on('Fourthwall.OrderPlaced', (response) => {
console.debug(response.data);
FourthwallOrderPlaced(response.data);
})
client.on('Fourthwall.Donation', (response) => {
console.debug(response.data);
FourthwallDonation(response.data);
})
client.on('Fourthwall.SubscriptionPurchased', (response) => {
console.debug(response.data);
FourthwallSubscriptionPurchased(response.data);
})
client.on('Fourthwall.GiftDrawStarted', (response) => {
console.debug(response.data);
FourthwallGiftDrawStarted(response.data);
})
client.on('Fourthwall.GiftDrawEnd', (response) => {
console.debug(response.data);
FourthwallGiftDrawEnd(response.data);
})
///////////////////// /////////////////////
@@ -801,6 +832,42 @@ function TipeeeStreamDonation(data) {
ShowAlert(message, 'tipeeeStream'); ShowAlert(message, 'tipeeeStream');
} }
function FourthwallGiftPurchase(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallOrderPlaced(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallDonation(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallSubscriptionPurchased(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallGiftDrawStarted(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallGiftDrawEnd(data) {
if (!showFourthwallAlerts)
return;
}
////////////////////// //////////////////////
+8
View File
@@ -231,6 +231,14 @@
"defaultValue": true, "defaultValue": true,
"group": "Which donation messages do you want to see?" "group": "Which donation messages do you want to see?"
}, },
{
"id": "showFourthwallAlerts",
"label": "Fourthwall Alerts",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{ {
"id": "address", "id": "address",
"label": "Address", "label": "Address",
+4
View File
@@ -253,6 +253,10 @@ li {
background: linear-gradient(#120e23, #5d192a) !important; background: linear-gradient(#120e23, #5d192a) !important;
} }
.fourthwall {
background: linear-gradient(#405eb3, #0d3cb9) !important;
}
/****************/ /****************/
/** ANIMATIONS **/ /** ANIMATIONS **/
/****************/ /****************/
+67
View File
@@ -48,6 +48,7 @@ const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true);
const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true);
const showKofiDonations = GetBooleanParam("showKofiDonations", true); const showKofiDonations = GetBooleanParam("showKofiDonations", true);
const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true); const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true);
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
// Set fonts for the widget // Set fonts for the widget
document.body.style.fontFamily = font; document.body.style.fontFamily = font;
@@ -231,6 +232,36 @@ client.on('TipeeeStream.Donation', (response) => {
TipeeeStreamDonation(response.data); TipeeeStreamDonation(response.data);
}) })
client.on('Fourthwall.GiftPurchase', (response) => {
console.debug(response.data);
FourthwallGiftPurchase(response.data);
})
client.on('Fourthwall.OrderPlaced', (response) => {
console.debug(response.data);
FourthwallOrderPlaced(response.data);
})
client.on('Fourthwall.Donation', (response) => {
console.debug(response.data);
FourthwallDonation(response.data);
})
client.on('Fourthwall.SubscriptionPurchased', (response) => {
console.debug(response.data);
FourthwallSubscriptionPurchased(response.data);
})
client.on('Fourthwall.GiftDrawStarted', (response) => {
console.debug(response.data);
FourthwallGiftDrawStarted(response.data);
})
client.on('Fourthwall.GiftDrawEnd', (response) => {
console.debug(response.data);
FourthwallGiftDrawEnd(response.data);
})
/////////////////////// ///////////////////////
@@ -1325,6 +1356,42 @@ function TipeeeStreamDonation(data) {
AddMessageItem(instance, data.id); AddMessageItem(instance, data.id);
} }
function FourthwallGiftPurchase(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallOrderPlaced(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallDonation(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallSubscriptionPurchased(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallGiftDrawStarted(data) {
if (!showFourthwallAlerts)
return;
}
function FourthwallGiftDrawEnd(data) {
if (!showFourthwallAlerts)
return;
}
////////////////////// //////////////////////
+8
View File
@@ -293,6 +293,14 @@
"defaultValue": true, "defaultValue": true,
"group": "Which donation messages do you want to see?" "group": "Which donation messages do you want to see?"
}, },
{
"id": "showFourthwallAlerts",
"label": "Fourthwall Alerts",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{ {
"id": "address", "id": "address",
"label": "Address", "label": "Address",
+4
View File
@@ -219,6 +219,10 @@ li {
background: linear-gradient(#120e23, #5d192a) !important; background: linear-gradient(#120e23, #5d192a) !important;
} }
.fourthwall {
background: linear-gradient(#405eb3, #0d3cb9) !important;
}
/****************/ /****************/
/** ANIMATIONS **/ /** ANIMATIONS **/
/****************/ /****************/