From 43e067733eff35de0c768e320e71dd18d8da4071 Mon Sep 17 00:00:00 2001 From: Killa Fish <61081555+Fiszh@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:16:13 +0200 Subject: [PATCH] tooltip updated --- src/index.js | 54 +++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/index.js b/src/index.js index 80cb66b..57dd98f 100644 --- a/src/index.js +++ b/src/index.js @@ -443,7 +443,7 @@ async function replaceWithEmotes(inputString, TTVMessageEmoteData, userstate, ch let emoteStyle = 'style="height: 36px; position: relative;"' // Generate HTML for emote - let emoteHTML = ` + let emoteHTML = ` ${foundEmote.name} @@ -478,7 +478,7 @@ async function replaceWithEmotes(inputString, TTVMessageEmoteData, userstate, ch } } - return ` + return ` ${part} `; } else { @@ -612,7 +612,7 @@ async function handleMessage(userstate, message, channel) { } if (badge) { - badges += ` + badges += ` ${badge.title} `; } @@ -623,7 +623,7 @@ async function handleMessage(userstate, message, channel) { const badge = TTVSubBadgeData.find(badge => badge.id === userstate.badges.subscriber); if (badge) { - badges += ` + badges += ` ${badge.title} `; } @@ -633,7 +633,7 @@ async function handleMessage(userstate, message, channel) { const badge = TTVBitBadgeData.find(badge => badge.id === userstate.badges.bits); if (badge) { - badges += ` + badges += ` ${badge.title} `; } @@ -648,7 +648,7 @@ async function handleMessage(userstate, message, channel) { const foundChatterinoBadge = ChatterinoBadgeData.find(badge => badge.owner_id == userstate["user-id"]); if (foundChatterinoBadge) { - badges += ` + badges += ` ${foundChatterinoBadge.title} `; } @@ -658,7 +658,7 @@ async function handleMessage(userstate, message, channel) { const foundFFZBadge = FFZBadgeData.find(badge => badge.owner_username == userstate.username); if (foundFFZBadge) { - badges += ` + badges += ` ${foundFFZBadge.title} `; } @@ -666,15 +666,16 @@ async function handleMessage(userstate, message, channel) { // 7tv Badges if (foundUser && foundUser.sevenTVData && foundUser.sevenTVData.badge.url) { - badges += ` - ${foundUser.sevenTVData.badge.title} + const foundBadge = foundUser.sevenTVData.badge + badges += ` + ${foundBadge.title} `; } // Determine the message HTML based on user information let messageHTML = `
${badges} - + ${finalUsername} ${message} @@ -683,7 +684,7 @@ async function handleMessage(userstate, message, channel) { if (foundUser && foundUser.avatar) { messageHTML = `
${badges} - + ${finalUsername} ${message} @@ -729,7 +730,7 @@ async function handleMessage(userstate, message, channel) { let finalMessageHTML = `
${prefix} ${badges} - + ${finalUsername} ${results} (${hours}:${minutes}:${seconds}) @@ -750,8 +751,8 @@ async function handleMessage(userstate, message, channel) { finalMessageHTML = `
${prefix} ${badges} - - ${finalUsername} + + ${finalUsername} ${results} (${hours}:${minutes}:${seconds})
`; @@ -1276,16 +1277,16 @@ async function update(updateInfo) { } streamTitles[i].innerHTML = `
-
- - ${'avatar'} - -
- ${streamInfo.username} -
-
${results}
-
-
`; +
+ + avatar + +
+ ${streamInfo.username} +
+
${results}
+
+
`; let nameWrapper = streamTitles[i].querySelector('.name-wrapper'); @@ -1308,11 +1309,8 @@ async function update(updateInfo) { } for (let i = 0; i < streamCategories.length; i++) { - streamCategories[i].innerHTML = ` + streamCategories[i].innerHTML = ` ${streamInfo.category} - - ${streamInfo.category} - `; } } catch { }