Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phrase Highlighter for Language Reactor

Phrase Highlighter for Language Reactor

CI

Companion for Language Reactor. When you hover a word, Language Reactor’s dictionary often shows a multi-word phrase pattern (for example “did you see”), while the subtitle only marks that one word. This extension highlights the whole phrase on the dual subtitle as a single underline — when the line appears, with no extra hovering.

Use the Phrases control next to Language Reactor’s ON pill to change color and thickness. It does not replace Language Reactor; it only marks phrases Language Reactor already knows.

Language Reactor is required. Without it installed and enabled, this companion has no effect.

This project is not affiliated with Language Reactor, Dioco, Netflix, YouTube, or Amazon.

Privacy · License · Author: Burak Keskin · GitHub: @official-burak

Install

Load the unpacked folder that contains manifest.json. Chrome Developer mode is required; this companion is not on the Chrome Web Store yet.

  1. Install Language Reactor and confirm it is on at chrome://extensions.
  2. Open chrome://extensions, turn on Developer mode, click Load unpacked, and select this project folder.
  3. Open YouTube or Netflix with Language Reactor dual subtitles on. Keep both extensions enabled. Refresh the player tab if marks do not appear.

The toolbar icon does not toggle highlighting. Disable the extension from chrome://extensions to turn it off. After you change files, reload the extension card, then refresh the player tab.

A Chrome Web Store listing is not available yet. If you want one, open an issue or email official.burak@icloud.com.

Appearance

On YouTube (and on Netflix when Language Reactor’s player-bar pill is present), open Phrases next to Language Reactor’s ON/gear control. Choose yellow (default), orange, lime, cyan, or white, and thickness 2 / 3 / 4 px. Each phrase is a bottom stroke with tips that lift slightly (a shallow cradle, not a box). A phrase that wraps across lines stays one mark: the square-U opens at the line break instead of drawing two closed cradles. Choices live in chrome.storage.local and apply immediately.

Language Reactor still greys the hovered word and still shows its dictionary. This extension adds one continuous underline across the whole collocation — for example Did you see on Did you see my last goal? — with no fill.

Language Reactor dual subtitles with phrase underlines on the English line

Language Reactor dual subtitles. Whole phrase patterns are marked on the English line.

Settings

The Phrases pill sits in the player bar next to Language Reactor’s ON control. Open its gear for color and thickness.

Phrases control in the player bar

Phrases control: logo, Phrases, and settings gear, next to Language Reactor’s ON pill.

Phrase underline settings: preset colors and thickness

Preset colors only; thickness is 2 / 3 / 4 px (3 px selected here).

How it works

Language Reactor prefetches multi-word patterns for the current video (/base_dict_getHoverDictEntriesForSubs) and, on hover, looks up the longest n-gram (2–9 tokens) that contains that word. Phrase text is not stored on .lln-word nodes; it appears in .tt after hover.

This extension:

  1. Runs a MAIN-world content script at document_start and reads that prefetch when Language Reactor fetches it (no extra network call).
  2. When #lln-subs / .lln-subs (or other allowlisted cue roots) show a new line, it runs the same n-gram lookup on every token.
  3. Draws one overlay from the first through last token of each hit (pointer-events: none). Nodes are never wrapped or replaced, so Language Reactor still receives hover and click.
  4. If the prefetch was missed, it may silently trigger Language Reactor’s own .tt fill while keeping the popup hidden, then harvest src headers.

Overlapping phrases: longest match wins; leftover ties keep the leftmost span.

Optional debug on the player tab: localStorage.setItem("lrph-debug", "1") then reload. Logs stay in that tab’s console ([LRPH]). Remove the key to quiet again.

Where it works

Content scripts run in all frames on:

  • YouTube (*://*.youtube.com/*, https://youtu.be/*) — primary target
  • Netflix (*://*.netflix.com/*)
  • Amazon Prime Video (Language Reactor’s Amazon TLDs)
  • Language Reactor’s own player (*://*.languagereactor.com/*)

YouTube, Netflix, and Amazon use Language Reactor’s overlay (.lln-word + .tt hover dict). languagereactor.com uses the site player; skins are supported via an allowlist of roots and fallbacks.

Privacy

No network calls from this extension and no accounts. Underline color and thickness are stored locally with chrome.storage.local. See PRIVACY.md.

Limitations

  • Language Reactor is closed-source. Cue markup and the hover popup have no public contract; a site update can break detection until selectors are adjusted.
  • Single-word dictionary entries stay unmarked.
  • Translation lines are not highlighted.
  • The extension does not translate, pause video, save words, or replace Language Reactor.

License

MIT License. Copyright © 2026 Burak Keskin.

Contact

Releases

Packages

Contributors

Languages