Home > Blockchain >  How autofill is disabled here and how to restore it?
How autofill is disabled here and how to restore it?

Time:10-17

There's a website where password autofill doesn't work (it works for the username, but then not for the password), I suppose because it is disabled by web developers, but I want to add it back via Tampermonkey/Greasemonkey.

But the <form> element has no autocomplete="off" attribute, and there's no <input> element with similar autocomplete="off" attribute, so I can't even find a way to change the HTML via the web inspector to make password autofill work.

What are other techniques to disable password autofill?

I checked in my Safari preferences and I have not disabled autofill for that particular website.

If you want the actual sample, here it is:

https://ac.windtre.it/oa/auth/login (click the "ENTRA" button, then document.forms[1]'s elements becomes visible)

Here's an extract of the HTML from the same page, for archiving purposes:

<form _ngcontent-hyb-c164="" novalidate=""  style="">
  <mat-form-field _ngcontent-hyb-c164="" >
    <div >
      <div >
        <div >

          <input
            type="password"
            id="mat-input-1"
            
            matinput=""
            formcontrolname="password"
            aria-invalid="true"
            aria-required="false"
            _ngcontent-hyb-c164=""
          >
          <span >
            <label  id="mat-form-field-label-3" for="mat-input-1" aria-owns="mat-input-1">
              <mat-label _ngcontent-hyb-c164="" >Inserisci password</mat-label>
            </label>
          </span>
        </div>
        <div >
          <mat-icon _ngcontent-hyb-c164="" role="img" matsuffix=""  aria-hidden="true" data-mat-icon-type="font">visibility_off </mat-icon>
        </div>
      </div>
      <div >
        <span ></span>
      </div>
      <div >
        <div  style="opacity: 1; transform: translateY(0%);">
          <div ></div>
        </div>
      </div>
    </div>
  </mat-form-field>
  ...
</form>

CodePudding user response:

Try adding tags to the inputs such as name="username"

Browser autofills rely on the input names to prefill and autocomplete them. That might do the trick.

CodePudding user response:

You can tell the browser with type attribute. There is also a autocomplete attribute to change the behaviour.

<input type='password' autocomplete='password' />

  • Related