This sample demonstrates using chrome.privacy.services
to get and set privacy settings.
The service worker sets the default value for autofill using chrome.privacy.services.autofillCreditCardEnabled.set()
when the extension is installed. Whenever the action button is clicked, the extension toggles the current autofill setting of autofillCreditCardEnabled
and updates the extension badge.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Pin the extension to the taskbar and click the action button.