Replies: 1 comment
|
Markdown Reader for Firefox has been updated to version 2.17.0. If you encounter any issues, please feel free to let me know! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi @Heroor, thank you for this great extension!
I have noticed a layout "jump" (flash of unstyled content) when opening markdown files. The raw markdown text is briefly visible before the extension replaces it with the rendered HTML.
Root cause
The
content_scriptsinmanifest.jsondoes not specifyrun_at, so it defaults todocument_idle. This means:<pre>markdown textProposed fix
Add early CSS injection to hide raw content until rendering is complete. Two options:
Option A: Add
run_at: document_start+ early CSSIn
manifest.json, add a separate content script that runs atdocument_startand injects CSS to hide raw<pre>content:manifest.json — add to content_scripts array:
{ "css": ["css/hide-raw.css"], "matches": ["*://*/*.md", "file://*/*.md"], "run_at": "document_start" }css/hide-raw.css:
Option B: Simpler — just set
run_at: document_startChange the existing
content_scriptsentry to run atdocument_startso the rendering happens before the browser paints the raw text:With
document_start, the script runs before any DOM is painted, so the raw markdown never appears visually.Environment
Would you consider implementing one of these options? Happy to test a pre-release build.
Thanks!
All reactions