Force copy password into clipboard for @_ request from popup even if we can fill it
This commit is contained in:
parent
90e9862982
commit
76c7797ee2
|
@ -21,6 +21,8 @@ var username_filled = false
|
|||
|
||||
function _query_tabs_get_password(tabs)
|
||||
{
|
||||
var force_copy = false;
|
||||
|
||||
if (tabs.length <= 0) return;
|
||||
|
||||
var username = document.getElementById("gPassUsername").value;
|
||||
|
@ -32,6 +34,10 @@ function _query_tabs_get_password(tabs)
|
|||
document.getElementById("gPassMasterKey").value = "";
|
||||
|
||||
var do_submit = !mkey.startsWith("@_") && username_filled;
|
||||
|
||||
if (mkey.startsWith("@_"))
|
||||
force_copy = true;
|
||||
|
||||
if (mkey.startsWith("@@") || mkey.startsWith("@_"))
|
||||
mkey = mkey.substring(2);
|
||||
|
||||
|
@ -63,7 +69,7 @@ function _query_tabs_get_password(tabs)
|
|||
function(arg)
|
||||
{
|
||||
debug("Response to setPassword " + arg);
|
||||
if (arg == "")
|
||||
if (arg == "" || force_copy)
|
||||
{
|
||||
navigator.clipboard.writeText(response.password);
|
||||
notify("Password pasted into clipboard", "");
|
||||
|
|
Loading…
Reference in New Issue
Block a user