kairi003 / Get-cookies.txt-LOCALLY

Get cookies.txt, NEVER send information outside.
MIT License
320 stars 30 forks source link

Add clipboard access permission for firefox #33

Closed SayanthD closed 1 year ago

SayanthD commented 1 year ago
kairi003 commented 1 year ago

Thanks for your PR! However, it appears that calls to the clipboard API by user actions do not require special permissions. ref: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard#using_execcommand

We should avoid requiring more permissions than necessary, so I am wondering if this addition is needed.

SayanthD commented 1 year ago

Without this permission, I got this error Uncaught (in promise) DOMException: Clipboard write was blocked due to lack of user activation.

kairi003 commented 1 year ago

Could you please tell me about the environment and the operation in which that error occurs? The copy button works fine in my environment. (Of course, navidator.clipboard.writeText doesn't work in the console because it is not a user action.)

SayanthD commented 1 year ago

Sorry, this was a mistake from my end. I tried this again by switching to a new Firefox profile with default config and can confirm that the 'copy' button is working. I must have messed up something in my default one. I will figure it out. Closing this PR now