Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fields for LDLC #729

Merged
merged 2 commits into from
Sep 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/services/autofill.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export default class AutofillService implements AutofillServiceInterface {
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
if (!fillFields.cardholderName && this.isFieldMatch(f[attr],
['cc-name', 'card-name', 'cardholder-name', 'cardholder', 'name', 'nom'],
['cc-name', 'card-name', 'cardholder-name', 'cardholder'])) {
['cc-name', 'card-name', 'cardholder-name', 'cardholder', 'tbName'])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should already be handled by the "name" contains check right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the exact field name is very long and this is the only relevant part.

fillFields.cardholderName = f;
break;
} else if (!fillFields.number && this.isFieldMatch(f[attr],
Expand All @@ -444,7 +444,7 @@ export default class AutofillService implements AutofillServiceInterface {
'expire-month', 'expire-mo', 'expiry-month', 'expiry-mo', 'card-expire-month',
'card-expire-mo', 'card-expiry-month', 'card-expiry-mo', 'mois-validite',
'mois-expiration', 'm-validite', 'm-expiration', 'expiry-date-field-month',
'expiration-date-month', 'expiration-date-mm', 'exp-mon'])) {
'expiration-date-month', 'expiration-date-mm', 'exp-mon', 'validity-mo'])) {
fillFields.expMonth = f;
break;
} else if (!fillFields.expYear && this.isFieldMatch(f[attr],
Expand All @@ -455,12 +455,12 @@ export default class AutofillService implements AutofillServiceInterface {
'expiry-year', 'expiry-yr', 'card-expire-year', 'card-expire-yr', 'card-expiry-year',
'card-expiry-yr', 'an-validite', 'an-expiration', 'annee-validite',
'annee-expiration', 'expiry-date-field-year', 'expiration-date-year',
'expiration-date-yy', 'expiration-date-yyyy'])) {
'expiration-date-yy', 'expiration-date-yyyy', 'validity-year'])) {
fillFields.expYear = f;
break;
} else if (!fillFields.code && this.isFieldMatch(f[attr],
['cvv', 'cvc', 'cvv2', 'cc-csc', 'cc-cvv', 'card-csc', 'card-cvv', 'cvd', 'cid', 'cvc2', 'cnv',
'cvn2', 'cc-code', 'card-code', 'code-securite', 'security-code'])) {
'cvn2', 'cc-code', 'card-code', 'code-securite', 'security-code', 'crypto'])) {
fillFields.code = f;
break;
} else if (!fillFields.brand && this.isFieldMatch(f[attr],
Expand Down