Autofill Issues

%3CLINGO-SUB%20id%3D%22lingo-sub-1083324%22%20slang%3D%22en-US%22%3EAutofill%20Issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1083324%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhile%20developing%20an%20extension%20(using%20the%20chromium%20examples)%2C%20I%20wanted%20to%20disable%20the%20passwords%20autofilling%20and%20saving%20by%20the%20extension.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20code%20is%20the%20following%20%3A%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%2F%2F%20background.js%0Achrome.privacy.services.autofillEnabled.get(%7B%7D%2C%20function(details)%20%7B%0A%20%20if%20(details.levelOfControl%20%3D%3D%3D%20%22controllable_by_this_extension%22)%20%7B%0A%20%20%20%20chrome.privacy.services.autofillEnabled.set(%7B%20value%3A%20false%20%7D%2C%20function()%20%7B%0A%20%20%20%20%20%20if%20(chrome.runtime.lastError%20%3D%3D%3D%20undefined)%0A%20%20%20%20%20%20%20%20console.log(%22Hooray%2C%20it%20worked!%22)%3B%0A%20%20%20%20%20%20else%20console.log(%22Sadness!%22%2C%20chrome.runtime.lastError)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%7D)%3B%0A%0Achrome.privacy.services.autofillAddressEnabled.get(%7B%7D%2C%20function(details)%20%7B%0A%20%20if%20(details.levelOfControl%20%3D%3D%3D%20%22controllable_by_this_extension%22)%20%7B%0A%20%20%20%20chrome.privacy.services.autofillAddressEnabled.set(%0A%20%20%20%20%20%20%7B%20value%3A%20false%20%7D%2C%0A%20%20%20%20%20%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(chrome.runtime.lastError%20%3D%3D%3D%20undefined)%0A%20%20%20%20%20%20%20%20%20%20console.log(%22Hooray%2C%20it%20worked%20for%20Address!%22)%3B%0A%20%20%20%20%20%20%20%20else%20console.log(%22Sadness!%22%2C%20chrome.runtime.lastError)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20)%3B%0A%20%20%7D%0A%7D)%3B%0A%0Achrome.privacy.services.autofillCreditCardEnabled.get(%7B%7D%2C%20function(details)%20%7B%0A%20%20if%20(details.levelOfControl%20%3D%3D%3D%20%22controllable_by_this_extension%22)%20%7B%0A%20%20%20%20chrome.privacy.services.autofillCreditCardEnabled.set(%0A%20%20%20%20%20%20%7B%20value%3A%20false%20%7D%2C%0A%20%20%20%20%20%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(chrome.runtime.lastError%20%3D%3D%3D%20undefined)%0A%20%20%20%20%20%20%20%20%20%20console.log(%22Hooray%2C%20it%20worked%20for%20Credit%20Card!%22)%3B%0A%20%20%20%20%20%20%20%20else%20console.log(%22Sadness!%22%2C%20chrome.runtime.lastError)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20)%3B%0A%20%20%7D%0A%7D)%3B%0A%0Achrome.privacy.services.passwordSavingEnabled.get(%7B%7D%2C%20function(details)%20%7B%0A%20%20if%20(details.levelOfControl%20%3D%3D%3D%20%22controllable_by_this_extension%22)%20%7B%0A%20%20%20%20chrome.privacy.services.passwordSavingEnabled.set(%0A%20%20%20%20%20%20%7B%20value%3A%20false%20%7D%2C%0A%20%20%20%20%20%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(chrome.runtime.lastError%20%3D%3D%3D%20undefined)%0A%20%20%20%20%20%20%20%20%20%20console.log(%22Hooray%2C%20it%20worked%20for%20Credit%20Card!%22)%3B%0A%20%20%20%20%20%20%20%20else%20console.log(%22Sadness!%22%2C%20chrome.runtime.lastError)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20)%3B%0A%20%20%7D%0A%7D)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BAnd%20here%20is%20the%26nbsp%3B%3CSTRONG%3Emanifest.json%26nbsp%3B%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%20%20%22name%22%3A%20%22Getting%20Started%20Example%22%2C%0A%20%20%22version%22%3A%20%221.0%22%2C%0A%20%20%22description%22%3A%20%22Build%20an%20Extension!%22%2C%0A%20%20%22permissions%22%3A%20%5B%22storage%22%2C%20%22privacy%22%5D%2C%0A%20%20%22background%22%3A%20%7B%0A%20%20%20%20%22scripts%22%3A%20%5B%22background.js%22%5D%2C%0A%20%20%20%20%22persistent%22%3A%20false%0A%20%20%7D%2C%0A%20%20%22manifest_version%22%3A%202%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20loading%20the%20extension%20unpacked%20into%20the%20Edge%20Beta%20I%20just%20downloaded%2C%20the%20console%20logs%20my%20success%20callbacks%20but%20upon%20navigating%20websites%20for%20which%20I%20had%20a%20saved%20password%2C%20it%20kept%20autofilling%20and%20showing%20the%20account%20selection%20popup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can't%20find%20a%20solution%20to%20this%20issue%2C%20knowing%20that%20this%20extension%20on%20the%20latest%20build%20of%20Chromium%20does%20work%20and%20prevents%20Chromium%20from%20autofilling.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20any%20of%20you%20have%20something%20similar%20or%20knows%20how%20to%20completely%20disable%20the%20autofill%20%2F%20autosave%20settings%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E
acoruble
Visitor

Hi there,

 

While developing an extension (using the chromium examples), I wanted to disable the passwords autofilling and saving by the extension.

 

The code is the following : 

// background.js
chrome.privacy.services.autofillEnabled.get({}, function(details) {
  if (details.levelOfControl === "controllable_by_this_extension") {
    chrome.privacy.services.autofillEnabled.set({ value: false }, function() {
      if (chrome.runtime.lastError === undefined)
        console.log("Hooray, it worked!");
      else console.log("Sadness!", chrome.runtime.lastError);
    });
  }
});

chrome.privacy.services.autofillAddressEnabled.get({}, function(details) {
  if (details.levelOfControl === "controllable_by_this_extension") {
    chrome.privacy.services.autofillAddressEnabled.set(
      { value: false },
      function() {
        if (chrome.runtime.lastError === undefined)
          console.log("Hooray, it worked for Address!");
        else console.log("Sadness!", chrome.runtime.lastError);
      }
    );
  }
});

chrome.privacy.services.autofillCreditCardEnabled.get({}, function(details) {
  if (details.levelOfControl === "controllable_by_this_extension") {
    chrome.privacy.services.autofillCreditCardEnabled.set(
      { value: false },
      function() {
        if (chrome.runtime.lastError === undefined)
          console.log("Hooray, it worked for Credit Card!");
        else console.log("Sadness!", chrome.runtime.lastError);
      }
    );
  }
});

chrome.privacy.services.passwordSavingEnabled.get({}, function(details) {
  if (details.levelOfControl === "controllable_by_this_extension") {
    chrome.privacy.services.passwordSavingEnabled.set(
      { value: false },
      function() {
        if (chrome.runtime.lastError === undefined)
          console.log("Hooray, it worked for Credit Card!");
        else console.log("Sadness!", chrome.runtime.lastError);
      }
    );
  }
});

 

 And here is the manifest.json :

{
  "name": "Getting Started Example",
  "version": "1.0",
  "description": "Build an Extension!",
  "permissions": ["storage", "privacy"],
  "background": {
    "scripts": ["background.js"],
    "persistent": false
  },
  "manifest_version": 2
}

 

After loading the extension unpacked into the Edge Beta I just downloaded, the console logs my success callbacks but upon navigating websites for which I had a saved password, it kept autofilling and showing the account selection popup.

 

I can't find a solution to this issue, knowing that this extension on the latest build of Chromium does work and prevents Chromium from autofilling.

 

Does any of you have something similar or knows how to completely disable the autofill / autosave settings ?

 

Regards

Related Conversations
collaboration and coauthoring issues in teams
Ethan Stern in Microsoft Teams on
6 Replies
Autofill Options not available
sailho in Excel on
3 Replies
Fill data from a barcode into a system
JKeyfayettevillear in PowerApps & Flow on
1 Replies
Planner mobile on IOS issue to comment
ermedina in Microsoft Teams on
3 Replies