π¦ Hachidori 0.5.1
User scripts get a home of their own. Advanced β User scripts holds your scripts in a code editor, and its Script Store installs scripts that Bee has reviewed in one click. Among them is Jimaku Player, which puts Japanese subtitles from jimaku.cc over Crunchyroll.
YouTube mining and Google Docs are now on by default. Video mining makes smaller, levelled sentence audio and WebP or AVIF animations, and Crunchyroll joins Netflix as an experimental mining site. You can now paste a list of known words, and the activation key can be any key or the right mouse button.
Firefox builds have a new add-on ID and go to addons.mozilla.org for the first time.
π§© User scripts and the Script Store
Settings β Advanced β User scripts is a new tab for the scripts that change Hachidori's popup, its search page or the pages you read. (#715, #721)
-
Your scripts. Each script has a name, a switch, JavaScript and CSS, and scripts run top to bottom. Add script opens the editor under the list. Import files opens a
.jsfile, a.cssfile or one of each as a new script. A row's switch turns its script on or off, the arrows reorder scripts, and Edit and Delete do what they say (Delete asks first). -
A code editor. The JavaScript and CSS boxes have line numbers, colours that stay readable in every palette, bracket matching, undo and search (Ctrl+F). Tab indents; press Esc and then Tab to move on. A box grows with its code and can be resized. A new script starts from a short example that finds the popup, and a syntax error is marked on its line as you type. A script saves only on Save script or Add script, so half-typed code never runs. (#738)
-
The Script Store, below your scripts, lists the scripts people share in bee-san/hachidori-scripts, where Bee reviews each one. Nothing is fetched until you press Check for scripts.
- Each script shows its author, version, licence and size, and View code shows its code before you install it.
- Install adds the script to your scripts, switched on.
- When a newer version is listed, Update to appears in the store and on the script's own row.
- The scripts today are Texthooker, Collapsible dictionaries, Coloured dictionary names, Merge duplicate pitch accents, Pitch accents in a row and Jimaku Player. (#716, #721, #740)
-
Letting scripts run. A script's CSS styles the popup straight away. Its JavaScript runs once the browser allows it:
- Chrome: turn on Allow User Scripts on Hachidori's details page (Developer mode before Chrome 138); the notice's Open Hachidori's details button opens that page.
- Firefox: use the Allow user scripts button.
JavaScript runs in every page and frame, including YouTube's live chat, and on the search page. (#731, fixes #729)
-
Your Custom JavaScript moves here. Code saved in Design β Custom JavaScript becomes a script named "Custom JavaScript" in this list, and backups carry it over the same way. (#715)
-
GameSentenceMiner's overlay now runs scripts' JavaScript too. Its Electron browser has no user-script support, so the overlay runs each script in the page itself. (#737)
πΊ Video mining
-
YouTube mining is on by default. It moved out of Experimental features to Settings β Anki β Video mining β YouTube mining. It now comes on for everyone, including anyone who had switched the old experimental switch off. (#739)
-
Smaller, levelled sentence audio.
{sentence-audio}is a mono MP3 at 64 kbit/s, about 8 kB a second; it was a WAV of about 96 kB a second. Each clip is brought to the same loudness, whatever the player's volume. (#713) -
Choose the formats. Anki β Video mining has four settings:
- Sentence audio format: MP3, for all Anki clients, or Opus, for desktop Anki and AnkiDroid.
- Audio bitrate (kbit/s): 32 to 128, 64 by default.
- Animated screenshot format for
{gif}: GIF, WebP or AVIF. - Animation quality (1β100): 70 by default.
GIF and MP3 stay the defaults. In CI, the same synthetic two-second clip encoded to 701 kB as GIF, 175 kB as WebP and 18.6 kB as AVIF. A browser that can't encode the format you chose keeps the screenshot and says why. (#723, fixes #717, #718)
-
{miscInfo}. This new marker names the video: its title and channel on YouTube, or the title and episode on Netflix. Elsewhere it gives the page title. (#723, fixes #719) -
Netflix mining is one switch. Netflix preview screenshots merged into Netflix mining, which stays experimental. With it on,
{screenshot}on a watch page is Netflix's timeline preview image: Netflix can't turn it black, but it is lower resolution and can show a nearby moment. A{gif}from a subtitle shows only the video, without Netflix's subtitles, controls, overlays or the bars beside the picture. (#712, #739) -
Netflix sentence audio in Edge. When the kept audio of a line is silent, as in Edge on Windows, Hachidori now records the line from the tab instead. Like a
{gif}, that needs one click on Hachidori's toolbar button in the tab. (#728) -
Crunchyroll mining (experimental). Settings β Advanced β Experimental features β Crunchyroll mining gives a Crunchyroll subtitle what Netflix mining gives a Netflix one:
- the whole line as the sentence;
- its audio for
{sentence-audio}; - an animation of it for
{gif}, AVIF included, cropped to the video; - a pause while you hover the line.
Crunchyroll rarely has Japanese subtitles, so install Jimaku Player from the Script Store. It loads Japanese subtitles from jimaku.cc over the video, with your own jimaku.cc API key, syncs them with one key and gives Hachidori their timing. Reload Crunchyroll after turning the switch on. As with Netflix, protected playback can make the audio silent or the animation black. (#741, bee-san/hachidori-scripts#4)
π Google Docs on by default
Looking up words in Google Docs is now an ordinary setting, Settings β Reading β Scanning β Look up words in Google Docs, and it is on by default, including for anyone who had the experimental switch off. (#739)
π±οΈ Reading
- Any key or the right mouse button. Settings β Reading β Activation key or button records any key you press, such as Caps Lock, and lists Right mouse button. Pressing the right button over a word looks it up, and that press doesn't open the page's context menu. (#734, fixes #705)
- Paste your known words. Settings β Reading β Word highlighting β Known words takes one dictionary-form word per line; Mark as known adds them to the words you've marked in this language. Blank lines and duplicates are ignored. Pasted words you had ignored become known. It works without Anki. (#727)
- Word highlighting checks every deck. A word's highlight now comes from its cards in all decks, whatever the first Template's duplicate scope. Before, it used that scope, so a word whose card sat outside it was marked unknown. (#725, #700)
- Scroll from the popup's header. Turning the mouse wheel over the top of the popup, where the word is, now scrolls its definitions. (#732, fixes #726)
- Search bar. The search page's Clear button lines up with the search box and the Search button again. (#722)
- Dictionary styles in Edge and WebView2. Browsers without CSS
@scopeshowed dictionaries' own styles wrongly. Where a browser lacks it, Hachidori now keeps those styles, such as Jitendex's, inside the popup another way. (#723, fixes #710)
π Anki
- A note open in Anki. Overwriting a note that Anki's Browser or an Edit window has open is refused by AnkiConnect without changing anything. Before, Hachidori locked the button with "The write could not be confirmed. Check Anki before trying again." Now it says: "Anki did not change the note because its Browser or an Edit window has it open." Close that window, or select another card in the Browser, and try again. (#707, fixes #698)
- Kanji ranks aren't word frequencies. Bee's Ultimate Kanji Dictionary's character ranks no longer appear as a word's frequency or count in its average rank on Anki cards. A clicked kanji's card keeps its rank. (#723, fixes #724)
- Hachidori Relay keeps marker case. backfill-anki-yomitan skipped fields whose markers have capital letters, such as
{single-frequency-number-Jiten}, because the relay'sankiFieldsreplies lowercased them. They keep their case now, as in Yomitan. Thanks to @rabomen for this change. (#711)
π¦ Firefox
- A new add-on ID. The Firefox build's ID is now
{b39ca224-e554-498d-8d8b-b2a5ad2f7a13}, the one registered on addons.mozilla.org. A Firefox install of an earlier version usedhachidori@bee-san, and Firefox keeps each ID's data apart. To bring your settings and dictionaries over, export a backup in the old install (Settings β Backup & restore) and restore it in this one. (#703) - On addons.mozilla.org. This is the first release whose Firefox ZIP is submitted to addons.mozilla.org. It is listed once Mozilla's review approves it. (#709, #736)
πΎ Backups
Checked from 0.5.0, in both browsers. The release test exports a backup with the released 0.5.0 and restores it into this version, in Chrome and in Firefox. Its Custom JavaScript comes back as the user script "Custom JavaScript". Everything else comes back too: dictionaries, settings, Anki settings, the personal dictionary, update schedules, lookup counts and known words. The same test passes with a backup from 0.4.0. (#742)
π οΈ Under the hood
-
Imports use less memory. The engine reads a dictionary archive's entries as it needs them instead of copying the whole archive into memory. Measured on one shared Linux machine (#714):
- γγΈγΏγ«ε€§θΎζ³'s import peaked at 774 MiB of engine memory instead of 968 MiB;
- Wikipedia's peaked about 28% lower;
- Jitendex's stayed about the same;
- import times didn't change beyond the machine's noise.
The engine (hoshidicts) is updated and its WebAssembly rebuilt.
-
An unpacked copy updated in place. Replacing an unpacked installation's files without pressing Reload could leave Chrome running the previous release's service worker. Settings then refused to save Crystal, YouTube mining or Multiple languages with "the options write request carried an invalid reader option". From this version on, a service worker that finds itself on another release's scripts reloads the extension once. Updating from 0.5.0, press Reload as before. (#708, fixes #706)
-
Debug info covers more. Settings β Advanced β Troubleshooting β Get debug info now includes:
- every language's effective settings;
- the selected themes and the bundled theme catalogue;
- the experimental features;
- your user scripts, with their order, Script Store versions and registration.
Personal dictionary text and marked words are summarised in every language instead of being copied, and credentials in scripts are redacted. (#733)
-
Steadier CI. Five flaky checks behind failed CI runs on
mainare fixed. (#720)
π¦ 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, the same package this release submits to addons.mozilla.org.- Until Mozilla lists it, open
about:debugging#/runtime/this-firefox, choose Load Temporary Add-on⦠and select the ZIP. - To keep it installed, use Firefox Developer Edition, Nightly or ESR, as the Firefox guide describes.
- Its add-on ID is new (see above).
- Until Mozilla lists it, open
*-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.5.0...0.5.1