Yukari Rubi

A browser extension that overlays furigana (ruby reading aids) on Japanese text in any web page, powered by Sudachi morphological analysis compiled to WebAssembly.

Supported on Firefox 115+ and Chromium 116+.

Features

Install

Pre-built artifacts land in artifacts/ after npm run package / npm run package:chrome. Firefox packaging also emits a source tarball for publish workflows. From-source builds work as below.

Development

npm install
npm run fetch-dict   # one-time: downloads system_core.xdic
npm run dev          # build + launch Firefox with the extension loaded
npm run dev:chrome   # same, but Chromium

Other scripts:

Command What it does
npm run build Build the Firefox bundle into dist/
npm run build:chrome Build the Chrome bundle into dist-chrome/
npm run package fetch-dict + build + web-ext build + source tarball → signed-ready .zip + .tar.gz in artifacts/
npm run package:chrome Same, for Chrome
npm run lint oxlint
npm run fmt oxfmt --write src/

Project layout

src/
  background.ts   # Sudachi worker host + cross-context RPC
  content.ts      # DOM walker, ruby injection, Scrapbox shim
  popup.ts        # Toolbar popup UI
  options.ts      # Settings page (shortcut, user dict, auto-enable list)
  lib/furigana.ts # Kana alignment between surface form and reading
  rpc.ts, types.ts
static/
  manifest.json         # Firefox (MV2)
  manifest.chrome.json  # Chrome (MV3)
  _locales/             # en, ja, ko
  icons/, *.html, content.css
scripts/
  build.mjs               # esbuild driver, copies manifest + WASM + dictionary
  fetch-dict.mjs          # downloads the Sudachi system dictionary
  make-source-archive.mjs  # creates the Firefox source tarball for publish
dict/system_core.xdic  # populated by fetch-dict

Upstream / dependencies

The pieces this extension is built on:

The original Sudachi project (WorksApplications/Sudachi) and its dictionary (WorksApplications/SudachiDict) sit upstream of sudachi.rs.

Algorithmic reference:

Permissions

storage (settings + user dictionary) and tabs (apply state per active tab). No host permissions beyond the content script's <all_urls> match — required to inject ruby on whichever page you choose to enable it on.

License

Apache-2.0 — see LICENSE.