privacy.services 编辑
BCD tables only load in the browser
The privacy.services
property contains privacy-related settings controlling services offered by the browser or by third parties. Each property is a types.BrowserSetting
object.
passwordSavingEnabled
- A
types.BrowserSetting
object whose underlying value is a boolean. Iftrue
, the browser's password manager will offer to store passwords when the user enters them. Defaults totrue
.
Disable the password manager if possible.
function onSet(result) {
if (result) {
console.log("success");
} else {
console.log("failure");
}
}
var getting = browser.privacy.services.passwordSavingEnabled.get({});
getting.then((got) => {
console.log(got.value);
if ((got.levelOfControl === "controlled_by_this_extension") ||
(got.levelOfControl === "controllable_by_this_extension")) {
var setting = browser.privacy.services.passwordSavingEnabled.set({
value: false
});
setting.then(onSet);
} else {
console.log("Not able to set passwordSavingEnabled");
}
});
AcknowledgementsThis API is based on Chromium's chrome.privacy
API.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论