Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.59 KB

File metadata and controls

59 lines (44 loc) · 1.59 KB

Visibabel extension

Chrome extension to capture images, send them to a local Ollama (GLM-OCR) endpoint, and return translated text.

Source of truth

  • TypeScript files in src/**/*.ts are the canonical source.
  • JavaScript files under dist/ are runtime artifacts emitted by npm run build:extension.
  • Re-run npm run build:extension after TypeScript changes before loading the unpacked extension.

API reference

Features

  • Capture visible tab screenshot
  • Select region on page
  • Right-click image to OCR/translate
  • Configurable endpoint, prompt, and settings
  • All processing local (no cloud)

Setup

  1. Install Ollama and pull the model:
    ollama pull glm-ocr:latest
  2. Start Ollama (see ../ollama/README.md).
  3. Install dependencies and build:
    cd extension
    npm install
    npm run build:extension
  4. Load this extension unpacked in Chrome from the extension/ folder.
  5. Set endpoint URL in options (default: http://localhost:11434/).
  6. Optionally start the GLM-OCR layout service (see ../glm-ocr/README.md).

Development commands

npm run build:extension
npm run verify:emit-sync
npm run verify:browser-esm-imports
npm run test:unit
npm run test:e2e:runtime

From repository root:

npm --prefix ./extension run test:unit

Troubleshooting

  • If the extension cannot connect, ensure Ollama is running at the configured URL.
  • Check the options page for diagnostics and logs.