aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-10-22 22:51:03 +0000
committerGitHub <noreply@github.com>2023-10-22 22:51:03 +0000
commit7039438ce5087ba4236a81b197ee8c3bfd5164d2 (patch)
tree00d34d05a45fb53708d01cba9260ee081ea206c5
parent2867c7376f51b018a2c193e0a59f682b8ce0fe1e (diff)
parent472f75839a8613887bd934827bc0bc0f0412362b (diff)
Merge pull request #270 from MarvNC/add-markdown-formatting
Add Markdown Formatting
-rw-r--r--.vscode/settings.json3
-rw-r--r--CONTRIBUTING.md48
-rw-r--r--README.md348
3 files changed, 202 insertions, 197 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..903c74ae
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "markdown.extension.toc.levels": "1..3"
+} \ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0b0d722c..2b19e68e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,22 +2,22 @@
Issues reported on [GitHub](https://github.com/themoeway/yomitan/issues) should include information about:
-* What the problem, question, or request is.
-* What browser is being used.
-* What version of Yomitan is being used.
-* If applicable, an export of the settings file.
+- What the problem, question, or request is.
+- What browser is being used.
+- What version of Yomitan is being used.
+- If applicable, an export of the settings file.
# Development
Contributions are welcome from any developers who would like to help out.
Below are a few guidelines to ensure contributions have a good level of quality and consistency:
-* Open GitHub issues to discuss large features before writing code.
-* Follow the [conventions and style](#style) of the existing code.
-* Test changes using the continuous integration tests included in the repository.
-* Write clean, modern ES6 code (`const`/`let`, `async`/`await`, arrow functions, etc.)
-* Large pull requests without a clear scope will not be merged.
-* Incomplete or non-standalone features will not be merged.
+- Open GitHub issues to discuss large features before writing code.
+- Follow the [conventions and style](#style) of the existing code.
+- Test changes using the continuous integration tests included in the repository.
+- Write clean, modern ES6 code (`const`/`let`, `async`/`await`, arrow functions, etc.)
+- Large pull requests without a clear scope will not be merged.
+- Incomplete or non-standalone features will not be merged.
## Setup
@@ -37,23 +37,23 @@ loaded as an unpacked extension by Chrome. This way, development does not requir
and most changes will be automatically updated by the browser. Depending on what files were changed,
the extension may sometimes need to be reloaded before the changes take effect.
-
There are two scripts to build the extension to a packaged file for various build targets:
-* [build.bat](build.bat) on Windows
-* [build.sh](build.sh) on Linux
+
+- [build.bat](build.bat) on Windows
+- [build.sh](build.sh) on Linux
Both of these files are convenience scripts which invoke <code>node [dev/build.js](dev/build.js)</code>.
The build script can produce several different build files based on manifest configurations defined in
[manifest-variants.json](dev/data/manifest-variants.json).
Several command line arguments are available for these scripts:
-* `[target]` - Builds a specific target.
-* `--all` - Builds all targets specified in [manifest-variants.json](dev/data/manifest-variants.json).
-* `--default` - Restores the default manifest file.
-* `--manifest <target>` - Overwrites `ext/manifest.json` with the manifest variant for the specified build target.
-* `--dry-run` - Runs the full build process (excluding zip building), checking that the configuration is valid.
-* `--dry-run-build-zip` - If `--dry-run` is also specified, zip building will also be performed in memory; no files are created.
-* `--yomitan-version <version>` - Sets the version number in the extension manifest. Defaults to 0.0.0.0 if not set.
+- `[target]` - Builds a specific target.
+- `--all` - Builds all targets specified in [manifest-variants.json](dev/data/manifest-variants.json).
+- `--default` - Restores the default manifest file.
+- `--manifest <target>` - Overwrites `ext/manifest.json` with the manifest variant for the specified build target.
+- `--dry-run` - Runs the full build process (excluding zip building), checking that the configuration is valid.
+- `--dry-run-build-zip` - If `--dry-run` is also specified, zip building will also be performed in memory; no files are created.
+- `--yomitan-version <version>` - Sets the version number in the extension manifest. Defaults to 0.0.0.0 if not set.
If no arguments are specified, the command is equivalent to `build.bat --all`.
@@ -75,6 +75,8 @@ The generated `ext/manfiest.json` should not be committed.
Linting rules are defined for a few types of files, and validation is performed as part of the standard tests
run by `npm test` and the continuous integration process.
-* [.eslintrc.json](.eslintrc.json) rules are used for JavaScript files.
-* [.stylelintrc.json](.stylelintrc.json) rules are used for CSS files.
-* [.htmlvalidate.json](.htmlvalidate.json) rules are used for HTML files.
+- [.eslintrc.json](.eslintrc.json) rules are used for JavaScript files.
+- [.stylelintrc.json](.stylelintrc.json) rules are used for CSS files.
+- [.htmlvalidate.json](.htmlvalidate.json) rules are used for HTML files.
+
+In addition, the [Markdown All in One VSCode extension](https://github.com/yzhang-gh/vscode-markdown) is used for formatting markdown files and automatically updating the table of contents.
diff --git a/README.md b/README.md
index 0da2c617..20306688 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# Yomitan
+# Yomitan <!-- omit from toc -->
-[![Chrome Release (Testing)](https://img.shields.io/chrome-web-store/v/glnaenfapkkecknnmginabpmgkenenml?label=chrome%20release%20(testing))](https://chrome.google.com/webstore/detail/yomitan-development-build/glnaenfapkkecknnmginabpmgkenenml)
-[![Firefox Release (Testing)](https://img.shields.io/github/v/release/themoeway/yomitan?filter=*&label=firefox%20release%20(testing))](https://github.com/themoeway/yomitan/releases)
+[![Chrome Release (Testing)](<https://img.shields.io/chrome-web-store/v/glnaenfapkkecknnmginabpmgkenenml?label=chrome%20release%20(testing)>)](https://chrome.google.com/webstore/detail/yomitan-development-build/glnaenfapkkecknnmginabpmgkenenml)
+[![Firefox Release (Testing)](<https://img.shields.io/github/v/release/themoeway/yomitan?filter=*&label=firefox%20release%20(testing)>)](https://github.com/themoeway/yomitan/releases)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/themoeway/yomitan/badge)](https://securityscorecards.dev/viewer/?uri=github.com/themoeway/yomitan)
[![Discord Server](https://dcbadge.vercel.app/api/server/UGNPMDE7zC?style=flat)](https://discord.gg/UGNPMDE7zC)\
**Important note:** Yomitan is still not recommended for use, as we are still trying to complete the transition to Manifest V3 (which is required of all new browser extensions), and there are [some critical bugs remaining](https://github.com/themoeway/yomitan/issues?q=is%3Aopen+is%3Aissue+label%3Apriority%2Fhigh). This is also why there is no stable release of yomitan yet.
@@ -9,12 +9,11 @@
> :wave: **This project is a community fork of yomichan** (which was [sunset](https://foosoft.net/posts/sunsetting-the-yomichan-project/) by its owner on Feb 26 2023).
>
> The primary goal is to **keep the project alive and working on latest browser versions and doing bugfixes**. (Feature improvements are considered secondary.)
->
-> Since the owner requested forks be uniquely named, we have chosen a new name: *yomitan*. (*-tan* is an honorific used for anthropomorphic moe characters.) While we've renamed the codebase and made judicious use of find-and-replace, it is entirely the hard work of foosoft and numerous other open source contributors from 2016-2023 and we do not claim any credit.
+>
+> Since the owner requested forks be uniquely named, we have chosen a new name: _yomitan_. (_-tan_ is an honorific used for anthropomorphic moe characters.) While we've renamed the codebase and made judicious use of find-and-replace, it is entirely the hard work of foosoft and numerous other open source contributors from 2016-2023 and we do not claim any credit.
>
> Since this is a distributed effort, we highly welcome new contributors! Feel free to browse the issue tracker, and you can find us on [TheMoeWay Discord](https://discord.gg/UGNPMDE7zC) at [#yomitan](https://discord.com/channels/617136488840429598/1081538711742844980)
-
Yomitan turns your web browser into a tool for building Japanese language literacy by helping you to decipher texts
which would be otherwise too difficult tackle. This extension is similar to
[10ten Japanese Reader (formerly Rikaichamp)](https://addons.mozilla.org/en-US/firefox/addon/10ten-ja-reader/) for Firefox and
@@ -23,50 +22,52 @@ stands apart in its goal of being an all-encompassing learning tool as opposed t
Yomitan provides advanced features not available in other browser-based dictionaries:
-* Interactive popup definition window for displaying search results.
-* On-demand audio playback for select dictionary definitions.
-* Kanji stroke order diagrams are just a click away for most characters.
-* Custom search page for easily executing custom search queries.
-* Support for multiple dictionary formats including [EPWING](https://ja.wikipedia.org/wiki/EPWING) via the [Yomichan Import](https://foosoft.net/projects/yomichan-import) tool.
-* Automatic note creation for the [Anki](https://apps.ankiweb.net/) flashcard program via the [AnkiConnect](https://foosoft.net/projects/anki-connect) plugin.
-* Clean, modern code makes it easy for developers to [contribute](https://github.com/themoeway/yomitan/blob/master/CONTRIBUTING.md) new features.
+- Interactive popup definition window for displaying search results.
+- On-demand audio playback for select dictionary definitions.
+- Kanji stroke order diagrams are just a click away for most characters.
+- Custom search page for easily executing custom search queries.
+- Support for multiple dictionary formats including [EPWING](https://ja.wikipedia.org/wiki/EPWING) via the [Yomichan Import](https://foosoft.net/projects/yomichan-import) tool.
+- Automatic note creation for the [Anki](https://apps.ankiweb.net/) flashcard program via the [AnkiConnect](https://foosoft.net/projects/anki-connect) plugin.
+- Clean, modern code makes it easy for developers to [contribute](https://github.com/themoeway/yomitan/blob/master/CONTRIBUTING.md) new features.
[![Term definitions](img/ss-terms-thumb.png)](img/ss-terms.png)
[![Kanji information](img/ss-kanji-thumb.png)](img/ss-kanji.png)
[![Dictionary options](img/ss-dictionaries-thumb.png)](img/ss-dictionaries.png)
[![Anki options](img/ss-anki-thumb.png)](img/ss-anki.png)
-## Table of Contents
-
-* [Installation](#installation)
-* [Migrating from Yomichan](#migrating-from-yomichan)
-* [Dictionaries](#dictionaries)
-* [Basic Usage](#basic-usage)
- * [Importing Dictionaries](#importing-dictionaries)
-* [Custom Dictionaries](#custom-dictionaries)
-* [Anki Integration](#anki-integration)
- * [Flashcard Configuration](#flashcard-configuration)
- * [Flashcard Creation](#flashcard-creation)
-* [Keyboard Shortcuts](#keyboard-shortcuts)
-* [Frequently Asked Questions](#frequently-asked-questions)
-* [Licenses](#licenses)
-* [Third-Party Libraries](#third-party-libraries)
+## Table of Contents<!-- omit from toc -->
+
+- [Installation](#installation)
+- [Migrating from Yomichan](#migrating-from-yomichan)
+- [Dictionaries](#dictionaries)
+- [Basic Usage](#basic-usage)
+ - [Importing Dictionaries](#importing-dictionaries)
+ - [Importing and Exporting Personal Configuration](#importing-and-exporting-personal-configuration)
+- [Custom Dictionaries](#custom-dictionaries)
+- [Anki Integration](#anki-integration)
+ - [Flashcard Configuration](#flashcard-configuration)
+ - [Flashcard Creation](#flashcard-creation)
+- [Keyboard Shortcuts](#keyboard-shortcuts)
+- [Frequently Asked Questions](#frequently-asked-questions)
+- [Licenses](#licenses)
+- [Third-Party Libraries](#third-party-libraries)
## Installation
-Yomitan comes in two flavors: *stable* and *testing*. Over the years, this extension has evolved to contain many
+Yomitan comes in two flavors: _stable_ and _testing_. Over the years, this extension has evolved to contain many
complex features which have become increasingly difficult to test across different browsers, versions, and environments.
-New changes are initially introduced into the *testing* version, and after some time spent ensuring that they are
-relatively bug free, they will be promoted to the *stable* version. If you are technically savvy and don't mind
-submitting issues on GitHub, try the *testing* version; otherwise, the *stable* version will be your best bet.
+New changes are initially introduced into the _testing_ version, and after some time spent ensuring that they are
+relatively bug free, they will be promoted to the _stable_ version. If you are technically savvy and don't mind
+submitting issues on GitHub, try the _testing_ version; otherwise, the _stable_ version will be your best bet.
-* **Google Chrome**
- * stable (not released yet)
- * [testing](https://chrome.google.com/webstore/detail/yomitan-development-build/glnaenfapkkecknnmginabpmgkenenml)
+- **Google Chrome**
-* **Mozilla Firefox**
- * stable (not released yet)
- * [testing](https://github.com/themoeway/yomitan/releases) ※
+ - stable (not released yet)
+ - [testing](https://chrome.google.com/webstore/detail/yomitan-development-build/glnaenfapkkecknnmginabpmgkenenml)
+
+- **Mozilla Firefox**
+ - stable (not released yet)
+ - [testing](https://github.com/themoeway/yomitan/releases) ※
※ NOTE: Unlike Chrome, Firefox does not allow extensions meant for testing to be hosted in the marketplace.
You will have to download a desired version and side-load it yourself. You only need to do this once and will get
@@ -93,30 +94,29 @@ Import](https://foosoft.net/projects/yomichan-import) page to learn how to conve
Be aware that the non-English dictionaries contain fewer entries than their English counterparts. Even if your primary
language is not English, you may consider also importing the English version for better coverage.
-* **[JMdict](https://www.edrdg.org/jmdict/edict_doc.html)** (Japanese vocabulary)
- * [jmdict\_dutch.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_dutch.zip)
- * [jmdict\_english.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_english.zip)
- * [jmdict\_french.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_french.zip)
- * [jmdict\_german.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_german.zip)
- * [jmdict\_hungarian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_hungarian.zip)
- * [jmdict\_russian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_russian.zip)
- * [jmdict\_slovenian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_slovenian.zip)
- * [jmdict\_spanish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_spanish.zip)
- * [jmdict\_swedish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_swedish.zip)
-* **[JMnedict](https://www.edrdg.org/enamdict/enamdict_doc.html)** (Japanese names)
- * [jmnedict.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmnedict.zip)
-* **KireiCake (upstream project dead)** (Japanese slang)
- * [kireicake.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kireicake.zip)
-* **[KANJIDIC](http://nihongo.monash.edu/kanjidic2/index.html)** (Japanese kanji)
- * [kanjidic\_english.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_english.zip)
- * [kanjidic\_french.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_french.zip)
- * [kanjidic\_portuguese.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_portuguese.zip)
- * [kanjidic\_spanish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_spanish.zip)
-* **[Innocent Corpus](https://web.archive.org/web/20190309073023/https://forum.koohii.com/thread-9459.html#pid168613)** (Term and kanji frequencies across 5000+ novels)
- * [innocent\_corpus.zip](https://github.com/themoeway/yomitan/raw/dictionaries/innocent_corpus.zip)
-* **[Kanjium](https://github.com/mifunetoshiro/kanjium)** (Pitch dictionary, see [related project page](https://github.com/toasted-nutbread/yomichan-pitch-accent-dictionary) for details)
- * [kanjium_pitch_accents.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjium_pitch_accents.zip)
-
+- **[JMdict](https://www.edrdg.org/jmdict/edict_doc.html)** (Japanese vocabulary)
+ - [jmdict_dutch.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_dutch.zip)
+ - [jmdict_english.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_english.zip)
+ - [jmdict_french.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_french.zip)
+ - [jmdict_german.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_german.zip)
+ - [jmdict_hungarian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_hungarian.zip)
+ - [jmdict_russian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_russian.zip)
+ - [jmdict_slovenian.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_slovenian.zip)
+ - [jmdict_spanish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_spanish.zip)
+ - [jmdict_swedish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmdict_swedish.zip)
+- **[JMnedict](https://www.edrdg.org/enamdict/enamdict_doc.html)** (Japanese names)
+ - [jmnedict.zip](https://github.com/themoeway/yomitan/raw/dictionaries/jmnedict.zip)
+- **KireiCake (upstream project dead)** (Japanese slang)
+ - [kireicake.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kireicake.zip)
+- **[KANJIDIC](http://nihongo.monash.edu/kanjidic2/index.html)** (Japanese kanji)
+ - [kanjidic_english.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_english.zip)
+ - [kanjidic_french.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_french.zip)
+ - [kanjidic_portuguese.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_portuguese.zip)
+ - [kanjidic_spanish.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjidic_spanish.zip)
+- **[Innocent Corpus](https://web.archive.org/web/20190309073023/https://forum.koohii.com/thread-9459.html#pid168613)** (Term and kanji frequencies across 5000+ novels)
+ - [innocent_corpus.zip](https://github.com/themoeway/yomitan/raw/dictionaries/innocent_corpus.zip)
+- **[Kanjium](https://github.com/mifunetoshiro/kanjium)** (Pitch dictionary, see [related project page](https://github.com/toasted-nutbread/yomichan-pitch-accent-dictionary) for details)
+ - [kanjium_pitch_accents.zip](https://github.com/themoeway/yomitan/raw/dictionaries/kanjium_pitch_accents.zip)
## Basic Usage
@@ -124,10 +124,10 @@ language is not English, you may consider also importing the English version for
<img src="resources/images/browser-action-popup1.png" alt="">
- * The <img src="ext/images/cog.svg" alt="" width="16" height="16"> _cog_ button will open the Settings page.
- * The <img src="ext/images/magnifying-glass.svg" alt="" width="16" height="16"> _magnifying glass_ button will open the Search page.
- * The <img src="ext/images/question-mark-circle.svg" alt="" width="16" height="16"> _question mark_ button will open the Information page.
- * The <img src="ext/images/profile.svg" alt="" width="16" height="16"> _profile_ button will appear when multiple profiles exist, allowing the current profile to be quickly changed.
+ - The <img src="ext/images/cog.svg" alt="" width="16" height="16"> _cog_ button will open the Settings page.
+ - The <img src="ext/images/magnifying-glass.svg" alt="" width="16" height="16"> _magnifying glass_ button will open the Search page.
+ - The <img src="ext/images/question-mark-circle.svg" alt="" width="16" height="16"> _question mark_ button will open the Information page.
+ - The <img src="ext/images/profile.svg" alt="" width="16" height="16"> _profile_ button will appear when multiple profiles exist, allowing the current profile to be quickly changed.
2. Import the dictionaries you wish to use for term and kanji searches. If you do not have any dictionaries installed
or enabled, Yomitan will warn you that it is not ready for use by displaying an orange exclamation mark over its
@@ -167,7 +167,7 @@ Yomitan also supports exporting and importing your entire collection of dictiona
- Click `Export Dictionary Collection` from the backup section of Yomitan's settings page
- It will show you a progress report as it exports the data then initiates a
- download for a file named something like `yomitan-dictionaries-YYYY-MM-DD-HH-mm-ss.json`
+ download for a file named something like `yomitan-dictionaries-YYYY-MM-DD-HH-mm-ss.json`
(e.g. `yomitan-dictionaries-2023-07-05-02-42-04.json`)
### Importing and Exporting Personal Configuration
@@ -204,9 +204,9 @@ flashcards that Yomitan creates through AnkiConnect.
Flashcard fields can be configured with the following steps:
-1. Open the Yomitan options page and scroll down to the section labeled *Anki Options*.
-2. Tick the checkbox labeled *Enable Anki integration* (Anki must be running with [AnkiConnect](https://foosoft.net/projects/anki-connect) installed).
-3. Select the type of template to configure by clicking on either the *Terms* or *Kanji* tabs.
+1. Open the Yomitan options page and scroll down to the section labeled _Anki Options_.
+2. Tick the checkbox labeled _Enable Anki integration_ (Anki must be running with [AnkiConnect](https://foosoft.net/projects/anki-connect) installed).
+3. Select the type of template to configure by clicking on either the _Terms_ or _Kanji_ tabs.
4. Select the Anki deck and model to use for new creating new flashcards of this type.
5. Fill the model fields with markers corresponding to the information you wish to include (several can be used at
once). Advanced users can also configure the actual [Handlebars](https://handlebarsjs.com/) templates used to create
@@ -214,62 +214,62 @@ Flashcard fields can be configured with the following steps:
#### Markers for Term Cards
- Marker | Description
- -------|------------
- `{audio}` | Audio sample of a native speaker's pronunciation in MP3 format (if available).
- `{clipboard-image}` | An image which is stored in the system clipboard, if present.
- `{clipboard-text}` | Text which is stored in the system clipboard, if present.
- `{cloze-body}` | Raw, inflected term as it appeared before being reduced to dictionary form by Yomitan.
- `{cloze-prefix}` | Fragment of the containing `{sentence}` starting at the beginning of `{sentence}` until the beginning of `{cloze-body}`.
- `{cloze-suffix}` | Fragment of the containing `{sentence}` starting at the end of `{cloze-body}` until the end of `{sentence}`.
- `{conjugation}` | Conjugation path from the raw inflected term to the source term.
- `{dictionary}` | Name of the dictionary from which the card is being created (unavailable in *grouped* mode).
- `{document-title}` | Title of the web page that the term appeared in.
- `{expression}` | Term expressed as kanji (will be displayed in kana if kanji is not available).
- `{frequencies}` | Frequency information for the term.
- `{furigana}` | Term expressed as kanji with furigana displayed above it (e.g. <ruby>日本語<rt>にほんご</rt></ruby>).
- `{furigana-plain}` | Term expressed as kanji with furigana displayed next to it in brackets (e.g. 日本語[にほんご]).
- `{glossary}` | List of definitions for the term (output format depends on whether running in *grouped* mode).
- `{glossary-brief}` | List of definitions for the term in a more compact format.
- `{glossary-no-dictionary}` | List of definitions for the term, except the dictionary tag is omitted.
- `{part-of-speech}` | Part of speech information for the term.
- `{pitch-accents}` | List of pitch accent downstep notations for the term.
- `{pitch-accent-graphs}` | List of pitch accent graphs for the term.
- `{pitch-accent-positions}` | List of accent downstep positions for the term as a number.
- `{reading}` | Kana reading for the term (empty for terms where the expression is the reading).
- `{screenshot}` | Screenshot of the web page taken at the time the term was added.
- `{search-query}` | The full search query shown on the search page.
- `{selection-text}` | The selected text on the search page or popup.
- `{sentence}` | Sentence, quote, or phrase that the term appears in from the source content.
- `{sentence-furigana}` | Sentence, quote, or phrase that the term appears in from the source content, with furigana added.
- `{tags}` | Grammar and usage tags providing information about the term (unavailable in *grouped* mode).
- `{url}` | Address of the web page in which the term appeared in.
+ | Marker | Description |
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
+ | `{audio}` | Audio sample of a native speaker's pronunciation in MP3 format (if available). |
+ | `{clipboard-image}` | An image which is stored in the system clipboard, if present. |
+ | `{clipboard-text}` | Text which is stored in the system clipboard, if present. |
+ | `{cloze-body}` | Raw, inflected term as it appeared before being reduced to dictionary form by Yomitan. |
+ | `{cloze-prefix}` | Fragment of the containing `{sentence}` starting at the beginning of `{sentence}` until the beginning of `{cloze-body}`. |
+ | `{cloze-suffix}` | Fragment of the containing `{sentence}` starting at the end of `{cloze-body}` until the end of `{sentence}`. |
+ | `{conjugation}` | Conjugation path from the raw inflected term to the source term. |
+ | `{dictionary}` | Name of the dictionary from which the card is being created (unavailable in _grouped_ mode). |
+ | `{document-title}` | Title of the web page that the term appeared in. |
+ | `{expression}` | Term expressed as kanji (will be displayed in kana if kanji is not available). |
+ | `{frequencies}` | Frequency information for the term. |
+ | `{furigana}` | Term expressed as kanji with furigana displayed above it (e.g. <ruby>日本語<rt>にほんご</rt></ruby>). |
+ | `{furigana-plain}` | Term expressed as kanji with furigana displayed next to it in brackets (e.g. 日本語[にほんご]). |
+ | `{glossary}` | List of definitions for the term (output format depends on whether running in _grouped_ mode). |
+ | `{glossary-brief}` | List of definitions for the term in a more compact format. |
+ | `{glossary-no-dictionary}` | List of definitions for the term, except the dictionary tag is omitted. |
+ | `{part-of-speech}` | Part of speech information for the term. |
+ | `{pitch-accents}` | List of pitch accent downstep notations for the term. |
+ | `{pitch-accent-graphs}` | List of pitch accent graphs for the term. |
+ | `{pitch-accent-positions}` | List of accent downstep positions for the term as a number. |
+ | `{reading}` | Kana reading for the term (empty for terms where the expression is the reading). |
+ | `{screenshot}` | Screenshot of the web page taken at the time the term was added. |
+ | `{search-query}` | The full search query shown on the search page. |
+ | `{selection-text}` | The selected text on the search page or popup. |
+ | `{sentence}` | Sentence, quote, or phrase that the term appears in from the source content. |
+ | `{sentence-furigana}` | Sentence, quote, or phrase that the term appears in from the source content, with furigana added. |
+ | `{tags}` | Grammar and usage tags providing information about the term (unavailable in _grouped_ mode). |
+ | `{url}` | Address of the web page in which the term appeared in. |
#### Markers for Kanji Cards
- Marker | Description
- -------|------------
- `{character}` | Unicode glyph representing the current kanji.
- `{clipboard-image}` | An image which is stored in the system clipboard, if present.
- `{clipboard-text}` | Text which is stored in the system clipboard, if present.
- `{cloze-body}` | Raw, inflected parent term as it appeared before being reduced to dictionary form by Yomitan.
- `{cloze-prefix}` | Fragment of the containing `{sentence}` starting at the beginning of `{sentence}` until the beginning of `{cloze-body}`.
- `{cloze-suffix}` | Fragment of the containing `{sentence}` starting at the end of `{cloze-body}` until the end of `{sentence}`.
- `{dictionary}` | Name of the dictionary from which the card is being created.
- `{document-title}` | Title of the web page that the kanji appeared in.
- `{frequencies}` | Frequency information for the kanji.
- `{glossary}` | List of definitions for the kanji.
- `{kunyomi}` | Kunyomi (Japanese reading) for the kanji expressed as katakana.
- `{onyomi}` | Onyomi (Chinese reading) for the kanji expressed as hiragana.
- `{screenshot}` | Screenshot of the web page taken at the time the kanji was added.
- `{search-query}` | The full search query shown on the search page.
- `{selection-text}` | The selected text on the search page or popup.
- `{sentence}` | Sentence, quote, or phrase that the character appears in from the source content.
- `{sentence-furigana}` | Sentence, quote, or phrase that the character appears in from the source content, with furigana added.
- `{stroke-count}` | Number of strokes that the kanji character has.
- `{url}` | Address of the web page in which the kanji appeared in.
-
-When creating your model for Yomitan, *make sure that you pick a unique field to be first*; fields that will
+ | Marker | Description |
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------ |
+ | `{character}` | Unicode glyph representing the current kanji. |
+ | `{clipboard-image}` | An image which is stored in the system clipboard, if present. |
+ | `{clipboard-text}` | Text which is stored in the system clipboard, if present. |
+ | `{cloze-body}` | Raw, inflected parent term as it appeared before being reduced to dictionary form by Yomitan. |
+ | `{cloze-prefix}` | Fragment of the containing `{sentence}` starting at the beginning of `{sentence}` until the beginning of `{cloze-body}`. |
+ | `{cloze-suffix}` | Fragment of the containing `{sentence}` starting at the end of `{cloze-body}` until the end of `{sentence}`. |
+ | `{dictionary}` | Name of the dictionary from which the card is being created. |
+ | `{document-title}` | Title of the web page that the kanji appeared in. |
+ | `{frequencies}` | Frequency information for the kanji. |
+ | `{glossary}` | List of definitions for the kanji. |
+ | `{kunyomi}` | Kunyomi (Japanese reading) for the kanji expressed as katakana. |
+ | `{onyomi}` | Onyomi (Chinese reading) for the kanji expressed as hiragana. |
+ | `{screenshot}` | Screenshot of the web page taken at the time the kanji was added. |
+ | `{search-query}` | The full search query shown on the search page. |
+ | `{selection-text}` | The selected text on the search page or popup. |
+ | `{sentence}` | Sentence, quote, or phrase that the character appears in from the source content. |
+ | `{sentence-furigana}` | Sentence, quote, or phrase that the character appears in from the source content, with furigana added. |
+ | `{stroke-count}` | Number of strokes that the kanji character has. |
+ | `{url}` | Address of the web page in which the kanji appeared in. |
+
+When creating your model for Yomitan, _make sure that you pick a unique field to be first_; fields that will
contain `{expression}` or `{character}` are ideal candidates for this. Anki does not allow duplicate flashcards to be
added to a deck by default; it uses the first field in the model to check for duplicates. For example, if you have `{reading}`
configured to be the first field in your model and <ruby>橋<rt>はし</rt></ruby> is already in your deck, you will not
@@ -280,40 +280,40 @@ be able to create a flashcard for <ruby>箸<rt>はし</rt></ruby> because they s
Once Yomitan is configured, it becomes trivial to create new flashcards with a single click. You will see the following
icons next to term definitions:
-* Clicking ![](img/btn-add-expression.png) adds the current expression as kanji (e.g. 食べる).
-* Clicking ![](img/btn-add-reading.png) adds the current expression as hiragana or katakana (e.g. たべる).
+- Clicking ![](img/btn-add-expression.png) adds the current expression as kanji (e.g. 食べる).
+- Clicking ![](img/btn-add-reading.png) adds the current expression as hiragana or katakana (e.g. たべる).
Below are some troubleshooting tips you can try if you are unable to create new flashcards:
-* Individual icons will appear grayed out if a flashcard cannot be created for the current definition (e.g. it already exists in the deck).
-* If all of the buttons appear grayed out, then you should double-check your deck and model configuration settings.
-* If no icons appear at all, make sure that Anki is running in the background and that [AnkiConnect](https://foosoft.net/projects/anki-connect) has been installed.
+- Individual icons will appear grayed out if a flashcard cannot be created for the current definition (e.g. it already exists in the deck).
+- If all of the buttons appear grayed out, then you should double-check your deck and model configuration settings.
+- If no icons appear at all, make sure that Anki is running in the background and that [AnkiConnect](https://foosoft.net/projects/anki-connect) has been installed.
## Keyboard Shortcuts
The following shortcuts are globally available:
-Shortcut | Action
----------|-------
-<kbd>Alt</kbd> + <kbd>Insert</kbd> | Open search page.
-<kbd>Alt</kbd> + <kbd>Delete</kbd> | Toggle extension on/off.
+| Shortcut | Action |
+| ---------------------------------- | ------------------------ |
+| <kbd>Alt</kbd> + <kbd>Insert</kbd> | Open search page. |
+| <kbd>Alt</kbd> + <kbd>Delete</kbd> | Toggle extension on/off. |
The following shortcuts are available on search results:
-Shortcut | Action
----------|-------
-<kbd>Esc</kbd> | Cancel current search.
-<kbd>Alt</kbd> + <kbd>PgUp</kbd> | Page up through results.
-<kbd>Alt</kbd> + <kbd>PgDn</kbd> | Page down through results.
-<kbd>Alt</kbd> + <kbd>End</kbd> | Go to last result.
-<kbd>Alt</kbd> + <kbd>Home</kbd> | Go to first result.
-<kbd>Alt</kbd> + <kbd>Up</kbd> | Go to previous result.
-<kbd>Alt</kbd> + <kbd>Down</kbd> | Go to next result.
-<kbd>Alt</kbd> + <kbd>b</kbd> | Go to back to source term.
-<kbd>Alt</kbd> + <kbd>e</kbd> | Add current term as expression to Anki.
-<kbd>Alt</kbd> + <kbd>r</kbd> | Add current term as reading to Anki.
-<kbd>Alt</kbd> + <kbd>p</kbd> | Play audio for current term.
-<kbd>Alt</kbd> + <kbd>k</kbd> | Add current kanji to Anki.
+| Shortcut | Action |
+| -------------------------------- | --------------------------------------- |
+| <kbd>Esc</kbd> | Cancel current search. |
+| <kbd>Alt</kbd> + <kbd>PgUp</kbd> | Page up through results. |
+| <kbd>Alt</kbd> + <kbd>PgDn</kbd> | Page down through results. |
+| <kbd>Alt</kbd> + <kbd>End</kbd> | Go to last result. |
+| <kbd>Alt</kbd> + <kbd>Home</kbd> | Go to first result. |
+| <kbd>Alt</kbd> + <kbd>Up</kbd> | Go to previous result. |
+| <kbd>Alt</kbd> + <kbd>Down</kbd> | Go to next result. |
+| <kbd>Alt</kbd> + <kbd>b</kbd> | Go to back to source term. |
+| <kbd>Alt</kbd> + <kbd>e</kbd> | Add current term as expression to Anki. |
+| <kbd>Alt</kbd> + <kbd>r</kbd> | Add current term as reading to Anki. |
+| <kbd>Alt</kbd> + <kbd>p</kbd> | Play audio for current term. |
+| <kbd>Alt</kbd> + <kbd>k</kbd> | Add current kanji to Anki. |
## Frequently Asked Questions
@@ -324,18 +324,18 @@ everything "just works" in Chrome, depending on settings, Firefox users can run
Yomitan catches errors and tries to offer suggestions about how to work around Firefox issues, but in general at least
one of the following solutions should work for you:
-* Make sure you have cookies enabled. It appears that disabling them also disables IndexedDB for some reason. You
- can still have cookies be disabled on other sites; just make sure to add the Yomitan extension to the whitelist of
- whatever tool you are using to restrict cookies. You can get the extension "URL" by looking at the address bar when
- you have the search page open.
-* Make sure that you have sufficient disk space available on the drive Firefox uses to store your user profile.
- Firefox limits the amount of space that can be used by IndexedDB to a small fraction of the disk space actually
- available on your computer.
-* Make sure that you have history set to "Remember history" enabled in your privacy settings. When this option is
- set to "Never remember history", IndexedDB access is once again disabled for an inexplicable reason.
-* As a last resort, try using the [Refresh Firefox](https://support.mozilla.org/en-US/kb/reset-preferences-fix-problems)
- feature to reset your user profile. It appears that the Firefox profile system can corrupt itself preventing
- IndexedDB from being accessible to Yomitan.
+- Make sure you have cookies enabled. It appears that disabling them also disables IndexedDB for some reason. You
+ can still have cookies be disabled on other sites; just make sure to add the Yomitan extension to the whitelist of
+ whatever tool you are using to restrict cookies. You can get the extension "URL" by looking at the address bar when
+ you have the search page open.
+- Make sure that you have sufficient disk space available on the drive Firefox uses to store your user profile.
+ Firefox limits the amount of space that can be used by IndexedDB to a small fraction of the disk space actually
+ available on your computer.
+- Make sure that you have history set to "Remember history" enabled in your privacy settings. When this option is
+ set to "Never remember history", IndexedDB access is once again disabled for an inexplicable reason.
+- As a last resort, try using the [Refresh Firefox](https://support.mozilla.org/en-US/kb/reset-preferences-fix-problems)
+ feature to reset your user profile. It appears that the Firefox profile system can corrupt itself preventing
+ IndexedDB from being accessible to Yomitan.
**Will you add support for online dictionaries?**
@@ -346,13 +346,13 @@ experience.
**Is it possible to use Yomitan with files saved locally on my computer with Chrome?**
-In order to use Yomitan with local files in Chrome, you must first tick the *Allow access to file URLs* checkbox
+In order to use Yomitan with local files in Chrome, you must first tick the _Allow access to file URLs_ checkbox
for Yomitan on the extensions page. Due to the restrictions placed on browser addons in the WebExtensions model, it
will likely never be possible to use Yomitan with PDF files.
**Is it possible to delete individual dictionaries without purging the database?**
-Yomitan is able to delete individual dictionaries, but keep in mind that this process can be *very* slow and can
+Yomitan is able to delete individual dictionaries, but keep in mind that this process can be _very_ slow and can
cause the browser to become unresponsive. The time it takes to delete a single dictionary can sometimes be roughly
the same as the time it originally took to import, which can be significant for certain large dictionaries.
@@ -373,24 +373,24 @@ new languages will be declined, allowing Yomitan's focus to remain Japanese-cent
Required licensing notices for this project follow below:
-* **EDRDG License** \
- This package uses the [EDICT](https://www.edrdg.org/jmdict/edict.html) and
- [KANJIDIC](https://www.edrdg.org/wiki/index.php/KANJIDIC_Project) dictionary files. These files are the property of
- the [Electronic Dictionary Research and Development Group](https://www.edrdg.org/), and are used in conformance with
- the Group's [license](https://www.edrdg.org/edrdg/licence.html).
+- **EDRDG License** \
+ This package uses the [EDICT](https://www.edrdg.org/jmdict/edict.html) and
+ [KANJIDIC](https://www.edrdg.org/wiki/index.php/KANJIDIC_Project) dictionary files. These files are the property of
+ the [Electronic Dictionary Research and Development Group](https://www.edrdg.org/), and are used in conformance with
+ the Group's [license](https://www.edrdg.org/edrdg/licence.html).
-* **Kanjium License** \
- The pitch accent notation, verb particle data, phonetics, homonyms and other additions or modifications to EDICT,
- KANJIDIC or KRADFILE were provided by Uros Ozvatic through his free database.
+- **Kanjium License** \
+ The pitch accent notation, verb particle data, phonetics, homonyms and other additions or modifications to EDICT,
+ KANJIDIC or KRADFILE were provided by Uros Ozvatic through his free database.
## Third-Party Libraries
Yomitan uses several third-party libraries to function. Below are links to homepages, snapshots, and licenses of the exact
versions packaged.
-* Handlebars: To retain Handlebars templating without unsafe-eval, a fork of handlebars by Kibana is being used. [homepage](https://github.com/Aquafina-water-bottle/handlebars-noeval) - [snapshot](https://raw.githubusercontent.com/Aquafina-water-bottle/handlebars-noeval/10efaac28d8d2e8d7e503347281eff1a90aa3f31/handlebars.min.js) - [license](https://github.com/Aquafina-water-bottle/handlebars-noeval/blob/10efaac28d8d2e8d7e503347281eff1a90aa3f31/src/hb/LICENSE)
-* JSZip: [homepage](https://stuk.github.io/jszip/) - [snapshot](https://github.com/Stuk/jszip/blob/v3.9.1/dist/jszip.min.js) - [license](https://github.com/Stuk/jszip/blob/v3.9.1/LICENSE.markdown)
-* WanaKana: [homepage](https://wanakana.com/) - [snapshot](https://unpkg.com/wanakana@4.0.2/umd/wanakana.min.js) - [license](https://github.com/WaniKani/WanaKana/blob/4.0.2/LICENSE)
-* parse5: [homepage](https://github.com/inikulin/parse5) - [snapshot](https://github.com/inikulin/parse5/tree/v7.1.2/packages/parse5) - [license](https://github.com/inikulin/parse5/blob/v7.1.2/LICENSE) _(Only used in MV3 build)_
-* Dexie: [homepage](https://dexie.org/) - [snapshot](https://unpkg.com/dexie@3.2.4/dist/dexie.min.js) - [license](https://unpkg.com/dexie@3.2.4/LICENSE)
-* dexie-export-import: [homepage](https://www.npmjs.com/package/dexie-export-import) - [snapshot](https://unpkg.com/dexie-export-import@4.0.7/dist/dexie-export-import.js) - [license](https://unpkg.com/dexie-export-import@4.0.7/LICENSE)
+- Handlebars: To retain Handlebars templating without unsafe-eval, a fork of handlebars by Kibana is being used. [homepage](https://github.com/Aquafina-water-bottle/handlebars-noeval) - [snapshot](https://raw.githubusercontent.com/Aquafina-water-bottle/handlebars-noeval/10efaac28d8d2e8d7e503347281eff1a90aa3f31/handlebars.min.js) - [license](https://github.com/Aquafina-water-bottle/handlebars-noeval/blob/10efaac28d8d2e8d7e503347281eff1a90aa3f31/src/hb/LICENSE)
+- JSZip: [homepage](https://stuk.github.io/jszip/) - [snapshot](https://github.com/Stuk/jszip/blob/v3.9.1/dist/jszip.min.js) - [license](https://github.com/Stuk/jszip/blob/v3.9.1/LICENSE.markdown)
+- WanaKana: [homepage](https://wanakana.com/) - [snapshot](https://unpkg.com/wanakana@4.0.2/umd/wanakana.min.js) - [license](https://github.com/WaniKani/WanaKana/blob/4.0.2/LICENSE)
+- parse5: [homepage](https://github.com/inikulin/parse5) - [snapshot](https://github.com/inikulin/parse5/tree/v7.1.2/packages/parse5) - [license](https://github.com/inikulin/parse5/blob/v7.1.2/LICENSE) _(Only used in MV3 build)_
+- Dexie: [homepage](https://dexie.org/) - [snapshot](https://unpkg.com/dexie@3.2.4/dist/dexie.min.js) - [license](https://unpkg.com/dexie@3.2.4/LICENSE)
+- dexie-export-import: [homepage](https://www.npmjs.com/package/dexie-export-import) - [snapshot](https://unpkg.com/dexie-export-import@4.0.7/dist/dexie-export-import.js) - [license](https://unpkg.com/dexie-export-import@4.0.7/LICENSE)