Skip to content

feat(locales): content-based section targeting via translated titles#100

Merged
valdoryu merged 1 commit into
mainfrom
feat/language-based-hiding
Jun 23, 2026
Merged

feat(locales): content-based section targeting via translated titles#100
valdoryu merged 1 commit into
mainfrom
feat/language-based-hiding

Conversation

@valdoryu

@valdoryu valdoryu commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Add per-language locale files holding the visible section titles used to hide LinkedIn modules, replacing brittle HTML-attribute selectors for the misc-tab sections (news, premium, profile counters, follow recommendations).

  • Rename locale files to base language codes (matching )
  • Store titles as arrays of substrings so a section can have several titles
  • Add findElementsByTextContent + hide/showAncestorIndexByTextContent utils (TreeWalker-based, skips the main feed, optional container scoping)
  • Resolve the active locale with getLocaleTranslations() and pass it to doMisc

Other sections will happen in another PR

Add per-language locale files holding the visible section titles used to
hide LinkedIn modules, replacing brittle HTML-attribute selectors for the
misc-tab sections (news, premium, profile counters, follow recommendations).

- Rename locale files to base language codes (matching <html lang>)
- Store titles as arrays of substrings so a section can have several titles
- Add findElementsByTextContent + hide/showAncestorIndexByTextContent utils
  (TreeWalker-based, skips the main feed, optional container scoping)
- Resolve the active locale with getLocaleTranslations() and pass it to doMisc

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@valdoryu valdoryu requested a review from njelich June 12, 2026 17:35
@valdoryu valdoryu merged commit 3a6ab9c into main Jun 23, 2026
2 checks passed
@njelich njelich deleted the feat/language-based-hiding branch June 23, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant