diff options
author | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-11-15 19:39:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 19:39:07 +0100 |
commit | 34d315396ca29d7ef51ecc27eeeeeb275e9b0ba9 (patch) | |
tree | 21f671201b06ff6b0e507de867950b71fe1fddaf /files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore | |
parent | 3886d96643d8b7cc626f1dda0e11981ac85def86 (diff) | |
download | translated-content-34d315396ca29d7ef51ecc27eeeeeb275e9b0ba9.tar.gz translated-content-34d315396ca29d7ef51ecc27eeeeeb275e9b0ba9.tar.bz2 translated-content-34d315396ca29d7ef51ecc27eeeeeb275e9b0ba9.zip |
Prepare Mozilla section for Markdown conversion (#2980)
* Remove summary
* Remove hidden except for copyright notice
* Remove spans
* Remove font
* Remove notranslate
* Remove extra id, deleting an untranslated page doing so
* Fix links, absolute links, rm internal, titles
* Remove external classes
* fix headings with name attr
* fix some styles and classes
* remove useless class reference-values
* rm styles in links
* Fix code blocks in pre
* Remove ltr classes
* remove fullwidth-table
* Fix various conversion errors and some one offs
* Remove nested code/pre/code
* Fix notes
* Fix warnings
* fix dls
* fix nested issues in dls
* fix images
Diffstat (limited to 'files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore')
-rw-r--r-- | files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore/index.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore/index.html b/files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore/index.html index 8f7b3592fb..f861ee501f 100644 --- a/files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore/index.html +++ b/files/fr/mozilla/add-ons/webextensions/api/cookies/cookiestore/index.html @@ -23,7 +23,7 @@ translation_of: Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore <p>Les valeurs de ce type sont des objets, qui peuvent contenir les propriétés suivantes :</p> -<dl class="reference-values"> +<dl> <dt><code>id</code></dt> <dd>Une <code>chaîne</code> représentant l'identification unique pour le cookie store.***</dd> <dt><code>incognito</code></dt> @@ -40,14 +40,14 @@ translation_of: Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore <p>Dans l'extrait suivant, la méthode {{WebExtAPIRef("cookies.getAllCookieStores()")}} permet de récupérer tous les magasins de cookies actuellement disponibles dans le navigateur et d'afficher chaque ID de cookie, ainsi que les onglets qui se partagent le cookie store.</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">logStores</span><span class="punctuation token">(</span>cookieStores<span class="punctuation token">)</span> <span class="punctuation token">{</span> - <span class="keyword token">for</span><span class="punctuation token">(</span>store <span class="keyword token">of</span> cookieStores<span class="punctuation token">)</span> <span class="punctuation token">{</span> - console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span><span class="template-string token"><span class="string token">`Cookie store: </span><span class="interpolation token"><span class="interpolation-punctuation punctuation token">${</span>store<span class="punctuation token">.</span>id<span class="interpolation-punctuation punctuation token">}</span></span><span class="string token">\n Tab IDs: </span><span class="interpolation token"><span class="interpolation-punctuation punctuation token">${</span>store<span class="punctuation token">.</span>tabIds<span class="interpolation-punctuation punctuation token">}</span></span><span class="string token">`</span></span><span class="punctuation token">)</span><span class="punctuation token">;</span> - <span class="punctuation token">}</span> -<span class="punctuation token">}</span> +<pre class="brush: js">function logStores(cookieStores) { + for(store of cookieStores) { + console.log(`Cookie store: ${store.id}\n Tab IDs: ${store.tabIds}`); + } +} -<span class="keyword token">var</span> getting <span class="operator token">=</span> browser<span class="punctuation token">.</span>cookies<span class="punctuation token">.</span><span class="function token">getAllCookieStores</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -getting<span class="punctuation token">.</span><span class="function token">then</span><span class="punctuation token">(</span>logStores<span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +var getting = browser.cookies.getAllCookieStores(); +getting.then(logStores);</pre> <p>L'extrait de code suivant obtient tous les cookies stockés et enregistre ensuite le nombre total stocké et combien de ces cookies sont incognito.</p> @@ -58,7 +58,7 @@ getting<span class="punctuation token">.</span><span class="function token">then <p>{{WebExtExamples}}</p> -<div class="note"><strong>Remerciements :</strong> +<div class="note"><p><strong>Note :</strong></p> <p>Cette API est basée sur l'API Chromium <a href="https://developer.chrome.com/extensions/cookies"><code>chrome.cookies</code></a>. Cette documentation est dérivée de <a href="https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/api/cookies.json"><code>cookies.json</code></a> dans le code Chromium.</p> |