Skip to content

ngntrgduc/Dictionary-Look-Up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dictionary-Look-Up

Extension to look up words painlessly.

Why this ?

I'm so tired when looking up some words:

  1. Open a new tab
  2. Type dictionary web page
  3. Hit Enter
  4. Type a word to look up
  5. Hit Enter

This extension will make the look up process less painful because you just need to toggle the extension and look up the word.

Features

  • Support dictionaries: Cambridge, Oxford, Merriam-Webster
  • Easily toggle extension via shortcut Alt + O (default)
  • Easily change dictionary via Tab and Shift + Tab key
  • Get previously looked up word when press arrow key
  • Search multiple words at once, separated by a comma (,)
  • Prevent searching for mistyped words that contain invalid characters, symbols, and numbers
  • Simple but yet powerful, time-saving

Installation

Extension available on Firefox Add-ons.

Local

  1. Clone this repository/download zip and extract to a folder on your local machine.
git clone https://github.com/ngntrgduc/Dictionary-Look-Up.git
  1. Load extension:
    • Chrome: Settings -> Extensions.

    • Edge: Extensions -> Manage Extensions.

      Then turn on Developer mode. Finally, click Load unpacked and select the chromium folder.

    • Firefox: Go to about:debugging, click Load Temporary Add-on..., then select manifest.json in the firefox folder.

Todo & Ideas

  • Add a ROADMAP.md and move this section to that file. (When the extension having sufficient users 🥲)
  • Another port
    • Chrome (because it costs $5 to create an account 🥲)
    • Edge
  • Make a GIF to demo how it works.
  • Options page
    • Custom 1st dictionary by changing order of URLs
    • Custom URLs to search not only for dictionary (general purpose, same as Vomnibar feature of Vimium, such as search video on Youtube,...)
    • Custom delimiter (default is ,) but exclude space character, also check that delimiter is a single symbol (not character because it will conflict with English words)
    • Add option (checkbox) to remove "Tab to switch dictionary" behavior, maybe some people prefer the default behavior: press Tab to move to dictionary selection, and select it by mouse or navigation through arrow keys. Also, if there are lots of URLs, selecting options by using mouse will be easier
    • Limit select options on popup (with hard limit is 10 options)? There's no need for many options to appear on the popup.
    • Option for Opening in background instead of foreground
  • Prevent searching when input too many characters. Opening too many tabs at once can cause lag on the user's device and potentially result in the IP being banned.
    • limit to 5 words? If it exceeds this limit, add a delay (but bad for UX), or prevent opening more than 5 words (or a specific number of words defined in the options page), or just skip extra words, only search for first 5 words

Done

  • Search multiple words at once, using separator (,) (user-defined) (keep the extension simple)
  • Change the behavior of the Tab key because clicking to change the dictionary seems weird when it's just switched to another but does not show the dictionary pane
  • Shift + Tab to move back dictionary
    • Change/Fix/Remove focus behavior, maybe using event.key instead
  • Fix autofocus on Firefox
  • Handle when no word is entered: won't work if nothing in the search box or just typing space, or when mistyping ,
  • Add max length to the input. Prevent the user from miscopying long paragraphs or sentences or looking up too many words.
  • Handle invalid input: prevent searching if Vietnamese characters (Happen when mistyping by using Telex method. For example: dictionary will become dictionảy.), strange characters, symbols, and numbers appear.

Abandoned

  • Auto read copied text when opening the extension, no more Ctrl + V -> The JS clipboard API has limited availability
  • For Cambridge dictionary, if an incorrect word is searched, it automatically redirects to the search page -> Too specific, and retype makes it more memorable
  • More limit of the previous word? -> Not optimal, use Ctrl + H instead
  • Auto convert Vietnamese characters (By using Telex typing method) to English -> Too specific, also it's hard to handle the Telex method
  • Search a word with all dictionaries via shortcut Alt + Enter -> Opening all dictionaries for a word is not necessary, and it become problematic when searching for multiple words
  • Remove duplicated words -> Not necessary

Contributing

If you found a bug or want to contribute, feel free to open a issue/pull requests. All contributions are welcomed.

Coffee

If you like this project and you want to support me, you can buy me a coffee ☕ (I turn coffee into code). Thank you very much 💖.