zaidka / cliget

A Firefox addon to download login-protected files from the command line
https://addons.mozilla.org/en-US/firefox/addon/cliget/
Mozilla Public License 2.0
357 stars 57 forks source link

REQUEST: automatically copy url to clipboard #79

Open badbob001 opened 2 years ago

badbob001 commented 2 years ago

I'm trying to figure out how to have the download url automatically get copied to the clipboard with each request, but can't figure it out.

I can do it based on user click action in popup.js by adding 'navigator.clipboard.writeText(req.url);' after showCommand(req.id);

I'm guessing if I want this to happen automatically is to make a change in background.js, but I'm not quite sure where. I tried adding navigator.clipboard.writeText(???) in several functions but it doesn't work.

Sorry, but I'm not a javscript developer.