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:
@@ -75,6 +75,7 @@ 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);
|
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
|
||||||
|
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
|
||||||
|
|
||||||
const furryMode = GetBooleanParam("furryMode", false);
|
const furryMode = GetBooleanParam("furryMode", false);
|
||||||
|
|
||||||
@@ -1198,6 +1199,10 @@ function FourthwallOrderPlaced(data) {
|
|||||||
const item = data.variants[0].name;
|
const item = data.variants[0].name;
|
||||||
const itemsOrdered = data.variants.length;
|
const itemsOrdered = data.variants.length;
|
||||||
|
|
||||||
|
// Skip free orders if the user has chosen to do so
|
||||||
|
if (skipFourthwallFreeOrders && orderTotal == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
let message = "";
|
let message = "";
|
||||||
|
|
||||||
// If there user did not provide a username, just say "Someone"
|
// If there user did not provide a username, just say "Someone"
|
||||||
|
|||||||
@@ -379,6 +379,15 @@
|
|||||||
"defaultValue": true,
|
"defaultValue": true,
|
||||||
"group": "Which donation messages do you want to see?"
|
"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",
|
"id": "furryMode",
|
||||||
"label": "Furry Mode",
|
"label": "Furry Mode",
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ 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);
|
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
|
||||||
|
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
|
||||||
|
|
||||||
const furryMode = GetBooleanParam("furryMode", false);
|
const furryMode = GetBooleanParam("furryMode", false);
|
||||||
|
|
||||||
@@ -2045,6 +2046,10 @@ function FourthwallOrderPlaced(data) {
|
|||||||
const itemImageUrl = data.variants[0].image;
|
const itemImageUrl = data.variants[0].image;
|
||||||
const fourthwallProductImage = `<img src="${itemImageUrl}" class="productImage"/>`;
|
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;
|
avatarDiv.innerHTML = fourthwallProductImage;
|
||||||
|
|
||||||
let contents = "";
|
let contents = "";
|
||||||
|
|||||||
@@ -517,6 +517,15 @@
|
|||||||
"defaultValue": true,
|
"defaultValue": true,
|
||||||
"group": "Which donation messages do you want to see?"
|
"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",
|
"id": "furryMode",
|
||||||
"label": "Furry Mode",
|
"label": "Furry Mode",
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", f
|
|||||||
const tipeeestreamDonationAction = urlParams.get("tipeeestreamDonationAction") || "";
|
const tipeeestreamDonationAction = urlParams.get("tipeeestreamDonationAction") || "";
|
||||||
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", false);
|
const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", false);
|
||||||
const fourthwallAlertAction = urlParams.get("fourthwallAlertAction") || "";
|
const fourthwallAlertAction = urlParams.get("fourthwallAlertAction") || "";
|
||||||
|
const skipFourthwallFreeOrders = GetBooleanParam("skipFourthwallFreeOrders", true);
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
// HIDDEN OPTIONS //
|
// HIDDEN OPTIONS //
|
||||||
@@ -1124,6 +1125,10 @@ function FourthwallOrderPlaced(data) {
|
|||||||
const message = DecodeHTMLString(data.statmessageus);
|
const message = DecodeHTMLString(data.statmessageus);
|
||||||
const itemImageUrl = data.variants[0].image;
|
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 there user did not provide a username, just say "Someone"
|
||||||
if (user == undefined)
|
if (user == undefined)
|
||||||
user = "Someone";
|
user = "Someone";
|
||||||
|
|||||||
@@ -628,6 +628,15 @@
|
|||||||
"showIf": "showFourthwallAlerts",
|
"showIf": "showFourthwallAlerts",
|
||||||
"group": "Which donation alerts do you want to see?"
|
"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",
|
"id": "address",
|
||||||
"label": "IP Address",
|
"label": "IP Address",
|
||||||
|
|||||||
Reference in New Issue
Block a user