Skip to content

JasperYep/mote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mote

Select text. A purple mote appears. Hover it. Streamed Chinese translation via any OpenAI-compatible API.

Install (Firefox)

Release .xpi is unsigned. Regular Firefox blocks permanent install of unsigned extensions (not verified / could not be verified for use in Firefox). Use one of the paths below.

A. Temporary load (recommended for daily use of this repo)

Works on regular Firefox. Survives page reloads; removed when Firefox restarts.

  1. Clone this repo
  2. Open about:debugging#/runtime/this-firefox
  3. Load Temporary Add-on…
  4. Select manifest.json

B. Persistent install on Developer Edition / Nightly

  1. Install Firefox Developer Edition or Nightly
  2. about:config → set xpinstall.signatures.required to false
  3. Download mote-*.xpi from Releases
  4. about:addons → gear → Install Add-on From File…

C. Signed permanent install (AMO)

Needs Mozilla Add-on signing. Not automated in this repo yet.

# requires AMO API credentials
npx web-ext sign \
  --api-key "$AMO_JWT_ISSUER" \
  --api-secret "$AMO_JWT_SECRET" \
  --channel unlisted

Then install the signed .xpi on regular Firefox.

Configure

about:addonsmotePreferences

Field Example
Base URL https://api.openai.com/v1
API Key sk-…
Model gpt-4o-mini

Use

  1. Select text on any page → purple mote near the selection
  2. Hover the mote → bubble expands, translation streams in
  3. Select / copy the translation freely
  4. Click elsewhere or press Esc to dismiss

API

POST {baseUrl}/chat/completions
Authorization: Bearer {apiKey}
stream: true

Trailing / on baseUrl is stripped. If the path does not end with /vN, /v1 is appended.

License

MIT

About

Select text → purple mote → stream Chinese translation via any OpenAI-compatible API (Firefox)

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors