https://github.com/agregoreweb/extension-agregore-renderer
A generalized Markdown/Gemini/ETC content renderer for Agregore. Replaces the old Markdown/Gemini renderers
https://github.com/agregoreweb/extension-agregore-renderer
Last synced: 11 months ago
JSON representation
A generalized Markdown/Gemini/ETC content renderer for Agregore. Replaces the old Markdown/Gemini renderers
- Host: GitHub
- URL: https://github.com/agregoreweb/extension-agregore-renderer
- Owner: AgregoreWeb
- License: agpl-3.0
- Created: 2022-06-01T21:41:26.000Z (about 4 years ago)
- Default Branch: default
- Last Pushed: 2024-03-14T17:31:16.000Z (about 2 years ago)
- Last Synced: 2024-05-01T21:22:11.225Z (about 2 years ago)
- Language: JavaScript
- Size: 2.2 MB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# extension-agregore-renderer
A generalized Markdown/Gemini/JSON content renderer for Agregore. Replaces the old Markdown/Gemini renderers
## How it works:
There's three "renderers" in separate bundles for markdown/json/gemini.
There is a background page that listens for when a page finishes loading.
Upon this happening, the background page will inject a script which checks the `document.contentType`.
If the content type is one of the ones we wish to render (e.g. `application/json`), the appropriate bundle will get injected.
The source code for renderers is in `gemini.js`, `json.js`, and `markdown.js`.
These get compiled using Browserify into single files called `bundle-gemini.js`, `bundle-json.js`, and `bundle-markdown.js` respectively.
If there are more file formats that we should render to HTML, feel free to open a GitHub issue to discuss.