From 13ef782a857bef7d94b617990147281b55e32c97 Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Mon, 22 Sep 2025 07:50:09 +1000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20Custom=20CSS=20options=20didn't=20w?= =?UTF-8?q?ork=20lol=20=E2=80=A2=20Turned=20them=20into=20hidden=20URL=20p?= =?UTF-8?q?arameters=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- horizontal-chat/script.js | 80 +++++++++++++++++++++++++++++++------ horizontal-chat/style.css | 1 - multichat-overlay/script.js | 80 +++++++++++++++++++++++++++++++------ multichat-overlay/style.css | 1 - 4 files changed, 136 insertions(+), 26 deletions(-) diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index 5a58dc3..6cf5fbe 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -19,17 +19,6 @@ let alertQueue = []; const kickPusherWsUrl = 'wss://ws-us2.pusher.com/app/32cbd69e4b950bf97679?protocol=7&client=js&version=7.6.0&flash=false'; let kickSubBadges = []; -///////////////// -// CSS OPTIONS // -///////////////// - -const randomYouTubeColors = getComputedStyle(document.documentElement).getPropertyValue('--random-youtube-colors').trim() === '1'; -const youtubeColor = getComputedStyle(document.documentElement).getPropertyValue('--youtube-color').trim(); -const youtubeCustomSubIcon = getComputedStyle(document.documentElement) - .getPropertyValue('--youtube-custom-sub-icon') - .trim() - .replace(/^["']|["']$/g, ''); // removes surrounding quotes - ///////////// // OPTIONS // ///////////// @@ -87,7 +76,20 @@ const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true); const furryMode = GetBooleanParam("furryMode", false); +//////////////////// +// HIDDEN OPTIONS // +//////////////////// + const animationSpeed = GetIntParam("animationSpeed", 0.5); +const randomYouTubeColors = GetBooleanParam("randomYouTubeColors", false); +const youtubeColor = urlParams.get("youtubeColor") || "#f70000"; +const youtubeCustomSubIcon = urlParams.get("youtubeCustomSubIcon") || ""; + + + +//////////////// +// PAGE SETUP // +//////////////// // Set fonts for the widget document.body.style.fontFamily = font; @@ -1795,4 +1797,58 @@ function SetConnectionStatus(connected) { statusContainer.style.transition = ""; statusContainer.style.opacity = 1; } -} \ No newline at end of file +} + +let data = { + "message": "Dat quality šŸ‘€", + "emotes": [ + { + "type": "Twemoji", + "name": "šŸ‘€", + "startIndex": 12, + "endIndex": 13, + "imageUrl": "https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.0/assets/72x72/1f440.png" + } + ], + "parts": [ + { + "text": "Dat quality šŸ‘€" + } + ], + "broadcast": { + "id": "x6kgY3g_64U", + "channelId": "UCI5t_ve3cr5a1_3rrmbp6jQ", + "liveChatId": "KicKGFVDSTV0X3ZlM2NyNWExXzNycm1icDZqURILeDZrZ1kzZ182NFU", + "title": "Testing 1440p Enhanced Broadcasting šŸ‘€šŸ‘€", + "description": "šŸ”„ *DOWNLOAD MY CUSTOM WIDGETS FOR YOUR STREAM*\n*https://nutty.gg*\n\nšŸ“ø *Streaming gear I use*\nhttps://nutty.gg/gear\n\nšŸŽ™ļø *Elgato Products*\nhttps://elgato.sjv.io/oqZN09 - 5% OFF with code \"nutty\"\n\nšŸ–¼ļø *Nerd Or Die*\nhttps://nerdordie.com/shop/ref/nuttylmao - 15% OFF with code \"nutty\"\n\nšŸŽµ *Epidemic Sound - Royalty Free Music + Sound FX*\nhttp://share.epidemicsound.com/nutty\n\nāœ‰ļø *Business Inquiries Only*\nnuttylmao@gmail.com\n\n*Socials*\nhttps://www.youtube.com/nuttylmao\nhttps://www.twitch.tv/nutty\nhttps://twitter.com/nuttylmao\nhttps://discord.gg/V4rvjrb\nhttps://www.patreon.com/nuttylmao", + "categoryId": "20", + "privacy": "unlisted", + "publishedAt": "2025-09-19T14:21:41Z", + "scheduledStartTime": "2025-09-19T14:25:14.3844374Z", + "scheduledEndTime": "2025-09-19T14:25:14.3844374Z", + "actualStartTime": "2025-09-19T14:25:14.3844374Z", + "actualEndTime": "2025-09-19T14:25:14.3844374Z", + "tags": [ + "nutty" + ], + "defaultLanguage": "en", + "defaultAudioLanguage": "en", + "status": "live" + }, + "eventId": "LCC.EhwKGkNJX2gwODJLNVk4REZYVEN3Z1FkWkZvREdR", + "user": { + "id": "UCI5t_ve3cr5a1_3rrmbp6jQ", + "url": "http://www.youtube.com/channel/UCI5t_ve3cr5a1_3rrmbp6jQ", + "name": "nutty", + "profileImageUrl": "https://yt3.ggpht.com/_blHaUIZf6nNjjTwdM5XFBusQVBr-KDat0H3w1v4Yeni_ZAPGQBg5ExckFXwzStcW36YzxEz=s88-c-k-c0x00ffffff-no-rj", + "isOwner": true, + "isModerator": false, + "isSponsor": false, + "isVerified": false + }, + "publishedAt": "2025-09-20T00:55:38.715543+10:00" + } + + setTimeout(() => { + YouTubeMessage(data); + }, 1000); \ No newline at end of file diff --git a/horizontal-chat/style.css b/horizontal-chat/style.css index 75ef09e..c6d355f 100644 --- a/horizontal-chat/style.css +++ b/horizontal-chat/style.css @@ -3,7 +3,6 @@ padding: 0; --margin: 0px; --border-radius: 0.5em; - --youtube-color: #f70000; } body { diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index 953243e..23c6b1e 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -16,17 +16,6 @@ const youtubeRegex = /^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|e const kickPusherWsUrl = 'wss://ws-us2.pusher.com/app/32cbd69e4b950bf97679?protocol=7&client=js&version=7.6.0&flash=false'; let kickSubBadges = []; -///////////////// -// CSS OPTIONS // -///////////////// - -const randomYouTubeColors = getComputedStyle(document.documentElement).getPropertyValue('--random-youtube-colors').trim() === '1'; -const youtubeColor = getComputedStyle(document.documentElement).getPropertyValue('--youtube-color').trim(); -const youtubeCustomSubIcon = getComputedStyle(document.documentElement) - .getPropertyValue('--youtube-custom-sub-icon') - .trim() - .replace(/^["']|["']$/g, ''); // removes surrounding quotes - ///////////// // OPTIONS // ///////////// @@ -93,7 +82,20 @@ const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true); const furryMode = GetBooleanParam("furryMode", false); +//////////////////// +// HIDDEN OPTIONS // +//////////////////// + const animationSpeed = GetIntParam("animationSpeed", 0.1); +const randomYouTubeColors = GetBooleanParam("randomYouTubeColors", false); +const youtubeColor = urlParams.get("youtubeColor") || "#f70000"; +const youtubeCustomSubIcon = urlParams.get("youtubeCustomSubIcon") || ""; + + + +//////////////// +// PAGE SETUP // +//////////////// // Set fonts for the widget document.body.style.fontFamily = font; @@ -3173,4 +3175,58 @@ async function GetYouTubeVideoData(videoId) { console.error('Error fetching YouTube video data:', error); return null; } -} \ No newline at end of file +} + +let data = { + "message": "Dat quality šŸ‘€", + "emotes": [ + { + "type": "Twemoji", + "name": "šŸ‘€", + "startIndex": 12, + "endIndex": 13, + "imageUrl": "https://cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.0/assets/72x72/1f440.png" + } + ], + "parts": [ + { + "text": "Dat quality šŸ‘€" + } + ], + "broadcast": { + "id": "x6kgY3g_64U", + "channelId": "UCI5t_ve3cr5a1_3rrmbp6jQ", + "liveChatId": "KicKGFVDSTV0X3ZlM2NyNWExXzNycm1icDZqURILeDZrZ1kzZ182NFU", + "title": "Testing 1440p Enhanced Broadcasting šŸ‘€šŸ‘€", + "description": "šŸ”„ *DOWNLOAD MY CUSTOM WIDGETS FOR YOUR STREAM*\n*https://nutty.gg*\n\nšŸ“ø *Streaming gear I use*\nhttps://nutty.gg/gear\n\nšŸŽ™ļø *Elgato Products*\nhttps://elgato.sjv.io/oqZN09 - 5% OFF with code \"nutty\"\n\nšŸ–¼ļø *Nerd Or Die*\nhttps://nerdordie.com/shop/ref/nuttylmao - 15% OFF with code \"nutty\"\n\nšŸŽµ *Epidemic Sound - Royalty Free Music + Sound FX*\nhttp://share.epidemicsound.com/nutty\n\nāœ‰ļø *Business Inquiries Only*\nnuttylmao@gmail.com\n\n*Socials*\nhttps://www.youtube.com/nuttylmao\nhttps://www.twitch.tv/nutty\nhttps://twitter.com/nuttylmao\nhttps://discord.gg/V4rvjrb\nhttps://www.patreon.com/nuttylmao", + "categoryId": "20", + "privacy": "unlisted", + "publishedAt": "2025-09-19T14:21:41Z", + "scheduledStartTime": "2025-09-19T14:25:14.3844374Z", + "scheduledEndTime": "2025-09-19T14:25:14.3844374Z", + "actualStartTime": "2025-09-19T14:25:14.3844374Z", + "actualEndTime": "2025-09-19T14:25:14.3844374Z", + "tags": [ + "nutty" + ], + "defaultLanguage": "en", + "defaultAudioLanguage": "en", + "status": "live" + }, + "eventId": "LCC.EhwKGkNJX2gwODJLNVk4REZYVEN3Z1FkWkZvREdR", + "user": { + "id": "UCI5t_ve3cr5a1_3rrmbp6jQ", + "url": "http://www.youtube.com/channel/UCI5t_ve3cr5a1_3rrmbp6jQ", + "name": "nutty", + "profileImageUrl": "https://yt3.ggpht.com/_blHaUIZf6nNjjTwdM5XFBusQVBr-KDat0H3w1v4Yeni_ZAPGQBg5ExckFXwzStcW36YzxEz=s88-c-k-c0x00ffffff-no-rj", + "isOwner": true, + "isModerator": false, + "isSponsor": false, + "isVerified": false + }, + "publishedAt": "2025-09-20T00:55:38.715543+10:00" + } + + setTimeout(() => { + YouTubeMessage(data); + }, 1000); \ No newline at end of file diff --git a/multichat-overlay/style.css b/multichat-overlay/style.css index 3306944..98a4505 100644 --- a/multichat-overlay/style.css +++ b/multichat-overlay/style.css @@ -3,7 +3,6 @@ padding: 0; --margin: 20px; --border-radius: 0.5em; - --youtube-color: #f70000; } body {