Add support for autocomplete=username

This commit is contained in:
varjolintu 2025-04-18 14:03:30 +03:00
parent b186eb1fd2
commit f19c90cc08

View file

@ -46,7 +46,11 @@ kpxcFields.getAllCombinations = async function(inputs) {
}
}
if (kpxc.singleInputEnabledForPage && combinations.length === 0 && usernameField) {
// Allow single input if autocomplete="username" is present, or Username-Only Detection is enabled for the page
const autoComplete = usernameField?.getLowerCaseAttribute('autocomplete');
if (combinations.length === 0 && usernameField &&
(kpxc.singleInputEnabledForPage || autoComplete?.includes('username') || autoComplete?.includes('email'))
) {
const combination = {
username: usernameField,
password: null,