rafjaf / BetterJustel

Improves Belgian eJustice Justel website
GNU General Public License v3.0
2 stars 0 forks source link

Manifest files - match URL patterns "cgi_loi" / "cgi_wet" - possibly misleading links on Justel website #3

Open loranger32 opened 1 month ago

loranger32 commented 1 month ago

Hi,

Thanks a lot for this great extension !

I have an issue that I think comes from the official Justel (new) website, but that could possibly be solved with an adaptation of the manifest files. I report it here in case this could be of any help.

All the pattern urls in the manifest files under "content_scripts.matches" assume the accessed link has the "cgi_loi" segment.

For an unknown reason, when accessing Justel from the home page of the FPS Justice https://justice.belgium.be/fr, the link to Justel on the following (French) page https://justice.belgium.be/fr/legislation_et_reglementation_belge has a link that includes "cgi_wet", that stays when clicking on "recherche" until the results page, where every link has the cgi_wet segment, causing the extension not being triggered (same behavior for the German pages). 

Not sure if it is a bug or a feature of the original website, but when inserting a link pattern such as "https://www.ejustice.just.fgov.be/cgi_wet/article.pl?language=fr*" in the manifest file, the extension fires up as expected when accessing an act from the search results page.

I'm not familiar enough with all the features and the architecture of the extension to judge if this trick could/should be applied to the other patterns, or even be applied at all, but at least it solved my issue.

Thanks for your time,

Laurent

loranger32 commented 1 month ago

I'm wondering if this in some way could be related with issue #2, where it looks like the issue there is that the link on the Justel website to choose the NL version of an act after going back to the original Justel from the extension (link "Original Justel") has the "cgi_loi" segment, where to me, it should be cgi_wet.

Working with the first query param language=fr* instead of cgi_loi in the manifest files is maybe an option, but again, I'm not familiar enough with the code, it's just my two cents.

Thanks again for this extension.

Laurent

rafjaf commented 1 month ago

Dear, thank you for your observations. I will try to look into it in the following weeks