Skip to content

Commit 2a64b2a

Browse files
committed
Add TOTP special handling for zoom.us
1 parent 5647262 commit 2a64b2a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

extension/content.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,20 @@ function writeValueWithEvents(input, value) {
5151
// Fill MFA TOTP code
5252
function fillTOTP(code) {
5353

54-
// Most services that require MFA have a form with a single numeric input.
55-
var numericInputs = document.querySelectorAll("input[inputmode=numeric]")
54+
if(document.baseURI.includes("zoom.us")) {
55+
var zoomInput = document.querySelector("[class=form-masked-pin]");
5656

57-
for(var i = 0; i < numericInputs.length; i++) {
58-
var input = numericInputs[i];
59-
writeValueWithEvents(input, code);
57+
if(zoomInput) {
58+
writeValueWithEvents(zoomInput, code);
59+
}
60+
} else {
61+
// Most services that require MFA have a form with a single numeric input.
62+
var numericInputs = document.querySelectorAll("input[inputmode=numeric]")
63+
64+
for(var i = 0; i < numericInputs.length; i++) {
65+
var input = numericInputs[i];
66+
writeValueWithEvents(input, code);
67+
}
6068
}
6169
}
6270

0 commit comments

Comments
 (0)