Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
the numbering [SemVer](https://semver.org/).

## [1.5.0] — 2026-10-16

### Added

- **Optional translation of the whole book.** A **Translate** control in the
panel, above the formats — Off by default — takes one of thirteen target
languages and translates the book between reading it and writing the file, so
EPUB, MOBI, FB2 and TXT all get it. Chapters go out block by block with their
inline markup (italics, bold, line breaks), and what comes back is sanitised
again, so the writers still get well-formed XHTML; chapter titles, notes, the
title and the summary are translated too, the author, tags and fandom are not,
and the book's language becomes the target. A book already in that language is
recognised from the first chapter (by the language Google reports, not by the
site's label) and then left alone. Only chapter bodies vote, not notes or
titles. A chapter the engine keeps refusing stays in the original language
instead of failing the build, and the panel reports how many stayed that way. The choice is remembered in `chrome.storage.sync` as `translateTo`.

The engine is Google Translate's unofficial web endpoint behind a small
`Translator` interface (`src/translate/`), so another one is a single file.
Requests are batched under a character budget, spaced out, retried with backoff
on 429/5xx (honouring `Retry-After`) and stop on cancel; the stray space the
engine leaves before punctuation after a closing tag is removed. No new
permission and no new dependency.

**This is the first thing the extension sends anywhere**, which is why it is
opt-in: with translation on, chapter text goes to `translate.googleapis.com`.
The panel says so under the control, and the README's privacy section is updated.
With translation on, a site's own ready-made file (AO3's) is bypassed — it could
not be translated.

## [1.4.0] — 2026-10-16

### Changed
Expand Down Expand Up @@ -166,6 +196,7 @@ In full under "Honest limitations" in the README.
the known structure and was not exercised live.
- Images do not make it into the book — text only.

[1.5.0]: https://github.com/pruffit/VireBook/releases/tag/v1.5.0
[1.4.0]: https://github.com/pruffit/VireBook/releases/tag/v1.4.0
[1.3.0]: https://github.com/pruffit/VireBook/releases/tag/v1.3.0
[1.2.0]: https://github.com/pruffit/VireBook/releases/tag/v1.2.0
Expand Down
47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DOM, not a CSS shadow. The pane can be thrown into any corner of the window.
|---|---|
| **Formats** | EPUB · MOBI · FB2 · TXT |
| **Sites** | ficbook.net · AO3 · fanfics.me · fanfiction.net · wattpad.com · royalroad.com · [any other](#which-sites) |
| **Sends outwards** | nothing — no `<all_urls>`, no screenshots, no network calls |
| **Sends outwards** | nothing by default — no `<all_urls>`, no screenshots. Only if you turn on [translation](#translating-a-book), chapter text goes to Google Translate |
| **Licence** | [MIT](LICENSE) |

## Installing
Expand Down Expand Up @@ -60,6 +60,28 @@ toolbar and choose **Show the button on this page**.

The same popup is where the default format is set — it moves to the top of the list.

## Translating a book

Reading a book that is not in your language? In the panel, **Translate** (above the
formats) takes a target language — Русский, English, Українська, Deutsch, Français,
Español, Italiano, Português, Polski, Türkçe, 日本語, 中文, 한국어. It is **Off** by
default, and the choice is remembered.

With a language picked, the book is read as usual and then translated before the
file is written, so EPUB, MOBI, FB2 and TXT all get it: chapter text (paragraphs,
italics and bold intact), chapter titles, author's notes, the book's title and its
summary. The author, tags and fandom stay as they are, and the file's language is
set to the target. The first chapter is translated first, and if Google reports
that the chapter text was already in the target language, the rest is not sent and
the book is downloaded as it is. If Google keeps refusing some chapters, those stay
in the original language, the rest is translated, and the panel says how many.

**This is the one thing that leaves the machine.** The chapter text is sent to
Google Translate's public web endpoint, in batches, spaced out; nothing is sent
unless translation is on. The panel says so under the control. With
translation on, a site's own ready-made file (AO3's) is not used, since it cannot
be translated.

## Getting the file onto a Kindle 11

**EPUB is the main route.** Amazon converts it itself, and the table of contents
Expand Down Expand Up @@ -115,6 +137,12 @@ Worth knowing before you rely on it:
browser: requests carry the reader's own cookies, that is, exactly what is
already on their screen.

- **Translation is machine translation, over an unofficial endpoint.** It reads
like Google Translate reads, and the endpoint has no key and no promise: Google
can slow it down or turn it off, in which case the panel says it was refused —
set Translate to Off to download the book as before. A long book takes a minute
or two longer.

## If something breaks

Sites get restyled — that is normal and is fixed one file at a time.
Expand Down Expand Up @@ -290,6 +318,8 @@ src/lib/ — formats and utilities
epub.ts mobi.ts — assembling the book
fb2.ts txt.ts
util.ts — pacing, backoff, filenames
src/translate/ — optional translation: the engine interface, the Google engine,
batching, and translating a whole Book
src/adapters/ — one file per site, plus base.ts, generic.ts and the registry
src/glass.ts — the material: vireglass/dom's renderer, ported into a shadow tree
src/core.ts — choosing an adapter, fetching chapters, saving the file
Expand All @@ -313,12 +343,15 @@ Version history is in [CHANGELOG.md](CHANGELOG.md).
## Privacy

The extension reads exactly the pages that are already open in the browser and
**sends nothing anywhere**: neither the assembly nor the file leaves the machine.
There are no outbound network calls at all — verifiable by searching for `fetch`
and `XMLHttpRequest`. Downloading is for personal reading.

Permissions are the minimum: `storage` (the default format and the corner the
pane sits in), `activeTab` and `scripting` (the "show the button on this page"
**sends nothing anywhere by default**: neither the assembly nor the file leaves the
machine, and the only requests are to the book's own site. The exception is
translation, which is off until you turn it on: then the chapter text (and the
title and summary) goes to `translate.googleapis.com`, and nowhere else. Every
request is in `src/core.ts`, `src/translate/google.ts` and the adapters —
verifiable by searching for `fetch`. Downloading is for personal reading.

Permissions are the minimum: `storage` (the default format, the translation
language and the corner the pane sits in), `activeTab` and `scripting` (the "show the button on this page"
action). No `<all_urls>`, no screenshots — the glass makes do with the live DOM.

## Licence
Expand Down
Loading
Loading