ubershmekel / redditp

Convert any reddit page to a presentation or slide show
https://redditp.com
MIT License
264 stars 103 forks source link

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

Open luser opened 1 year ago

luser commented 1 year ago

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 commented 1 year ago

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