blob: 76e4a143ecceaac2cdd07ff54d23c46d97ccf2d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
---
title: browserSettings.ftpProtocolEnabled
slug: Mozilla/Add-ons/WebExtensions/API/browserSettings/ftpProtocolEnabled
tags:
- API
- Add-ons
- Extensions
- Property
- Reference
- WebExtensions
- browserSettings
- contextMenuShowEvent
- ftpProtocolEnabled
translation_of: Mozilla/Add-ons/WebExtensions/API/browserSettings/ftpProtocolEnabled
---
{{AddonSidebar()}}
Un objet {{WebExtAPIRef("types.BrowserSetting", "BrowserSetting")}} qui détermine si le protocole FTP est activé dans le navigateur.
La valeur sous-jaccente est un booléen.
## Compatibilité du navigateur
{{Compat("webextensions.api.browserSettings.ftpProtocolEnabled")}}
## Exemples
Changer le réglage:
```js
function toggleAllowFtp() {
function toggle(current) {
console.log(`Valeur actuelle: ${current.value}`);
browser.browserSettings.ftpProtocolEnabled.set({value: !current.value});
}
browser.browserSettings.ftpProtocolEnabled.get({}).then(toggle);
}
browser.browserAction.onClicked.addListener(() => {
toggleAllowFtp();
});
```
{{WebExtExamples}}
|