Douji (同字) - Instant Hanzi & Kanji Cross-Reference Tooltip

AnkiWeb addon 2058654519

Cross-references Japanese Kanji, Simplified and Traditional Chinese forms on hover with a modifier key, showing regional variants, Pinyin, Kana readings and English definitions in a popup.
AI-generated summary; may contain mistakes.

dictionary

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (👍 0 · 👎 0)
Updated
2026-08-21
Anki versions
2.1.1~
License
GPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
JSON, JavaScript, Python, CSS
Description language
en

Maintenance

active

  • Last update or commit: 2026-09-04 (58 days before the snapshot).
  • GitHub Actions workflows: 1.
  • Commits in the last year: 24.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 1 merged.

GitHub

Repository
grwna/douji · more by grwna
Stars
⭐ 0 · forks 0 · open issues 0
Last commit
2026-09-04
License
GPL-3.0
Languages
Python, JavaScript, CSS, Shell
Tests
0

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-08-21
History across monthly snapshots

Loading…

Similar addons

Hanzi Stats

Calculates how many Hanzi you have learned across configurable HSK, TOCFL, TBCL, and frequency categories, with configurable character lookup URLs and searched fields.

statisticsdictionaryfork-or-reupload

44 votes 88% approval 👍 43 · 👎 1 ⭐ 19 Updated 2023-12-03
Hanzi Table fork

Displays Chinese Hanzi cards in a color-coded table showing card maturity, with support for TOCFL 2023, HSK 2023, and Traditional/Simplified top 6000 characters.

statisticsprogress-trackingfork-or-reupload

5 votes 23% approval 👍 3 · 👎 2 Anki 2.1.1~ Updated 2024-02-18

Description

Douji (同字)

Current Version: v1.1.0 (2026-09-02) • Changelog

Douji (同字) is an Anki add-on that instantly cross-references CJK characters across Japanese (Kanji), Simplified Chinese (Hanzi), and Traditional Chinese (Hanzi).

Hover over any character in the reviewer while holding a modifier key to view its regional variant forms alongside Mandarin Pinyin and Japanese Kana readings in a clean, Yomitan-inspired popup.

Douji Preview

Key Features

  • Regional Variants: Shows 🇯🇵 JP (Japanese Kanji), 🇨🇳 SC (Simplified Chinese), and 🇹🇼 TC (Traditional Chinese) forms side-by-side.
  • English Definitions: Optional row of English definitions for the hovered character directly in the tooltip.
  • Dynamic Accent Highlighting: If all three regional forms differ (e.g. 気 vs 气 vs 氣 or 発 vs 发 vs 發), the hovered variant row is automatically highlighted with an accent border.
  • Tone-Marked Readings: Displays Mandarin Pinyin with tone marks and Japanese On-yomi / Kun-yomi readings in Kana.
  • Extensive Coverage: Bundled with a precompiled database of 45,700+ CJK characters, including variant clusters and invariant characters, sourced from the modern OpenCC Shinjitai specifications.
  • Instant & Responsive: Pure local in-memory lookup (<1ms), debounced hover detection, and automatic viewport edge-flipping.
  • Dark Mode: Native palette adaptation matching Anki's dark / night mode.

How to Use

  1. Hold Shift (or your configured trigger key) while reviewing cards.
  2. Hover the mouse over any Hanzi or Kanji character.
  3. The cross-reference popup will appear instantly.

Hover Demo

Note: Kana (Hiragana/Katakana), Latin letters, numbers, and punctuation are automatically ignored.

Configuration

Customize options via Tools → Add-ons → select Douji → Config:

  • modifier_key: Trigger key ("Shift", "Alt", "Control", or "None").
  • theme: Color theme ("auto", "light", "dark").
  • popup_delay_ms: Hover delay in milliseconds (default: 30).
  • character_font_size & reading_font_size: Font sizes in pixels.
  • japanese_font & chinese_font: Custom CSS font-family strings for regional glyphs.
  • show_pinyin & show_readings: Toggle Pinyin / Kana readings display.
  • show_meanings: Toggle English definitions display.

Compatibility

  • Anki Version: Anki 2.1.20+ (Qt5 and Qt6 supported, tested on Anki 25.09+).
  • Platform: Desktop Anki only (Windows, macOS, Linux).

Source Code & Support

README

Douji (同字)

