Skip to content

divvun/divvun-gramcheck-webextension

Repository files navigation

Divvun Grammar Checker Webextension

A proof-of-concept Google Chrome webextension that works with standard <textarea> HTML elements and uses the Divvun API to detect errors.

Setup

  1. Checkout this repo
  2. Install dependencies with npm install
  3. Build the extension with npm run build. This will generate a dist folder
  4. Open Google Chrome and follow these instructions to enable an unpacked extension, navigating to the newly-generated dist folder
  5. Navigate to one of the below testing websites and enter some text. Your grammar will be checked as you type, and errors will appear underlined in red. Clicking an underlined word will show you suggestions to help improve your writing.

Rust-wasm

This repo also shows it is possible to integrate Rust-based web assembly (rust-wasm) for high-performance upgrades in the future. For now, this integration works by implementing an add() function in Rust, which is compiled to wasm and called by the web extension to add two numbers. To see its output, navigate to one of the test sites (aside from github, which doesn't allow wasm), and open Chrome's browser console. There you will see the output of the add() function.

In the future, Rust-wasm can be used to optimize the grammar checker as required.

Test sites

Sites that can be used to test:

Sites known to cause problems:

TODO

  • Implement message passing for wasm calls on sites that don't allow wasm such as github.com (see this)
  • Implement support for input and other non-textarea input boxes.

About

Take two of a Divvun grammar checker browser extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •