Added new widget "Multistream Alerts"

This commit is contained in:
nuttylmao
2025-04-06 08:55:46 +10:00
parent a5b79592da
commit a2e2e01541
16 changed files with 1844 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings</title>
<style>
body {
margin: 0;
/* Remove default body margin */
display: flex;
/* Use flexbox for layout */
background: #181818;
}
#settings-container {
width: 600px;
/* 50% of viewport width */
min-width: 600px;
/* 50% of viewport width */
height: 100vh;
/* 100% of viewport height */
border: none;
/* Remove default iframe border */
}
#widget-container {
flex-grow: 1;
/* Allow the content-container to take up remaining space */
height: 100vh;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
.content-container {
width: 50vw;
height: 100vh;
background-color: #f0f0f0;
/* Example background for right side */
padding: 20px;
box-sizing: border-box;
/* Include padding in width/height */
}
</style>
</head>
<body>
<iframe id="settings-container"></iframe>
<div id="widget-container">
<iframe id="widget"></iframe>
</div>
<script src="script.js"></script>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
let settingsContainer = document.getElementById('settings-container');
settingsContainer.src = `../../.utilities/settings-page-builder?settingsJson=${window.location.href}/settings.json`
console.log(settingsContainer.src);
function reloadWidget(data) {
let widget = document.getElementById("widget");
widget.src = `${getParentUrl()}?${data}`;
}
function getParentUrl() {
const currentUrl = window.location.href;
const urlParts = currentUrl.split('/');
// Remove the last part of the URL (the current page/file)
urlParts.pop();
// Remove the last part again to go one directory up
urlParts.pop();
// Reconstruct the URL
const parentUrl = urlParts.join('/');
// Ensure there's a trailing slash if necessary (if it was a directory)
if (urlParts.length > 2 && !parentUrl.endsWith('/')) {
return parentUrl + '/';
}
return parentUrl;
}
+359
View File
@@ -0,0 +1,359 @@
{
"settings": [
{
"id": "showPlatform",
"label": "Show Platform",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showAvatar",
"label": "Show Avatar",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showTimestamps",
"label": "Show Timestamps",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showBadges",
"label": "Show Badges",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showPronouns",
"label": "Show Pronouns",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showUsername",
"label": "Show Username",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "showMessage",
"label": "Show Message",
"description": "Honestly, if you turn this off, you're stupid lmao",
"type": "checkbox",
"defaultValue": true,
"group": "Appearance"
},
{
"id": "font",
"label": "Font",
"description": "",
"type": "text",
"defaultValue": "",
"group": "Appearance"
},
{
"id": "fontSize",
"label": "Font Size",
"description": "",
"type": "number",
"min": 1,
"max": 120,
"defaultValue": 30,
"group": "Appearance"
},
{
"id": "lineSpacing",
"label": "Line Spacing",
"description": "",
"type": "number",
"min": 0,
"defaultValue": 1.7,
"step": ".1",
"group": "Appearance"
},
{
"id": "background",
"label": "Background",
"description": "",
"type": "color",
"defaultValue": "#000000",
"group": "Appearance"
},
{
"id": "opacity",
"label": "Background Opacity",
"description": "",
"type": "number",
"defaultValue": "0.85",
"min": 0,
"max": 1,
"step": ".01",
"group": "Appearance"
},
{
"id": "hideAfter",
"label": "Hide After",
"description": "Messages fade after X seconds (0 to disable)",
"type": "number",
"min": 0,
"max": 120,
"defaultValue": 0,
"group": "General"
},
{
"id": "excludeCommands",
"label": "Exclude Commands",
"description": "Hide messages starting with \"!\"",
"type": "checkbox",
"defaultValue": true,
"group": "General"
},
{
"id": "ignoreChatters",
"label": "Ignore Chatters",
"description": "Ignored chatters will not be shown",
"type": "text",
"defaultValue": "StreamElements,Streamlabs",
"group": "General"
},
{
"id": "scrollDirection",
"label": "Scroll Direction",
"description": "",
"type": "select",
"options": [
{
"value": 1,
"label": "Normal"
},
{
"value": 2,
"label": "Reversed"
}
],
"defaultValue": 1,
"group": "General"
},
{
"id": "inlineChat",
"label": "In-line Chat",
"description": "Remove the line space after the username",
"type": "checkbox",
"defaultValue": false,
"group": "General"
},
{
"id": "imageEmbedPermissionLevel",
"label": "Embed Images",
"description": "Automatically embed images for these users",
"type": "select",
"options": [
{
"value": 40,
"label": "Broadcaster"
},
{
"value": 30,
"label": "Mods & Broadcaster"
},
{
"value": 20,
"label": "VIPs, Mods & Broadcaster"
},
{
"value": 15,
"label": "Subs, VIPs, Mods & Broadcaster"
},
{
"value": 10,
"label": "Everyone"
},
{
"value": 69420,
"label": "Nobody"
}
],
"defaultValue": 20,
"group": "General"
},
{
"id": "showTwitchMessages",
"label": "Chat Messages",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showTwitchAnnouncements",
"label": "Announcements",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showTwitchSubs",
"label": "New Subscribers",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showTwitchChannelPointRedemptions",
"label": "Channel Point Redemptions",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showTwitchRaids",
"label": "Raids",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showTwitchSharedChat",
"label": "Shared Chat Messages",
"description": "",
"type": "select",
"options": [
{
"value": 2,
"label": "Show & Highlight"
},
{
"value": 1,
"label": "Show but do not highlight"
},
{
"value": 0,
"label": "Do not show"
}
],
"defaultValue": 2,
"group": "Which Twitch messages do you want to see?"
},
{
"id": "showYouTubeMessages",
"label": "Chat Messages",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube messages do you want to see?"
},
{
"id": "showYouTubeSuperChats",
"label": "Super Chats",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube messages do you want to see?"
},
{
"id": "showYouTubeSuperStickers",
"label": "Super Stickers",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube messages do you want to see?"
},
{
"id": "showYouTubeMemberships",
"label": "Memberships",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube messages do you want to see?"
},
{
"id": "showStreamlabsDonations",
"label": "Streamlabs Tips",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/streamlabs\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "showStreamElementsTips",
"label": "StreamElements Tips",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/streamelements\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "showPatreonMemberships",
"label": "Patreon Memberships",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/patreon\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "showKofiDonations",
"label": "Ko-fi Donations",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/ko-fi\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "showTipeeeStreamDonations",
"label": "TipeeeStream Donations",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/tipeee-stream\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "showFourthwallAlerts",
"label": "Fourthwall Alerts",
"description": "<a href=\"https://docs.streamer.bot/guide/integrations/fourthwall\" target=\"_blank\">Click to connect</a>",
"type": "checkbox",
"defaultValue": true,
"group": "Which donation messages do you want to see?"
},
{
"id": "furryMode",
"label": "Furry Mode",
"description": "Meow",
"type": "checkbox",
"defaultValue": false,
"group": "Very Important Stuff"
},
{
"id": "address",
"label": "Address",
"description": "Streamer.bot Websocket Server Address",
"type": "text",
"defaultValue": "127.0.0.1",
"group": "Advanced"
},
{
"id": "port",
"label": "Port",
"description": "Streamer.bot Websocket Server Port",
"type": "text",
"defaultValue": "8080",
"group": "Advanced"
}
]
}