lute-v3 icon indicating copy to clipboard operation
lute-v3 copied to clipboard

Some dictionaries are unusable

Open Mycheze opened this issue 10 months ago • 3 comments

Description

This isn't strictly a bug with Lute, but the way that it uses online dictionaries. Some dictionaries (like the only good one I've found for Czech) requires you to accept cookies when loading the site. And since Lute always makes a "new request" (or something), there's a giant cookies popup on EVERY SINGLE LOOKUP.

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Use a dictionary with this kind of popup (like this: https://slovniky.lingea.cz/Anglicko-cesky/###)
  2. Look up any word

Screenshots

Image

Extra software info, if not already included in the Description:

  • OS (e.g., iOS, windows): Linux
  • Browser (e.g., chrome, safari): Chromium
  • How you've installed Lute (Docker, python, source: pip
  • Version: 3.9.4

Another tip: it'd be nice if in the "about Lute" page, there was a simple copy/paste which could fill out this bottom section with OS browser install method and version.

Mycheze avatar Jan 30 '25 15:01 Mycheze

Thanks. Right, since the page is opened anew on each term lookup, it's a full reload ... this one will be tough to handle well.

Cookies and iframes have some security issues or notes: https://intercom.help/progressier/en/articles/6894845-why-aren-t-cookies-working-inside-an-iframe

I don't know offhand if there's a way to force the iframe to use the cookies. A possible workaround would be to have lute update the call via javascript, but that's a completely new method of handling dictionary lookups and would need a investigation (and a bunch of work to implement).

jzohrab avatar Jan 30 '25 18:01 jzohrab

Install uBlock Origin and add this to your filters:

slovniky.lingea.cz###cookiescript_injected_wrapper
slovniky.lingea.cz##.navbar-inverse.navbar
slovniky.lingea.cz##.menu
slovniky.lingea.cz##.nphi.colr-xs-2.col-sm-3.col-md-3
slovniky.lingea.cz##.f2

After you do this, your dictionary will look like this every time:

Image

For other dictionaries: Right click on your dictionary, click on "uBlock Origin", then click on "Block element in frame..." and block everything that bothers you. This is useful not only for popups but also for blocking everything unnecessary in the dictionary.

imamcr avatar Feb 28 '25 08:02 imamcr

Thanks @imamcr for the note! :wave:

jzohrab avatar May 27 '25 19:05 jzohrab