Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ctrl+C/Command+C for copying the current URL to clipboard #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luser
Copy link

@luser luser commented Nov 15, 2023

First of all, thanks for creating this project! I use it regularly for browsing through image subreddits to find things to share with friends. That usually involves me pressing 'i' to open the image in a new tab, then copying the image URL (which now involves using the context menu for Reddit) so I can paste it into a Discord channel. I wanted something simpler so I added support for handling Ctrl+C / Command+C to copy the current URL to the clipboard.

I was not sufficiently motivated to check the browser platform so as to handle the correct keyboard shortcut per platform. That wouldn't be much additional work, though.

An alternate approach would be to handle the copy event and set the clipboard data there. I'm not sure there'd be much functional difference, except that the browser would handle the keyboard shortcuts for us.

@luser
Copy link
Author

luser commented Nov 15, 2023

Neat, I tried out the Netlify preview and was able to verify that it works there!

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