-
Notifications
You must be signed in to change notification settings - Fork 60
Clear credentials from clipboard after 60 seconds #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
max-baz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Here are some comments to make the code simpler 🙂
98f6459 to
f1e0f1b
Compare
|
Thanks for the detailed review! I have now addressed all the comments. |
|
For the record: https://bugzilla.mozilla.org/show_bug.cgi?id=1364708#c2 is the only code snippet that I found that works. |
max-baz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the simplicity of the patch, will test tomorrow, but apart from minor details looks good to me!
|
Related to the permissions discussion above - can the |
|
I'm not sure that's a good idea to add optional permissions at this point, it adds a bit of complexity, potential browser issues, and inconsistency with other permissions that are not optional... How about we keep them required and instead add an upgrade notification "New permissions added to clear copied credentials after 60 seconds"? We already have a framework for that in |
|
Would this work though? I think that the extension would be disabled before the notification can be shown. But of course this would at least explain why after the fact better than the permission dialog by itself. |
|
It will be disabled for those who install extension via webstore, but as soon as people re-enable it they will instantly understand why we suddenly requested more permissions — sounds acceptable to me, a good compromise between simplicity and usability, let's ask what @erayd thinks 🙂 |
The clipboard is cleared 60 seconds after a username or password is copied, if the content of the clipboard is still equal to the copied string.
|
@FabianHenneke If you aren't able to get optional permissions to behave in Firefox, then let's leave things as-is, with the permission mandatory. Firefox is annoying enough already with its sporadic poor / incomplete API implementations, and this is probably just another such area. |
max-baz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The clipboard is cleared 60 seconds after a username or password is copied, if the content of the clipboard is still equal to the copied string.
My implementation for #140. This works well on Chrome, but Firefox somehow hangs on the following line indefinitely:
I don't have any experience with Firefox extensions, do you know why this may happen?
Fixes #140