Douji (同字) is an Anki add-on that instantly cross-references CJK characters across Japanese (Kanji), Simplified Chinese (Hanzi), and Traditional Chinese (Hanzi). Hover over any character in the reviewer while holding a modifier key to view its regional variant forms alongside Mandarin Pinyin and Japanese Kana readings in a clean, Yomitan-inspired popup.

Douji Preview


Table of Contents


How to Use

Hold Shift (or your configured modifier key) and hover over any Hanzi or Kanji character on your cards. The tooltip will appear instantly with the cross-referenced forms and readings.

Hover Demo

  • Regional Variants: Displays 🇯🇵 JP (Japanese), 🇨🇳 SC (Simplified Chinese), and 🇹🇼 TC (Traditional Chinese) forms.
  • Readings: Displays tone-marked Pinyin (Mandarin) and On-yomi / Kun-yomi (Japanese Kana).
  • Target Scope: Only CJK ideographs trigger lookups. Hovering over Kana (Hiragana/Katakana), Latin alphabet, numbers, or punctuation is automatically ignored with no popup.

Installation

Method 1: AnkiWeb (Recommended)

  1. In Anki, go to Tools → Add-ons → Get Add-ons...
  2. Paste the Add-on Code: 2058654519
  3. Click OK and restart Anki.

Ankiweb page: https://ankiweb.net/shared/info/2058654519

Method 2: Manual (.ankiaddon)

  1. Download the latest .ankiaddon file from the Releases page.
  2. Double-click the downloaded file or drag and drop it into Anki.
  3. Restart Anki.

Configuration

Customize behavior, keys, fonts, and appearance via Tools → Add-ons → select this add-on → Config.

Option Type Default Description
modifier_key string "Shift" Trigger key ("Shift", "Alt", "Control", "None").
theme string "auto" Theme style ("auto", "light", "dark").
popup_delay_ms integer 30 Hover debounce delay in milliseconds.
character_font_size integer 24 Font size (px) for main characters and variant glyphs.
reading_font_size integer 13 Font size (px) for readings text.
bold_characters boolean true Display variant characters in bold weight.
japanese_font string "Yu Gothic, ..." CSS font family for Japanese Kanji (JP).
chinese_font string "'Microsoft YaHei', ..." CSS font family for Chinese Hanzi (SC, TC).
popup_min_width integer 220 Minimum tooltip width in pixels.
popup_max_width integer 320 Maximum tooltip width in pixels.
show_pinyin boolean true Toggle Mandarin Pinyin display.
show_readings boolean true Toggle Japanese Kana readings display.
show_meanings boolean true Toggle English meanings display.

Note: "None" triggers on every hover without any key pressed, which may cause popup spam while reading.

For detailed explanations of all settings, see config.md.


Compatibility

  • Tested Version: Anki 25.09+ (Qt6 / Python 3.13 / Chromium 122)
  • Operating Systems: Windows, macOS, Linux
  • Platform: Desktop Anki only (AnkiMobile for iOS, AnkiDroid for Android, and AnkiWeb are unsupported because Python add-ons run strictly in desktop Qt environments)

Troubleshooting & FAQ

The popup doesn't appear when hovering over text

  • Ensure you are holding down the configured modifier_key (default: Shift).
  • Verify that your card template CSS does not have user-select: none; or pointer-events: none; on the text container, which prevents browser caret hit-testing.
  • Confirm the character is a Hanzi/Kanji ideograph (Kana, Latin characters, and punctuation do not trigger popups).

The popup appears underneath card elements or other add-ons

  • Check if your card styling or third-party add-ons set excessive z-index values on parent containers that trap the tooltip layer.

A character shows "No cross-reference found"

  • The character is likely an unmapped rare variant or outside the 9,688 character cluster dataset.

Known Limitations

  • Cross-referencing operates on individual CJK ideographs rather than multi-character compound words.
  • Requires the desktop Qt webview reviewer.
  • Only shows characters with equivalence in all three variants. This means it can't be used to check Simplified-Traditional Mandarin only.
  • Definitions are unified using the Unihan database and provide a generalized English meaning. They do not differentiate between distinct Chinese and Japanese usages of the same character.
  • Definitions might not show the most useful or relevant meanings in some cases, as they are automatically generated from the Unihan database.

Future Plans

  • Persistent popup, closer to Yomitan, which will allow for popup elements to be clickable
  • Primitive decomposition for characters

License

This project is licensed under the GNU General Public License v3.0.