Added "Skip Fourthwall Free Orders" setting

This commit is contained in:
nutty
2026-08-27 14:51:57 +10:00
parent 41a66d8c63
commit d44e6d31f5
6 changed files with 42 additions and 0 deletions
+5
View File
@@ -75,6 +75,7 @@ const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true);
const showKofiDonations = GetBooleanParam("showKofiDonations", true);
const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true);
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
const furryMode = GetBooleanParam("furryMode", false);
@@ -1198,6 +1199,10 @@ function FourthwallOrderPlaced(data) {
const item = data.variants[0].name;
const itemsOrdered = data.variants.length;
// Skip free orders if the user has chosen to do so
if (skipFourthwallFreeOrders && orderTotal == 0)
return;
let message = "";
// If there user did not provide a username, just say "Someone"
+9
View File
@@ -379,6 +379,15 @@
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "skipFourthwallFreeOrders",
"label": "Skip Free Orders",
"description": "If enabled, free orders from Fourthwall will be skipped.",
"type": "checkbox",
"defaultValue": true,
"showIf": "showFourthwallAlerts",
"group": "Which donation messages do you want to see?"
},
{
"id": "furryMode",
"label": "Furry Mode",
+5
View File
@@ -82,6 +82,7 @@ const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true);
const showKofiDonations = GetBooleanParam("showKofiDonations", true);
const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true);
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
const furryMode = GetBooleanParam("furryMode", false);
@@ -2045,6 +2046,10 @@ function FourthwallOrderPlaced(data) {
const itemImageUrl = data.variants[0].image;
const fourthwallProductImage = `<img src="${itemImageUrl}" class="productImage"/>`;
// Skip free orders if the user has chosen to do so
if (skipFourthwallFreeOrders && orderTotal == 0)
return;
avatarDiv.innerHTML = fourthwallProductImage;
let contents = "";
+9
View File
@@ -517,6 +517,15 @@
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "skipFourthwallFreeOrders",
"label": "Skip Free Orders",
"description": "If enabled, free orders from Fourthwall will be skipped.",
"type": "checkbox",
"defaultValue": true,
"showIf": "showFourthwallAlerts",
"group": "Which donation messages do you want to see?"
},
{
"id": "furryMode",
"label": "Furry Mode",
+5
View File
@@ -112,6 +112,7 @@ const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", f
const tipeeestreamDonationAction = urlParams.get("tipeeestreamDonationAction") || "";
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", false);
const fourthwallAlertAction = urlParams.get("fourthwallAlertAction") || "";
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
////////////////////
// HIDDEN OPTIONS //
@@ -1124,6 +1125,10 @@ function FourthwallOrderPlaced(data) {
const message = DecodeHTMLString(data.statmessageus);
const itemImageUrl = data.variants[0].image;
// Skip free orders if the user has chosen to do so
if (skipFourthwallFreeOrders && orderTotal == 0)
return;
// If there user did not provide a username, just say "Someone"
if (user == undefined)
user = "Someone";
@@ -628,6 +628,15 @@
"showIf": "showFourthwallAlerts",
"group": "Which donation alerts do you want to see?"
},
{
"id": "skipFourthwallFreeOrders",
"label": "Skip Free Orders",
"description": "If enabled, free orders from Fourthwall will be skipped.",
"type": "checkbox",
"defaultValue": true,
"showIf": "showFourthwallAlerts",
"group": "Which donation alerts do you want to see?"
},
{
"id": "address",
"label": "IP Address",