miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.97k stars 728 forks source link

feat: add license info to js, for LibreJS compatibility #2793

Closed piperswe closed 3 months ago

piperswe commented 3 months ago

LibreJS is a browser extension developed by GNU which ensures only Free (libre) JavaScript is run. To determine whether given JavaScript is Free, LibreJS consults metadata included in the JavaScript file. Since Miniflux is Free Software, getting its JavaScript to work when LibreJS is installed is just a matter of adding license metadata to the returned JavaScript source.

Do you follow the guidelines?

piperswe commented 3 months ago

It would be more appropriate to implement this feature in the minifier that run at startup time.

I would agree, but showJavascript injects OFFLINE_URL before the minified JavaScript so it wouldn't be under the license header (and therefore would be stripped by LibreJS).

https://github.com/miniflux/v2/blob/d94b2f6a9e9318805c104e4dc7b17dd3304d3d1b/internal/ui/static_javascript.go#L33-L36

fguillot commented 3 months ago

I would agree, but showJavascript injects OFFLINE_URL before the minified JavaScript so it wouldn't be under the license header (and therefore would be stripped by LibreJS).

Good catch