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

AnkiWeb addon 2058654519

Cross-references CJK characters across Japanese, Simplified Chinese, and Traditional Chinese via modifier-key hover popups showing variants, Pinyin, Kana readings, and optional English definitions.
AI-generated summary; may contain mistakes.

dictionary

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (👍 0 · 👎 0)
Updated
2026-08-21
Anki versions
2.1.1~
Description language
en

Maintenance

active

  • Last update or commit was 27 days before the snapshot (2026-09-04).
  • The repository has 1 GitHub Actions workflows.

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

japanese-input

Lets users practice Japanese handwriting by drawing hiragana, katakana, or kanji in Anki, recognizing input and checking kanji against references with feedback.

card-creationquizbeta

Rating 0 👍 0 · 👎 0 ⭐ 1 Anki 26.05~ Updated 2026-07-12
Jisho Kanji Stroke Order

Displays Kanji stroke order when hovering Japanese characters in Anki cards, using Jisho-style visuals and note-type configuration.

appearancedictionary

Rating 12 👍 12 · 👎 0 ⭐ 2 Anki 2.1.65~ Updated 2026-07-29

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.

<p align="center"> <img src="docs/assets/screenshot.png" alt="Douji Preview" width="560" /> </p>


Table of Contents


How to Use

Hold <kbd>Shift</kbd> (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.

<p align="center"> <img src="docs/assets/demo.gif" alt="Hover Demo" width="560" /> </p>

  • 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: <kbd>Shift</kbd>).
  • 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.