* Redirect /:id to canonical URL for post.
This implements redirection of `/:id` (a short-form URL to a post) to
the post's canonical URL. Libreddit issues a `HEAD /:id` to Reddit to get
the canonical URL, and on success will send an HTTP 302 to a client with
the canonical URL set in as the value of the `Location:` header.
This also implements support for short IDs for non-ASCII posts, c/o
spikecodes.
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
Implements HTTP compression, between both Reddit and Libreddit and Libreddit
and a web browser. Compression between Reddit and Libreddit is mandatory,
whereas compression between Libreddit and a client is opt-in (client must
specify a compressor in the Accept-Encoding header).
Supported compressors are gzip and brotli. gzip support is ubiquitous,
whereas brotli is supported by almost all modern browsers except Safari
(iOS, iPhone, macOS), although Safari may support brotli in the future.
Co-authored-by: Matthew E <matt@matthew.science>
* Use singular form of "comment" for posts with 1 comment
* Fix incorrect text on comment count tooltip
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Update README.md
Removed the following instances for dead links:
* libreddit.sugoma.tk
* libreddit.jamiethalacker.dev
* libreddit.database.red
* reddit.phii.me
* libreddit.autarkic.org
* lr.oversold.host
* libreddit.datatunnel.xyz
* libreddit.crewz.me
* Fix double pipe on flux.industries instance
Co-authored-by: Mohammed Anas <triallax@tutanota.com>
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
Co-authored-by: Mohammed Anas <triallax@tutanota.com>
Adds another on/off preference (default: on, keeps same
behaviour) for the fixed navbar.
When off the navbar will not remain at the top of the
page when scrolling.
This is useful for small displays such as phones where
otherwise the navbar takes up a sizeable portion of
the viewport.