Support 2FA in Bitwarden (#178)

This commit is contained in:
Kerem Yilmaz
2024-04-10 23:31:17 -07:00
committed by GitHub
parent 6ea649d30b
commit e8b42c9a4f
5 changed files with 113 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
// Commands for manipulating rects.
// Want to debug this? Run chromium, go to sources, and create a new snippet with the code in domUtils.js
class Rect {
// Create a rect given the top left and bottom right corners.
static create(x1, y1, x2, y2) {
@@ -273,8 +274,8 @@ function hasWidgetRole(element) {
function isInteractableInput(element) {
const tagName = element.tagName.toLowerCase();
const type = element.getAttribute("type");
if (tagName !== "input" || !type) {
const type = element.getAttribute("type") ?? "text"; // Default is text: https://www.w3schools.com/html/html_form_input_types.asp
if (tagName !== "input") {
// let other checks decide
return false;
}