Chrome extension
A side panel that rewrites the thing you are already writing. Gmail and LinkedIn composers can be read and replaced in place.
The extension is a thin client of POST /api/humanize.
It holds your API key and nothing else.
Install
The extension is built from this repo rather than the Chrome Web Store.
npm run extension:build
Then in chrome://extensions: turn on Developer mode, Load unpacked, choose
the extension/ directory.
Set up
Open the extension's Options and set two things:
- API base URL —
https://rewr.it, orhttp://localhost:3000against a dev server. - API key — an
hn_key from rewr.it/account.
Open the side panel from the toolbar icon.
Using it
- On any page: paste into the panel, pick a register, rewrite.
- In Gmail or LinkedIn: the content script can grab the composer's contents and write the result back.
The tell checker runs inside the extension, with no network call — the same client-side scoring the web app uses. Only a rewrite goes to the server.
CORS
An extension's origin is chrome-extension://<id>, and the id changes when you
load an unpacked build.
- Against loopback (
localhost,127.0.0.1,::1), anychrome-extension://origin is allowed. Nothing to configure for local dev. - Against production, the id must be listed in
HUMANIZER_EXTENSION_IDSon the server. There is no wildcard.
If rewrites work locally and 403 against production, this is why.