aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/mozilla/add-ons/webextensions/manifest.json/browser_specific_settings/index.html
blob: 3d527903625e250529c21470c59293d42013caa2 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
title: applications
slug: Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings
tags:
  - Extensões
  - Extensões da Web
  - Extras
translation_of: Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings
---
<div>{{AddonSidebar}}</div>

<table class="fullwidth-table standard-table">
 <tbody>
  <tr>
   <th scope="row" style="width: 30%;">Tipo</th>
   <td><code>Object</code></td>
  </tr>
  <tr>
   <th scope="row">Obrigatório</th>
   <td>Usually, no (but see also <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID#When_do_you_need_an_add-on_ID">When do you need an Add-on ID?</a>). Mandatory before Firefox 48 (desktop) and Firefox for Android.</td>
  </tr>
  <tr>
   <th scope="row">Exemplo</th>
   <td>
    <pre class="brush: json no-line-numbers">
"applications": {
  "gecko": {
    "id": "addon@example.com",
    "strict_min_version": "42.0"
  }
}</pre>
   </td>
  </tr>
 </tbody>
</table>

<h2 id="Descrição">Descrição</h2>

<p>A chave <code>applications</code> contém chaves que são especificas de uma <em>application</em> de um anfitrião em particular.</p>

<h3 id="Propriedadee_(Gecko)_do_Firefox">Propriedadee (Gecko) do Firefox</h3>

<p>Currently this contains just one key, <code>gecko</code>, which may contain four string attributes:</p>

<ul>
 <li><code>id</code> is the extension ID. Optional from Firefox 48, mandatory before Firefox 48. See <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID">Extensions and the Add-on ID</a> to see when you need to specify an add-on ID.</li>
 <li><code>strict_min_version</code>: minimum version of Gecko to support. Versions containing a "*" are not valid in this field. Defaults to "42a1".</li>
 <li><code>strict_max_version</code>: maximum version of Gecko to support. If the Firefox version on which the extension is being installed or run is above this version, then the extension will be disabled, or not permitted to be installed. Defaults to "*", which disables checking for a maximum version.</li>
 <li><code>update_url</code> is a link to an <a href="/en-US/Add-ons/Updates">extension update manifest</a>. Note that the link must begin with "https". This key is for managing extension updates yourself (i.e. not through AMO).</li>
</ul>

<p>Consulte a lista das <a href="https://addons.mozilla.org/pt-PT/firefox/pages/appversions/">versões válidas de Gecko</a>.</p>

<h4 id="Formato_da_Id._da_Extensão">Formato da Id. da Extensão</h4>

<p>A Id. da extensão deve ser uma das seguintes:</p>

<ul>
 <li><a href="https://en.wikipedia.org/wiki/Universally_unique_identifier" title="Generating_GUIDs">GUID</a></li>
 <li>A string formatted like an email address: <code class="plain">extensionname@example.org</code></li>
</ul>

<p>The latter format is easier to generate and manipulate. Be aware that using a real email address here may attract spam.</p>

<p>Por exemplo:</p>

<pre class="brush:json;auto-links:false no-line-numbers">"id": "extensionname@example.org",

"id": "{daf44bf7-a45e-4450-979c-91cf07434c3d}"</pre>

<h3 id="Propriedades_do_Microsoft_Edge">Propriedades do Microsoft Edge</h3>

<p>Microsoft Edge stores its browser specific settings in the <code>edge</code> subkey, which has the following properties:</p>

<dl>
 <dt><code>browser_action_next_to_addressbar</code></dt>
 <dd>
 <p>Boolean property which controls the placement of the <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_actions">browser action</a>.</p>

 <ul>
  <li><code>true</code> is equivalent to setting <code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action#Syntax">browser_action.default_area</a></code> to <code>navbar</code>.</li>
  <li><code>false</code> is equivalent to setting <code><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action#Syntax">browser_action.default_area</a></code> to <code>menupanel</code>.</li>
 </ul>
 </dd>
</dl>

<h2 id="Exemplos">Exemplos</h2>

<p>Example with all possible keys. Note that most extensions will omit <code>strict_max_version</code> and <code>update_url</code>.</p>

<pre class="brush: json no-line-numbers">"applications": {
  "gecko": {
    "id": "addon@example.com",
    "strict_min_version": "42.0",
    "strict_max_version": "50.*",
    "update_url": "https://example.com/updates.json"
  },
  "edge": {
    <code>"browser_action_next_to_addressbar": true</code>
  }
}</pre>

<h2 id="Compatibilidade_de_navegador">Compatibilidade de navegador</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat("webextensions.manifest.browser_specific_settings")}}</p>