Hacker News new | past | comments | ask | show | jobs | submit login

How does the website put the command in your clipboard? I thought js does not have the ability to modify your clipboard?




Absolute madness.

Whoever thought this was a good idea.


There's a bunch of javascript webapps that won't let you even select text on screen, meaning this is the only way to get it into your clipboard. I had to use developer tools for years before firefox supported the clipboard API.


A machine that cannot be abused is unlikely to be useful for anything else. In this case, almost every time I work with LLMs I need to use the clipboard to transfer data.


There is already a well known way of using your clipboard (C-c, C-v), what is so special about LLMs that makes this unusable?


That involves at least three steps - select the element in question, highlight all the text (which may not always be as simple as pressing Ctrl-A), then press Ctrl-V.

A click to copy button is one convenient step.

LLMs are no more special than sites like GitHub and many others, which all provide this feature.


There are ways to do this which do not involve giving any random website full reign over your clipboard.


Well there are some applications where it makes sense, e.g. code blocks thst you want to copy when users click on the copy button.

Whether that is worth it is another question.


How would you do a click to copy button then?


I'm sorry for the snarky response, but:

You don't.

If your app needs to do that, you instruct the user to select the text, and press C-c. We should not allow crap like this because they are too dumb to understand these instructions, or because your app is so special it just needs to do this on a click.


I'm not against that. Maybe a safe browswer mode (incognito) where this is disabled. Devs can polyfill to a popup that says (pleasue use ctrl c or right click copy.)


Who's "we"? I'm a software developer and I use click to copy buttons on websites all the time. Sites like GitHub, ChatGpt, and many more all have them, because they're useful. They're not "special", quite the opposite - this is a ubiquitous and useful feature.

It certainly could make sense to have a security setting that allows this capability to be controlled, in the same sort of way as allowing sites to access your geographic location. But simply saying "we should not allow" it is unrealistic and, frankly, pretty silly.


With explicit authorization for the site or even the specific script to be able to write on your clipboard.


Copy to clipboard buttons are ubiquitous in modern webapps. GitHub, AI models UIs like ChatGPT's, or any other site that displays code all have them.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: