Skip to content

lain39/glossara

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

Glossara

Glossara is a browser extension that lets you seamlessly translate selected web text and PDF snippets using your own OpenAI-compatible API.

JavaScript Chrome Extension License

Preview


Why Glossara?

Glossara embraces a "less is more" philosophy, focusing entirely on providing an uninterrupted reading experience, especially for long-form PDFs:

  • Immersive Sidebar: All translations and interactions take place in a dedicated sidebar. It keeps the original content unblocked and clean, allowing you to focus entirely on your reading flow.
  • Native-like UI: The interface is minimal and designed to blend seamlessly with Chrome's native UI. With no intrusive visual elements, it feels just like a built-in browser feature.
  • Pure & Focused Workflow: No cluttered right-click menus or excessive options. Simply click the extension icon to toggle the sidebar. For deep reading, we believe this straightforward, click-and-go approach is the most efficient interaction.

What It Does

  • Select text on a web page and translate the selected part.
  • Open PDFs in Glossara's built-in PDF viewer for text selection, OCR capture, search, navigation, zoom, and PDF editing tools.
  • Use shortcuts for a smoother PDF workflow.
  • Capture an OCR region, mask unwanted parts, and send the recognized source text into the side panel.

Install

  1. Download the project source code from GitHub.
  2. Extract the downloaded archive.
  3. Open chrome://extensions/ in Chrome or another Chromium-based browser.
  4. Enable Developer mode.
  5. Click Load unpacked.
  6. Select the extracted glossara folder.

Basic Use

  1. Configure the API URL, API key, model, target language, and prompts in the extension options page.
  2. Open a web page or PDF.
  3. Click the Glossara extension icon.
  4. Select text, use OCR, or edit the source text in the side panel.
  5. Translate.

Clicking the extension icon again closes Glossara for the current tab. In PDF mode, closing Glossara returns to the original PDF file.

API Settings

Glossara supports streaming requests in these formats:

  • Responses API: /v1/responses
  • Chat Completions: /v1/chat/completions

Translation and OCR can use separate API settings, or OCR can reuse the translation API settings.

PDF Editing

The PDF viewer includes free text, highlight, ink, comment, eraser, undo/redo, and save-as-download support.

Saved PDFs are downloaded as edited copies. Browser permissions and download behavior may affect whether Chrome asks for a save location.

PDF Shortcuts

PDF shortcuts are enabled only in Glossara's PDF viewer. They are not enabled on normal web pages because single-letter shortcuts can conflict with page shortcuts, web app editors, and focused input fields. For normal web pages, browser-level translation tools are usually already available.

Default shortcuts:

Key Action
A Append while held; releasing A returns to replace mode.
S Start OCR selection; press again while selecting to run OCR.
Z Redraw OCR mask/selection.
X Lock or unlock the source buffer.
C Clear the source buffer.
V Translate.

PDF shortcuts can be disabled or changed in the extension options page.

The PDF viewer also supports these fixed shortcuts:

Shortcut Action
Ctrl / Cmd + F Open PDF search.
Enter Go to the next search result.
Shift + Enter Go to the previous search result.
Esc Close search; when there is no selected object in editing mode, return to selection mode.
Ctrl / Cmd + S Save the PDF.
Ctrl / Cmd + Z Undo PDF edits.
Ctrl / Cmd + Y Redo PDF edits.
Ctrl / Cmd + Shift + Z Redo PDF edits.

Undo, redo, and save shortcuts do not trigger inside inputs, font-size fields, comment boxes, or text editors.

Privacy

All API requests are sent directly from your browser to the API URL you configure. Glossara does not route requests through any third-party relay server. Your API key is stored only in local browser extension storage.

Glossara requests access to all URLs so it can read selected text on normal web pages and open PDFs in its built-in viewer. This permission is used for local browser-side interaction only; it does not change the direct-to-your-API request flow described above.

Acknowledgements

  • Glossara's PDF viewer is built on PDF.js.
  • Glossara is developed with assistance from Codex.

License

Apache License 2.0. See LICENSE.

About

Glossara is a browser extension that lets you seamlessly translate selected web text and PDF snippets using your own OpenAI-compatible API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors