lute-v3
lute-v3 copied to clipboard
Some dictionaries are unusable
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.:
- Use a dictionary with this kind of popup (like this: https://slovniky.lingea.cz/Anglicko-cesky/###)
- Look up any word
Screenshots
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.
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).
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:
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.
Thanks @imamcr for the note! :wave: