Skip to content

Conversation

@Arohi-jd
Copy link

This PR adds a “Copy” button to all code snippets in the documentation (index.html), allowing users to copy code examples and commands with a single click.
The feature improves usability and reduces the chance of errors when copying commands manually.
All changes are contained within index.html, with inline CSS and JavaScript — no external files were modified.
Key Changes
Added a <style> block in the to style the copy button (positioning, hover effects, and success state).
Added a <script> block before the closing tag that:
Detects all

 blocks on page load.
Injects a copy button dynamically.
Uses navigator.clipboard.writeText() to copy text.
Provides success feedback with a checkmark icon.
This are the changes shown in image
Screenshot 2025-11-12 at 2 21 28 PM
Screenshot 2025-11-12 at 2 21 46 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant