A Chrome extension that translates selected text in a tooltip on the page, sending the whole sentence to the API as context. Written for reading English material without opening a translator in another tab every few paragraphs.
- Select a word or a phrase, click the button that appears, and the translation shows up in place
- The surrounding sentence goes to the API alongside the selection, so DeepL can tell apart meanings that depend on context instead of returning the first dictionary hit
- Settings panel for the interface language, the target language and the API key
- Esc or a click elsewhere closes the tooltip; a phrase translated once comes back instantly and without spending the API allowance again
It works on words and short phrases. Selecting a whole paragraph is not what it is for.
| file | role |
|---|---|
manifest.json |
Manifest V3, permissions limited to storage and the DeepL domains |
background.js |
service worker — the only thing that talks to the DeepL API |
content.js |
injected into the page: catches the selection, draws the tooltip |
content.css |
tooltip styles, isolated from the host page |
popup.html/js |
settings panel |
i18n.js |
Polish and English interface strings, shared by the files above |
icons/ |
extension icon in four sizes |
The API key is not in the code. The user types their own into the settings panel and the
extension keeps it in chrome.storage.
chrome://extensions→ turn on Developer mode- Load unpacked → point it at this directory
- Click the extension icon and paste in your DeepL API key
- Sign up for DeepL API Free at https://www.deepl.com/pro-api (free monthly character allowance, currently 500,000; the card is for verification only)
- In your account, open API keys and copy the key
- Paste it into the extension's settings, pick a target language, hit Save
Free keys end in :fx. The extension reads that suffix and picks the right endpoint by
itself, so there is nothing else to set up.
JavaScript · Chrome Manifest V3 · DeepL API
Rozszerzenie do Chrome, które tłumaczy zaznaczony tekst w dymku na stronie, wysyłając do API całe zdanie jako kontekst. Powstało do czytania angielskich materiałów bez otwierania tłumacza w osobnej karcie co kilka akapitów.
- Zaznaczasz słowo albo zwrot, klikasz przycisk, który się pojawia, i tłumaczenie wyświetla się w miejscu
- Razem z zaznaczeniem do API idzie całe zdanie, więc DeepL rozróżnia znaczenia zależne od kontekstu, zamiast zwracać pierwsze trafienie ze słownika
- Panel ustawień: język interfejsu, język docelowy i klucz API
- Esc albo kliknięcie obok zamyka dymek; raz przetłumaczony zwrot wraca natychmiast i bez ponownego zużycia limitu API
Działa na słowach i krótkich zwrotach. Nie jest do zaznaczania całych akapitów.
| plik | rola |
|---|---|
manifest.json |
Manifest V3, uprawnienia ograniczone do storage i domen DeepL |
background.js |
service worker — jedyne miejsce, które rozmawia z API DeepL |
content.js |
wstrzykiwany na stronę: łapie zaznaczenie, rysuje dymek |
content.css |
style dymka, odseparowane od stylów strony |
popup.html/js |
panel ustawień |
i18n.js |
polskie i angielskie teksty interfejsu, wspólne dla powyższych |
icons/ |
ikona rozszerzenia w czterech rozmiarach |
Klucz API nie siedzi w kodzie. Użytkownik wpisuje własny w panelu ustawień, a rozszerzenie
trzyma go w chrome.storage.
chrome://extensions→ włącz Tryb dewelopera- Załaduj rozpakowane → wskaż ten katalog
- Kliknij ikonę rozszerzenia i wklej swój klucz DeepL API
- Załóż konto DeepL API Free na https://www.deepl.com/pro-api (darmowy miesięczny limit znaków, obecnie 500 000; karta służy tylko do weryfikacji)
- W koncie otwórz API keys i skopiuj klucz
- Wklej go w ustawieniach rozszerzenia, wybierz język docelowy i naciśnij Zapisz
Darmowe klucze kończą się na :fx. Rozszerzenie rozpoznaje tę końcówkę i samo wybiera
właściwy adres API, więc nie ma nic więcej do ustawiania.
JavaScript · Chrome Manifest V3 · DeepL API
