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 showKofiDonations = GetBooleanParam("showKofiDonations", true);
const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true);
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
// Set fonts for the widget
document.body.style.fontFamily = font;
@@ -217,6 +218,36 @@ client.on('TipeeeStream.Donation', (response) => {
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');
}
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;
}
//////////////////////