feat: add code block copy button and popup markdown previewer with history#298
Open
harshvadhiya wants to merge 1 commit into
Open
feat: add code block copy button and popup markdown previewer with history#298harshvadhiya wants to merge 1 commit into
harshvadhiya wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Code Block Copy Button & Popup Preview/History Features
Summary
This Pull Request introduces enhancements to improve the markdown rendering experience and add utility directly in the extension popup. It implements a copy button for rendered code blocks and adds a markdown editor tab inside the popup along with a preview history manager.
Changes
1. Code Block Copy Button
navigator.clipboard.writeTextwith immediate visual feedback (displays checkmark ✔ for 2 seconds).2. Popup Markdown Preview Tab
textarea) and a Clear button to wipe input.3. Preview History Tab
4. Compatibility & Performance Fixes
"activeTab"permission to manifests to let the extension read active URLs for tab updates safely.sender.tabis undefined.Files Modified / Created
manifest.json,manifest.chrome.json,manifest.firefox.json- AddedactiveTabpermission.content/index.css- Styled copy buttons, layouts, and theme support.content/index.js- Added copy button logic on rendering.content/prism.js/content/mathjax.js- Dynamic script loading logic for internal extension pages.content/preview.html/content/preview.js- [NEW] Setup the rendering template for preview pages.popup/index.css- Formatted popup tabs, textarea grid, preview buttons, and history list.popup/index.js- Added history/editing trackers, reopen tabs checks, inline editor renders, and storage binds.background/messages.js- Guarded message handling routes.Sample Images