giellatekno / neahttadigisanit

Saami dictionary webapp
Other
2 stars 2 forks source link

Reader doesn't work on YLE #17

Closed Phaqui closed 4 months ago

Phaqui commented 8 months ago

From email (finnish):

Huomasin kuitenkin, ettei Reader toimi YLEn Sápmi-sivuilla. Esimerkkeinä inarinsaamenkielinen uutinen: https://yle.fi/a/74-20067613?utm_medium=social&utm_source=copy-link-share
 ja pohjoissaamenkielinen uutinen: https://yle.fi/a/74-20067943?utm_medium=social&utm_source=copy-link-share
Kummassakaan en voinut käyttää Read with Nettidigisäänih-toimintoa. Onko YLE:lla jokin esto, ettei sitä voi käyttää yhtä aikaa vai onko Readerissa jokin, mikä sen estää.

Could not use Reader in any of those sites. The question asked is if this is a Reader-bug, or something related to YLE's pages.

Phaqui commented 8 months ago

As explained per email, this happens because of a web security feature, called CSP. It prevents websites from running code from other domains, unless explicitly specified to do so. This means that for us, we have to create a different solution, which in practice probably means writing a browser plugin, with all the challenges that entails.

Phaqui commented 8 months ago

https://github.com/giellatekno/neahttadigisanit/commit/742224ba2267fd342ce77599d0dd6534d8697974 adds a notice to the reader page that it may not work on some sites.

The message has not been localized.

Trondtr commented 7 months ago

It now seems Reader does not work at all. These pages have always worked https://incubator.wikimedia.org/wiki/Wp/fit/Pello,_Matarenki https://se.wikipedia.org/wiki/Port%C3%A1la:Ovdasiidu

I know some web pages are overcareful and block us, but Wikipedia?

Phaqui commented 7 months ago

Wikipedia doesn't block reader in the same way that YLE does, so it should work.

After some digging, I found something that made it crash. Commit 3edd1d040fc8c1114a2770d613a391e8d35f5177 should fix it. Can you confirm? Only sanit and sanat has been updated.

Phaqui commented 7 months ago

Added "wontfix" label, because we cannot make any changes in the code that will make reader work on YLE, because they block external scripts, as already noted.