mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added "Skip Fourthwall Free Orders" setting
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user