Online Dictionary Helper (with Anki support)
Online Dictionary Helper is a Chrome/Firefox extension to show definitions for words and phrases from online (or builtin) dictionary via users' selection on any webpage and PDF documents (using pdf.js), which also supports flash-card creation using Anki (with AnkiConnect, an Anki add-on, installed).
Details on the reasons for making this extension can be found in the background introduction if you are interested.
What might set this extension apart is that users can grab online dictionary content with their own customized script (running under extension development mode). For development details, please check the development guide.
How to use
- Install the extension first from Chrome Web Store or Firefox Add-ons, then configure and activate the extension on your demands in the options page.
- Open any webpage, move your mouse cursor over the word that you want to select and translate, drag and select/double-click/press Hotkey (defined in options page) to select the word or phrase.
- If the word or phrase is a clickable link, use the predefined Hotkey or hold the Alt key while selecting to translate.
- A popup window will show up above the selection displaying the word definition.
- (Optional) While Anki and AnkiConnect are installed and running, go to the
Services Optionstab in the options page to setup the Anki deck, type, and field names to put your expression, sentence, reading, definition, etc.
- (Optional) Press the green (+) button on the top right corner of each definition in the popup window to add the word or phrase to Anki as a note.
The Options Page
The options of this extension are divided into three sections.
- Enabled: Turn the extension on/off.
- AutoSel.Hotkey: Configure the Hotkey to select words or phrases. Four options are available: Off(Disable the hotkey), Shift, Ctrl, and Alt key.
- Max.Context: Set the maximum number of sentences extracted from the context of the webpage.
- Max.Example: Set the maximum number of example sentences from the dictionary (requires support of the dictionary script).
AnkiConnect Options: Setup Anki deck/type name, and which note fields you are going to put expression, sentence, reading, definition, etc.
- Dictionary Script: Input your own script name here, and click Load Script button to load it.
- Selected Dictionary: Choose the dictionary (bultin or loaded) for the definitions on your preference.
The source code of this extension on Github does not contain offline dictionary and English word deformation table data. You can go to the Chrome Web Store to download, or use a Chrome extension downloader to download the plugin's crx file and extract the dictionary JSON file.
Use existing script or develop by yourself
- You can use existing dictionary scripts in the dictionaries list.
- Or develop the script by yourself based on development guide.
- Or open an issue in this repo if you really need help.
Pull requests are welcome if you want to enhance this extension, or submit your own dictionary script in the next release.