Skip to content

Commit f8a6679

Browse files
committed
Improve logic to fill OTPT codes
1 parent 2a93fb4 commit f8a6679

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

application/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release
22
#
33
# pip3 install --user twine
4+
# Configure pypi API token in ~/.pypirc file.
5+
# https://pypi.org/help/#apitoken
46
# Update the version string below.
57
# Build package with `python3 setup.py sdist`
68
# Upload package with `twine upload dist/*`

extension/content.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ function writeValueWithEvents(input, value) {
5252
function fillTOTP(code) {
5353

5454
// Most services that require MFA have a form with a single numeric input.
55-
var input = document.querySelector("input[type=text],input[inputmode=numeric]")
55+
var numericInputs = document.querySelectorAll("input[inputmode=numeric]")
5656

57-
if(input) {
57+
for(var i = 0; i < numericInputs.length; i++) {
58+
var input = numericInputs[i];
5859
writeValueWithEvents(input, code);
5960
}
6061
}

0 commit comments

Comments
 (0)