-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Replies now show twemojis and third party emotes 2. Stream info no longer has a huge margin 3. Autocompletion no longer does R) if the last character is " ", 4. Chat input now scrolls with the autocompletion 6. Redeems with . in their names should no longer display as a link 7. Dark reader no longer works
- Loading branch information
Showing
5 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -549,7 +549,12 @@ async function replaceWithEmotes(inputString, TTVMessageEmoteData, userstate, ch | |
</span>`; | ||
} else if (lastEmoteWrapper && lastEmote && foundEmote.flags && foundEmote.flags === 256) { | ||
willReturn = false; | ||
|
||
emoteStyle = `style="height: ${desiredHeight}px; position: absolute;"`; | ||
|
||
const currentTooltipName = lastEmoteWrapper.getAttribute('tooltip-name') || ''; | ||
lastEmoteWrapper.setAttribute('tooltip-name', `${currentTooltipName}, ${foundEmote.name}`.trim()); | ||
|
||
const aTag = lastEmoteWrapper.querySelector('a'); | ||
aTag.innerHTML += `<img src="${foundEmote.url}" alt="${foundEmote.name}" class="emote" ${emoteStyle}>`; | ||
|
||
|
@@ -596,12 +601,16 @@ async function replaceWithEmotes(inputString, TTVMessageEmoteData, userstate, ch | |
|
||
lastEmote = false; | ||
|
||
const twemojiHTML = twemoji.parse(part, { | ||
base: 'https://cdn.jsdelivr.net/gh/twitter/[email protected]/assets/', | ||
folder: 'svg', | ||
ext: '.svg', | ||
className: 'twemoji' | ||
}); | ||
let twemojiHTML = part | ||
|
||
if (part) { | ||
twemojiHTML = twemoji.parse(part, { | ||
base: 'https://cdn.jsdelivr.net/gh/twitter/[email protected]/assets/', | ||
folder: 'svg', | ||
ext: '.svg', | ||
className: 'twemoji' | ||
}); | ||
} | ||
|
||
replacedParts.push(twemojiHTML); | ||
} | ||
|
@@ -2883,7 +2892,7 @@ document.addEventListener('keydown', async function (event) { | |
textContent = textContent.trimEnd(); | ||
} | ||
|
||
if (textContent && textContent !== '' && textContent !== ' ') { | ||
if (textContent && textContent !== '' && textContent !== ' ' && !textContent.endsWith(" ")) { | ||
let userPersonal_emotes = []; | ||
|
||
const userData = TTVUsersData.find(user => user.name === `@${tmiUsername}`); | ||
|
@@ -2944,6 +2953,9 @@ document.addEventListener('keydown', async function (event) { | |
chatInput.value = modifiedText + " " | ||
EmoteI += 1 | ||
} | ||
|
||
chatInput.selectionStart = chatInput.selectionEnd = chatInput.value.length; | ||
chatInput.scrollLeft = chatInput.scrollWidth; | ||
} else { | ||
EmoteI = 0 | ||
TabEmotes = []; | ||
|
@@ -3175,6 +3187,8 @@ client.on("redeem", (channel, userstate, message) => { | |
} | ||
|
||
if (message !== 'highlighted-message') { | ||
userstate["no-link"] = true; | ||
|
||
handleMessage(userstate, message, channel) | ||
} else { | ||
TTVUserRedeems[`${username}`] = '#00dbdb'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters