Add EloWard League of Legends Rank Badges Module - #1190
Open
SunnyWang0 wants to merge 31 commits into
Open
SunnyWang0 wants to merge 31 commits into
SunnyWang0 wants to merge 31 commits into
Conversation
The merge with upstream kept both `import Badge from "./Badge.vue"` and
upstream's `import Badge, { TwitchChatBadgeWithData } from "./Badge.vue"`,
which fails lint (no-redeclare) and vue-tsc (TS2300).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Theme styles: `:global(.tw-root--theme-*) .x` compiles to a bare `.tw-root--theme-*` rule, which applied a brightness/contrast filter (and text colors) to the whole Twitch page for every 7TV user. Removed; the tooltip already uses Twitch's theme variables. - Game detection: `watch(() => window.location.pathname)` is not reactive, so detection ran once. After in-app navigation from a LoL channel, every chatter on the next channel was looked up and badged. Detection now re-checks the category link periodically and matches its href slug, which also fixes late-rendering headers, mid-stream category changes, localized category names (ja/ko), Wild Rift matching as LoL, and offline-channel carousel links. - Skip rank lookups for hidden-badge user tags (@mentions, user card). - Cache failed lookups so every new message doesn't retry while the API is erroring, and encode the username in the request URL. - Keep upstream's badge list spacing; the `!important` inline-flex rules changed badge-to-name spacing for all users. - Tooltip shows "UNRANKED" instead of "UNRANKED - 0 LP". - Open OP.GG with noopener,noreferrer. - Changelog entry moved to a new 3.1.26.1000 heading. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ory changed The category is now re-checked while a stream is open, so a lookup started on a League stream can resolve after the streamer switched category (or after the setting was turned off) and put a badge back on messages that are already on screen. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous commit removed the per-theme brightness adjustment along with the broken selector. Put it back with the whole selector inside :global(), so it applies to .eloward-rank-badge instead of compiling to a bare .tw-root--theme-* rule that filtered the entire Twitch page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Match the original selector (.seventv-chat-badge.eloward-rank-badge) so the filter can't reach a .eloward-rank-badge element injected by the official EloWard extension, which this module already expects to coexist with. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new module that displays League of Legends rank badges next to usernames in Twitch chat ONLY when watching League streams.
Features
Implementation
/modules/eloward/module with composables for game detection and rank fetchingConfiguration
Users can toggle the feature via Settings → Appearance → Vanity → "EloWard Rank Badges"