3
It would look like this: when copying anything using CONTROL+C, I need to put this content in a variable using Javascript. I didn’t find on the internet how to do this. Anyone help? Detail: It is by extension. It would be for me to record what’s in the clipboard into a variable so I can perform a process already done, in which it copies what’s on the page and sends by post, and after that I want to be able to take the content that I had saved in the variable and put back in the clipboard (so the extension does not influence this, because it may have problem if the user loses what was copied in the clipboard
Do you want to do this in response to a user’s "paste" action, or just do it? I’m not sure, but I think the browers would not allow this, for security reasons (imagine if any site opened on browser could read what’s in the clipboard and send it all to any server, how much private information could leak). Fountain
– mgibsonbr
I think I misinterpreted the question, the copying command occurred on itself browser right? I thought you copied it from somewhere and wanted to "auto-paste" the browser...
– mgibsonbr
Hi. This is for an extension. When copying anything anywhere, I wanted to store it in a variable before running the extension script. That would be to not lose what is copied by the user, because the extension works by copying and sent by post and in case what was copied before would be lost. I hope to understand now, otherwise I update the question
– Luciano Zancan
It is good to mention this kind of thing in the question, yes, since it influences the answers (in a normal page, as I said, it cannot for security reasons; in an extension, probably can, but I have no knowledge to say for certain).
– mgibsonbr
All right! I’m on my cell going to class now but half day I update the question
– Luciano Zancan
ready! I edited the question
– Luciano Zancan