π¦ Hachidori 0.5.0
Hachidori can now read 25 languages besides Japanese, each with its own dictionaries and settings, behind an experimental switch that is off by default; with it off, nothing changes for Japanese. A second experimental switch mines YouTube captions as Netflix mining does Netflix subtitles. The search page gains a Clipboard monitor, lookups with a click, an Anki Template menu and an optional history of searched lines, and runs your Custom JavaScript. Words such as ζ₯ζ¬ and ι¨ε± get furigana for each kanji, Crystal comes in Grey, Beige and Retro blue, and adding a note to Anki takes fewer requests. A backup made with 0.4.0 restores in this version, in Chrome and in Firefox.
π Read other languages (experimental)
Settings β Advanced β Experimental features β Multiple languages lets Hachidori read other languages. It is off by default, and while it is off nothing changes for Japanese: your settings, dictionaries, popups and backups stay as they are. Every installation gets the switch and one browser shortcut, Switch to the next language, which has no key and does nothing while the switch is off. Turned on, the switch adds a Languages tab to Advanced (#669, #672):
- Add a language. Under Your languages, choose one in Add a language and press Add. It starts with a copy of your settings for the language Settings shows, and no dictionaries. Each language then keeps its own dictionaries, settings, Anki Templates, pronunciation sources, personal dictionary, lookup counts and marked words.
- Choose the language you read in. Settings shows chooses the language Settings edits, and Use for lookups makes it the one pages are read in; until you press it, lookups stay in the language you were using. With two or more languages, the toolbar button's menu has a button for each and the toolbar badge shows the active one's code (JA, EN). Switch to the next language can be set as a keybind or a browser shortcut. Switch language automatically from the page's language picks the language for each lookup from the page's
langattribute. - Get dictionaries. Dictionaries β Add lists recommended dictionaries for the language Settings shows: open one's page, download its Yomitan ZIP file and import it. A dictionary for another of your languages, imported while Settings shows Japanese, offers to move there, as in Move to English.
- Settings follow the language. Settings a language can't use, such as pitch accent for English or the clicked-kanji dictionary for Arabic, are hidden for it and keep their values, and settings every language shares say All languages. A language's own options, such as English's Archaic verb forms or Arabic's Vowel marks in headwords, are cards in the Languages tab.
- Everything follows the language you read in: lookups, the popup in every bundled theme, the search page and its Clipboard monitor, Anki and pronunciation. Arabic, Yiddish and Assyrian Neo-Aramaic text reads right to left in the popup, whose buttons stay left to right. Netflix mining picks the subtitle track in your language, and with automatic switching on, a YouTube caption is looked up in its track's language.
- Sharing. A browser linked through Sharing uses the host's languages; a linked browser still running 0.4.0 sees only the host's Japanese.
- Turning the switch off returns lookups to Japanese and keeps the languages you added, with their settings and dictionaries, for the next time.
25 language packs: Albanian, Ancient Greek, Arabic, Assyrian Neo-Aramaic, Basque, Chinese, English, Esperanto, French, Georgian, German, Greek, Irish, Italian, Korean, Latin, Old Irish, Portuguese, Russian, Serbo-Croatian, Spanish, Tagalog, Ukrainian, Vietnamese and Yiddish. Each pack's inflection rules are measured against a corpus of its language, several adapt Yomitan's, and how much they cover varies by language: each pack's README lists its known gaps. Russian, Ukrainian, Serbo-Croatian, Greek and Ancient Greek use Noto Sans or your system font instead of the themes' Japanese-first fonts, so stress marks and accents sit on the right letter. (#669, #675, #688, #696)
Known limits, from docs/languages.md:
- The interface stays in English; only the text you read follows the language.
- One profile per language.
- Recommended dictionaries for other languages are links to their download pages, not one-click installs.
- Every language's enabled dictionaries stay loaded, also while Multiple languages is off.
- Going back to an older Hachidori isn't supported once a second language is added. A backup still holds a Japanese part that 0.4.0 restores.
The extension's description now reads "Study Japanese and other languages: β¦", and the browser shortcut Turn Japanese lookups on or off is now Turn lookups on or off. (#689)
π Search page
- Clipboard monitor. A switch at the top of the search page searches each text you copy, in any tab or program, while the page is open in a tab or its popup window, as Yomitan's does. It searches text with Japanese in it, and not what you copy on the search page itself or while you write a Note. Turning it on asks the browser for permission to read the clipboard, and turning it off gives the permission back; Chrome asks only the first time, Firefox each time. (#652, fixes #639)
- Look up words with a click. With Settings β Reading β Search page β Look up words with a click on, a click on a word of the text you searched shows its results, and a click on a word in the results opens it in a child popup, without holding the activation key. Dragging still selects text. It is off by default. (#663, fixes #656)
- Anki Template menu. With more than one Anki Template, a menu at the top of the page chooses the one the Anki button uses, as Set built-in does in Settings β Anki. (#663)
- Popup window size. Popup window width and Popup window height, under Settings β Reading β Search page, size the window that the Open the search page in a popup window shortcut opens: 600 Γ 640 by default, as before. (#663)
- History of searched lines. Settings β Advanced β Search history β Keep a history of searched lines, off by default, keeps each line you search, typed, pasted or copied, in this browser only, up to Lines kept (10,000 by default). Up and Down in the search box bring earlier lines back, as in a shell. In the searched text, Left and Right move a cursor word by word and look each word up, Up and Down move between rows and on to earlier lines, and Enter adds the word to Anki, as in Rubi; change these keys in Settings β Keybinds, under On the search page. Backups and linked browsers don't include the lines, and Clear history deletes them. Custom JavaScript can read and edit them through
HDSearchHistory, and the guide links a texthooker-style script built on it. (#666) - Custom JavaScript runs on the search page. Scripts saved in Design β Custom JavaScript now run there as on web pages, so one that hides repeated pitch dictionaries in the popup does so on the search page too. In Firefox this needs Firefox 154 or newer. (#653, fixes #644)
πΊ YouTube captions and Netflix subtitles
Settings β Advanced β Experimental features β YouTube mining, off by default, gives YouTube captions what Netflix mining gives Netflix subtitles. Reload YouTube after turning it on. (#680)
- A note mined from a caption takes the whole caption line as its sentence, the line's audio for
{sentence-audio}and a looping GIF of it, cropped to the video, for{gif}. Its{screenshot}is the video's own frame; a word from a comment or the title gets an ordinary screenshot. - Hovering a caption pauses the video until the pointer leaves the caption and the popup. Captions under YouTube's auto-hidden controls and in the miniplayer can be looked up.
- It works on watch pages in the default, theatre and fullscreen layouts and in the miniplayer, with typed, auto-generated and translated captions, from one video to the next. Shorts, videos embedded in other sites, the mobile site, YouTube Music and live streams are not supported.
- In Firefox, notes get the caption line and the video frame but no line audio or GIF, with a warning that says why, as with Netflix.
Netflix subtitles under the player's controls. Where Netflix's player controls lie over a subtitle line, the line can now be looked up: when the pointer finds no text, Hachidori looks for the character under it in the subtitle lines themselves. The player's own text and menus are looked up as before. This works with or without Netflix mining. Thanks to @rabomen for this change. (#662)
π Anki
- Fewer requests. With the default duplicate checking (Check within set to Configured note type,
{expression}in the first field, and When found not set to Overwrite), a single request checks all of a popup's entries against Anki, and a single request adds a note with its screenshot and pronunciation. Before, adding a note with both took 12 requests. A note with dictionary images takes two. (#683, fixes #682) - Compact glossaries in Anki. Design β Definitions β Compact glossaries has a third choice, Compact popup and Anki, as in Yomitan. The popup looks as with Compact popup, and the glossary fields of new Anki cards put each sense's glosses on one line, separated by |, structured lists such as Jitendex's included. Cards filled through Hachidori Relay follow it too. (#687, fixes #673)
- A word looked up alone keeps a note's sentence. With When found set to Overwrite and a sentence field set to Append, as Senren's scene switching asks, updating a note from a word typed alone on the search page appended the bare word each time (ε£°ζε£°ζε£°ζ). A lookup whose sentence is only the word now leaves the note's sentence and cloze fields as they are, and the fields made only of
{screenshot},{gif}or{sentence-audio}, whatever their mode; its other fields follow their modes as before. New notes are unchanged. (#664, fixes #655) - Hachidori Relay follows Smaller Anki cards. Fields that tools such as backfill-anki-yomitan fill through the relay's Yomitan API are compacted while Anki β Card formatting β Smaller Anki cards is on, as mined cards are, and carry only the dictionary images they show. Thanks to @rabomen for this change. (#661, fixes #659)
π Furigana for ζ₯ζ¬ and ι¨ε±
A run of kanji that KANJIDIC's readings can't split now takes its furigana for each kanji from Jitendex's kanwa data: ζ₯ζ¬ shows ζ₯(γ«)ζ¬(γ»γ), ι¨ε± ι¨(γΈ)ε±(γ), ζ―ε ζ―(γγ)ε(γ), οΌδΊΊ οΌ(γ΅γ)δΊΊ(γ) and οΌζ₯ οΌ(γΏγ£)ζ₯(γ). Part of a run that is read as a whole keeps one reading over it: δ»ζ₯δΈγ« shows δ»ζ₯(γγγ)δΈ(γγ
γ)γ«. Words read as a whole, such as δ»ζ₯, ε€§δΊΊ and ζ―θ², keep one reading, and runs that KANJIDIC splits keep their split. The popup and Anki's {furigana} and {furigana-plain} use the same split. (#649, fixes #641)
π Crystal in three colours
Design β Appearance β Colours, shown for a theme with colour variants, chooses Crystal's colours. Grey follows Final Fantasy XIV's dark window theme and Beige its light one; both keep the gold frame and ornaments and have crimson buttons with gold icons. Retro blue is the blue window of the classic Final Fantasy menus, with white text and silver ornaments. Automatic, the default, is Beige in your system's light mode and Grey in its dark mode, in place of 0.4.0's navy panel. Text keeps at least 4.99:1 contrast in every colour at the default opacity. (#633, bee-san/hachidori-themes#24)
π Frequency and pitch dictionaries
- Readings only a frequency or pitch dictionary lists. With Settings β Reading β Results β Show words that only frequency or pitch dictionaries have on, a word's reading that only a frequency or pitch dictionary lists is now a result too, even when a dictionary defines the word with another reading or none. JMnedict stores η°δΈ without a reading, so a hover on η°δΈ shows JMnedict's entries and then η°δΈ read γ γͺγ and γγͺγ, each with Jiten's frequency and no definitions. These results come after the defined words that match as much of the text. The option stays off by default. (#667, fixes #658)
- Rank lists that say they count. A frequency list whose
index.jsonsays it counts occurrences but whose values are ranks, such as the SoL and γΉγ lists made with yomitanfrequencies.org, now imports as a rank list: it averages under Avg rank, and Auto direction in Reading β Frequency sorting sorts it lowest first. Hachidori takes a list as ranks when its smallest value is 1 and at most 1% of its rows have it. A list you already have keeps its old reading until you import it again or it updates. (#686, fixes #684)
π±οΈ Popup
- Only the word under the pointer. Hovering past the end of a definition line, or between two lines, no longer looks up the text beside the pointer: as on the page, a lookup in the popup starts only from the character under the pointer. Thanks to @Gilfaro for this change. (#679)
- Right-to-left pages. On a page written right to left, such as an Arabic, Hebrew or Persian site, the popup took the page's direction: furigana ran backwards (ι£γΉγ read γγΉι£), pitch graphs were scrambled and lists lost their markers. Popups now read left to right on every page. Hovering Japanese on such a page now finds the character under the pointer too; before, in Chrome, the outer half of the first and last character of a run of Japanese found nothing. (#690, #694)
- Dark Reader leaves the popup alone with Custom JavaScript too. In 0.4.0, saving Design β Custom JavaScript let Dark Reader, and site dark themes built on it such as Immersion Kit's, recolour the popup. The popup is now out of their reach in every case, and your scripts still reach it through
host.shadowRoot. (#651, fixes #645)
π Sharing
- A linked browser frees its engine. A browser that uses another Hachidori no longer starts its own dictionary engine, and one already running is stopped once its current work finishes, which returns its memory. Its own dictionaries and settings are kept, local audio and the Clipboard monitor still work, and Unlink starts its engine again. While linked, Settings β Advanced β Memory labels the host's figures Host engine memory, Host total and Host hash indexes, and dictionary rows say On host. (#676)
- Sharing on another port. If you changed Hachidori Relay's port in Anki, set the same port under Settings β Sharing β Advanced β Port in every browser on that computer. The field can now be changed while sharing is on: the browser moves its sharing to that port and looks for a shared Hachidori there. Before, a browser looked only on the port it had saved, and the field was locked while sharing was on, as it is from install. Its messages now name the port, as in Waiting for Anki on port 8771. (#650, fixes #648)
πΎ Backups
Checked from 0.4.0, in both browsers. The release test exports a backup with the released 0.4.0 and restores it into this version, in Chrome and in Firefox. Dictionaries, settings, Anki settings, the personal dictionary, update schedules, lookup counts and known words all come back, and settings added since 0.4.0 take their defaults. With a second language added, a backup holds every language and a Japanese part, which the released 0.4.0 restores, as another test checks in Chrome. (#677, #669)
π οΈ Under the hood
- The dictionary engine (hoshidicts) is updated for language packs, for readings only frequency or pitch dictionaries list, and with a bound on its deinflection search, so a language's rules can't make a lookup run away; its WebAssembly is rebuilt. #669 and #688 compared Japanese lookups with the engine before them and found the same replies. (#667, #669, #675, #688, #696)
- The WebAssembly leaves out the zstd compressors the importer never uses, about 220 KB, so each build is about 1% smaller than 0.4.0's, language code included. Imports write the same files without them. (#695)
- Word highlighting and the search page split text without unpacking definitions or collecting pitch accents, which a split never reads: the same splits in about two thirds of the time with JMdict. (#697)
- A page frame loads the language registry and display code only once you have a second language; a Japanese-only installation's frames skip them. (#692)
- The multi-language code is tidied, with no change in behaviour. (#674)
- CI runs new real-browser suites for languages, in Chrome and in Firefox, and for YouTube mining on a mock player. (#669, #680)
benchmark/jmdict-lookup.mjstimes Hachidori against Yomitan on JMdict through each extension's own lookup path. Its report, from one laptop, has a median lookup of 2.71 ms in Hachidori and 7.30 ms in Yomitan, and 1.3 s against 46.3 s from import to the first lookup. (#654)- The benchmark harnesses and the promo capture read a headword without its furigana and pitch reading, so they recognise the popup again. (#647, fixes #624)
- When one entry of a popup can't be prepared for Anki, the others no longer ask Anki for its decks and note types a second time. (#691)
- CI's Firefox suite waits until Custom JavaScript is registered before it opens its test page. (#693)
- Test tooling: eslint 10.13.0, jsdom 30.1.3, puppeteer-core 25.16.0 and @puppeteer/browsers 3.2.6; CI: actions/setup-python 7.1.0. They are used only in development and are not part of the extension. (#634, #635, #636, #637, #638)
π¦ Downloads
*-chrome.zip: extract it, openchrome://extensions, enable Developer mode, choose Load unpacked, and select the extracted folder. To update an existing unpacked installation, replace its files and click Reload.*-firefox.zip: for Firefox 153 or newer. It is not on addons.mozilla.org, so openabout:debugging#/runtime/this-firefox, choose Load Temporary Add-on⦠and select the ZIP, or install it permanently in Firefox Developer Edition, Nightly or ESR as the Firefox guide describes.*-source.zip: the matching complete source, including the engine and the sources of bundled dependencies.*-SHA256SUMS.txt: checksums for all three packages.
Chrome 128 or newer and Firefox 153 or newer are supported. Your dictionaries and saved settings are kept, and you don't need to reimport anything.
Full changelog: 0.4.0...0.5.0