gopasspw / gopassbridge

A web extension for Firefox and Chrome to insert login credentials from gopass
MIT License
264 stars 24 forks source link

Allow dragging entry values into page input fields (without copying to clipboard) #216

Open glowinthedark opened 2 years ago

glowinthedark commented 2 years ago

A POC allowing dragging items from the entry into input fields on the page. Only tested on Chrome, possibly further adjustments might be needed for firefox.

Please provide your comments as to what can be improved.

glowinthedark commented 2 years ago

@martinhoefling: the changes in search.js are in fact addressing another issue — the domain name is not getting pre-filled in either chrome or firefox.

Do you think it would be better to revert those changes so that the issue can be solved in its own separate thread? The approach I followed might not be the best, and in fact causes a possibly annoying artifact — after manually clearing the input field the domain gets pre-filled again because I added a call to _onSearchInputEvent(); inside initSearch(). Please advise.

Another issue I was trying to figure out is how to get the actual password and include a draggable password field displayed as ******** into the details view div. Imo, it would be nice to be able to drag the password too without copying it to clipboard — this way it's a bit more secure. But not clear how to do it since I have zero experience with chrome extensions api and native hosts.