aboutsummaryrefslogtreecommitdiff
path: root/files/fr/mozilla/add-ons/webextensions/api/browseraction/enable
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-11-15 21:45:15 +0100
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-11-15 22:10:33 +0100
commit3cf9bd8b9901006085d4e0f353b0d3b6b8f69d93 (patch)
treee82ac56afff3bc213cc2971cd8aada25a174eee9 /files/fr/mozilla/add-ons/webextensions/api/browseraction/enable
parentf36cc6a7639a8f1adff02bc7a152bd7f54ceae6d (diff)
downloadtranslated-content-3cf9bd8b9901006085d4e0f353b0d3b6b8f69d93.tar.gz
translated-content-3cf9bd8b9901006085d4e0f353b0d3b6b8f69d93.tar.bz2
translated-content-3cf9bd8b9901006085d4e0f353b0d3b6b8f69d93.zip
convert content to md
Diffstat (limited to 'files/fr/mozilla/add-ons/webextensions/api/browseraction/enable')
-rw-r--r--files/fr/mozilla/add-ons/webextensions/api/browseraction/enable/index.md53
1 files changed, 25 insertions, 28 deletions
diff --git a/files/fr/mozilla/add-ons/webextensions/api/browseraction/enable/index.md b/files/fr/mozilla/add-ons/webextensions/api/browseraction/enable/index.md
index f7e8f6139c..b7593aded9 100644
--- a/files/fr/mozilla/add-ons/webextensions/api/browseraction/enable/index.md
+++ b/files/fr/mozilla/add-ons/webextensions/api/browseraction/enable/index.md
@@ -13,52 +13,50 @@ tags:
- browserAction
translation_of: Mozilla/Add-ons/WebExtensions/API/browserAction/enable
---
-<div>{{AddonSidebar()}}</div>
+{{AddonSidebar()}}
-<p>Active l'action du navigateur pour un onglet. Par défaut, les actions du navigateur sont activées pour tous les onglets.</p>
+Active l'action du navigateur pour un onglet. Par défaut, les actions du navigateur sont activées pour tous les onglets.
-<h2 id="Syntaxe">Syntaxe</h2>
+## Syntaxe
-<pre class="brush: js">browser.browserAction.enable(
+```js
+browser.browserAction.enable(
tabId // optional integer
)
-</pre>
+```
-<h3 id="Paramètres">Paramètres</h3>
+### Paramètres
-<dl>
- <dt><code>tabId</code>{{optional_inline}}</dt>
- <dd><code>integer</code>. L'identifiant (ID) de l'onglet pour lequel vous souhaitez activer l'action du navigateur.</dd>
-</dl>
+- `tabId`{{optional_inline}}
+ - : `integer`. L'identifiant (ID) de l'onglet pour lequel vous souhaitez activer l'action du navigateur.
-<h2 id="Compatibilité_du_navigateur">Compatibilité du navigateur</h2>
+## Compatibilité du navigateur
-<p>{{Compat("webextensions.api.browserAction.enable")}}</p>
+{{Compat("webextensions.api.browserAction.enable")}}
-<h2 id="Exemples">Exemples</h2>
+## Exemples
-<p> Désactivez l'option du navigateur lorsque vous cliquez et réactivez-le chaque fois qu'un nouveau onglet est ouvert :</p>
+Désactivez l'option du navigateur lorsque vous cliquez et réactivez-le chaque fois qu'un nouveau onglet est ouvert :
-<pre class="brush: js">browser.tabs.onCreated.addListener(() =&gt; {
+```js
+browser.tabs.onCreated.addListener(() => {
browser.browserAction.enable();
});
-browser.browserAction.onClicked.addListener(() =&gt; {
+browser.browserAction.onClicked.addListener(() => {
browser.browserAction.disable();
});
-</pre>
+```
-<p>{{WebExtExamples}}</p>
+{{WebExtExamples}}
-<div class="note"><p><strong>Note :</strong></p>
+> **Note :**
+>
+> Cette API est basée sur l'API Chromium [`chrome.browserAction`](https://developer.chrome.com/extensions/browserAction). Cette documentation est dérivée de [`browser_action.json`](https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/api/browser_action.json) dans le code de Chromium code.
+>
+> Les données de compatibilité relatives à Microsoft Edge sont fournies par Microsoft Corporation et incluses ici sous la licence Creative Commons Attribution 3.0 pour les États-Unis.
-<p>Cette API est basée sur l'API Chromium <a href="https://developer.chrome.com/extensions/browserAction"><code>chrome.browserAction</code></a>. Cette documentation est dérivée de <a href="https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/api/browser_action.json"><code>browser_action.json</code></a> dans le code de Chromium code.</p>
-
-<p>Les données de compatibilité relatives à Microsoft Edge sont fournies par Microsoft Corporation et incluses ici sous la licence Creative Commons Attribution 3.0 pour les États-Unis.</p>
-</div>
-
-<div class="hidden">
-<pre>// Copyright 2015 The Chromium Authors. All rights reserved.
+<div class="hidden"><pre>// Copyright 2015 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -85,5 +83,4 @@ browser.browserAction.onClicked.addListener(() =&gt; {
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-</pre>
-</div>
+</pre></div>