Change order of tasks in qute-bitwarden userscript

First enter insert-mode and then start checking for TOTP. Smoother
expirience that way.
This commit is contained in:
slow typer 2020-03-02 19:51:45 +02:00
parent 07026a1d9d
commit d4fb1ffd2f
1 changed files with 3 additions and 3 deletions

View File

@ -266,6 +266,9 @@ def main(arguments):
qute_command('fake-key <Tab>')
fake_key_raw(password)
if arguments.insert_mode:
qute_command('enter-mode insert')
# If it finds a TOTP code, it copies it to the clipboard,
# which is the same behaviour as the Firefox add-on.
if (selection['login']['totp'] is not None) and arguments.totp:
@ -280,9 +283,6 @@ def main(arguments):
)
)
if arguments.insert_mode:
qute_command('enter-mode insert')
return ExitCodes.SUCCESS