diff options
Diffstat (limited to 'files/pt-pt/mozilla/add-ons')
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/anatomia_de_uma_extensao/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/api/devtools/panels/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/api/devtools.panels/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/api/storage/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/api/armazenamento/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/as_melhores_praticas_de_experiencia_do_utilizador/index.html | 159 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/suporte_navegador_apis_javascript/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/content_scripts/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/scripts_conteudo/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/conversao_de_uma_extensao_legada_do_firefox/index.html | 81 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/examples/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/exemplos_extensoes/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/extensão_das_ferramentas_de_desenvolvimento/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/extennsoesweb_e_a_id_do_extra/index.html | 78 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/instalacao_temporaria_no_firefox/index.html | 50 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/intercept_http_requests/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interceptar_pedidos_http/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icons/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icones/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/match_patterns/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/dubla_padrões/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/primeiros_passos_com_web-ext/index.html | 304 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/publicar_a_sua_extensao/index.html | 62 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/trasnsferir_extensao_google_chrome/index.html | 22 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_action/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/ação_navegador/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_styles/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/estilos_de_navegador/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/context_menu_items/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/itens_do_menu_de_contexto/index.html) | 5 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/devtools_panels/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/devtools_panels/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/extension_pages/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/paginas_de_extensão/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/notifications/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/notificacoes/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/omnibox/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/omnibox/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/options_pages/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/options_pages/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/page_actions/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/acoes_pagina/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/popups/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/popups/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/user_interface/sidebars/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/barras_laterais/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/what_are_webextensions/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/o_que_sao_webextensions/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/what_next_/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/e_a_seguir/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/your_first_webextension/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/a_sua_primeira_extensao/index.html) | 3 | ||||
-rw-r--r-- | files/pt-pt/mozilla/add-ons/webextensions/your_second_webextension/index.html (renamed from files/pt-pt/mozilla/add-ons/webextensions/a_sua_segunda_extensao/index.html) | 3 |
33 files changed, 53 insertions, 783 deletions
diff --git a/files/pt-pt/mozilla/add-ons/webextensions/anatomia_de_uma_extensao/index.html b/files/pt-pt/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html index ecad403ae1..3dfff5adde 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/anatomia_de_uma_extensao/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html @@ -1,9 +1,10 @@ --- title: Anatomia de uma extensão -slug: Mozilla/Add-ons/WebExtensions/Anatomia_de_uma_extensao +slug: Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension +original_slug: Mozilla/Add-ons/WebExtensions/Anatomia_de_uma_extensao --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/api/devtools.panels/index.html b/files/pt-pt/mozilla/add-ons/webextensions/api/devtools/panels/index.html index ebeb53d591..2d7cb8839d 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/api/devtools.panels/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/api/devtools/panels/index.html @@ -1,6 +1,6 @@ --- title: devtools.panels -slug: Mozilla/Add-ons/WebExtensions/API/devtools.panels +slug: Mozilla/Add-ons/WebExtensions/API/devtools/panels tags: - API - Extensões @@ -9,6 +9,7 @@ tags: - Referencia - devtools.panels translation_of: Mozilla/Add-ons/WebExtensions/API/devtools.panels +original_slug: Mozilla/Add-ons/WebExtensions/API/devtools.panels --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/api/armazenamento/index.html b/files/pt-pt/mozilla/add-ons/webextensions/api/storage/index.html index d267faf520..f4551690f3 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/api/armazenamento/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/api/storage/index.html @@ -1,6 +1,6 @@ --- title: Armazenamento -slug: Mozilla/Add-ons/WebExtensions/API/Armazenamento +slug: Mozilla/Add-ons/WebExtensions/API/storage tags: - API - Armazenamento @@ -11,6 +11,7 @@ tags: - Não Padrão - Referencia translation_of: Mozilla/Add-ons/WebExtensions/API/storage +original_slug: Mozilla/Add-ons/WebExtensions/API/Armazenamento --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/as_melhores_praticas_de_experiencia_do_utilizador/index.html b/files/pt-pt/mozilla/add-ons/webextensions/as_melhores_praticas_de_experiencia_do_utilizador/index.html deleted file mode 100644 index 0b3aba116e..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/as_melhores_praticas_de_experiencia_do_utilizador/index.html +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: As melhores práticas de experiência do utilizador -slug: >- - Mozilla/Add-ons/WebExtensions/As_melhores_praticas_de_experiencia_do_utilizador -tags: - - Extensões - - Extras - - Guía - - IU - - UX -translation_of: Mozilla/Add-ons/WebExtensions/User_experience_best_practices ---- -<div>{{AddonSidebar()}}</div> - -<p dir="ltr" id="docs-internal-guid-04f024b5-ab18-81ba-29b2-520d0891bcac">As melhores extensões do Firefox fornecem aos utilizadores uma nova funcionalidade ou recurso que corresponde a uma necessidade. Ao corresponder a essa necessidade irá ajudar os utilziadores a trabalhar de uma maneira mais inteligente ou eficiente, ou a obter mais prazer com a sua experiência de navegação.</p> - -<p dir="ltr">You will also want to make sure your users have a great experience using your extension and as a result give it great feedback and a good rating on <a href="https://addons.mozilla.org">addons.mozilla.org</a> (AMO).</p> - -<p dir="ltr">Much has been written about what makes software usable. If you are new to the subject, a good place to start is Jakob Nielsen’s <a href="https://en.wikipedia.org/wiki/Heuristic_evaluation#Nielsen">Usability Heuristics</a>. We recommend, whether you are new to extension development or a seasoned pro, using Nielsen’s Heuristics as a checklist when <a href="#Test_test_and_then_test_again">testing your user experience (UX)</a>.</p> - -<p dir="ltr">So, here we discuss much more specific Firefox and browser extension UX features, offering advice and suggestions that will help you build an extension that delights your users.</p> - -<h2 dir="ltr" id="Seja_Firefoxy">Seja <em>Firefoxy</em></h2> - -<p dir="ltr">Your users have chosen Firefox for a reason, possibly several reasons, so match your extension’s philosophy, features, and look and feel to that of Firefox.</p> - -<h3 dir="ltr" id="Design_values">Design values</h3> - -<p dir="ltr">To best meet the needs of Firefox users, align with the Firefox values.</p> - -<p dir="ltr">The <a href="https://design.firefox.com/values/">Firefox Design Values</a> state that we respect the user's privacy and sovereignty and do not surprise them. We start users with smart defaults on the functionality they want to use and enable them to customize those to their personal preferences so that they are in full control of their experience. We add humor and whimsy to our design and pay attention to details, quality, and performance. Local differences in a global world are important to us, and we help people make sense of the web in clear language.</p> - -<h3 dir="ltr" id="Apresentação_e_impressão">Apresentação e impressão</h3> - -<p dir="ltr">To provide your extensions with the best long term fit to Firefox, align with the <a href="http://design.firefox.com/photon">Firefox Photon Design System</a>. Following Photon will ensure that your extension integrates with the Firefox experience and will make it easier for people to use.</p> - -<h2 dir="ltr" id="Mantenha-a_focada">Mantenha-a focada</h2> - -<p dir="ltr">An extension is best when it is centered around one main use case, addressing that use case as well as possible for the target audience. It should add one function or set of closely related functions to the browser, modify a function of the browser, or modify web pages. Determine if you have achieved this by asking whether you can easily communicate the features and purpose of the extension in three (short) sentences or less.</p> - -<div class="note"> -<p dir="ltr">A short summary description of your extension is also very useful when it comes to creating its listing on AMO, see <a href="/en-US/Add-ons/Listing#Make_sure_your_summary_is_just_long_enough">Make sure your summary is just long enough</a> for more details.</p> -</div> - -<h2 dir="ltr" id="Comece_agora_mesmo">Comece agora mesmo</h2> - -<p dir="ltr">Ensure that your extension is ready to be used immediately after installation. It should be optimized for its main use case, and work as expected for most users without the need for customization.</p> - -<p dir="ltr">Do not expect your users to read detailed instructions, other content, or ask them to configure the extension to use it. Doing so could mean they never get started with your extension and, if they do, could result in poor reviews.</p> - -<h2 dir="ltr" id="Dê_aos_utilizadores_o_que_eles_precisam_onde_eles_precisam">Dê aos utilizadores o que eles precisam, onde eles precisam</h2> - -<p dir="ltr">Choosing the right way or combination of ways to make your extension's functionality available to the user can have a significant effect on usability. Asking a few simple questions about your extension’s functionality can quickly guide you to the right choices:</p> - -<h3 dir="ltr" id="A_minha_extensão_funciona_na_maioria_dos_sites_da_Web_e_páginas_da_Web">A minha extensão funciona na maioria dos sites da Web e páginas da Web?</h3> - -<p dir="ltr">If your extension provides the user with features they can use on almost every website or page, give the user access to it from a <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/user_interface/Browser_action">toolbar button</a> using the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction">browser action</a>. This might include providing access to your image editor or opening a page from your website.</p> - -<p dir="ltr"><img alt="" src="https://mdn.mozillademos.org/files/12966/browser-action.png" style="display: block; height: 387px; margin-left: auto; margin-right: auto; width: 782px;"></p> - -<p dir="ltr">Where you have several features you want to give the user access, you can add a <a href="/en-US/Add-ons/WebExtensions/Popups">popup</a> to the button.</p> - -<h3 dir="ltr" id="A_minha_extensão_funciona_apenas_em_alguns_sites_da_Web_e_páginas">A minha extensão funciona apenas em alguns sites da Web e páginas?</h3> - -<p dir="ltr">If your extension offers a feature for a type of web page or specific domains, give the user access to it from an <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Page_actions">address bar button</a> using a <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pageAction">page action</a>. This might include providing access to your RSS reader on pages with RSS feeds or providing an extended feature to pages on your website.</p> - -<p dir="ltr"><img alt="" src="https://mdn.mozillademos.org/files/12960/page-action.png" style="display: block; height: 262px; margin-left: auto; margin-right: auto; width: 850px;"></p> - -<p dir="ltr">Where you have several features you want to give the user access, you can add a <a href="/en-US/Add-ons/WebExtensions/Popups">popup</a> to the button.</p> - -<h3 dir="ltr" id="A_minha_extensão_precisa_de_mostrar_informação_ou_oferecer_ações_em_paralelo_com_as_páginas_da_Web">A minha extensão precisa de mostrar informação ou oferecer ações em paralelo com as páginas da Web?</h3> - -<p dir="ltr">If your extension includes information or actions that a user would want immediate access to while viewing any web page, use a <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars">sidebar</a>. This might include notes the user can make about a page’s content or a feature offering various font substitutions to improve readability.</p> - -<p dir="ltr"><img alt="" src="https://mdn.mozillademos.org/files/14825/bookmarks-sidebar.png" style="display: block; height: 761px; margin-left: auto; margin-right: auto; width: 728px;"></p> - -<h3 dir="ltr" id="A_minha_extensão_oferece_funcionalidade_especifica_para_o_conteúdo_da_página_ou_outras_funcionalidades_do_navegador">A minha extensão oferece funcionalidade especifica para o conteúdo da página ou outras funcionalidades do navegador?</h3> - -<p dir="ltr">If your extension offers features the user might want to access in context, add them to an appropriate <a href="/en-US/Add-ons/WebExtensions/user_interface/Context_menu_items">context menu</a>. This might include offering access to an image editor on the image context menu or offering extended copy features on the context menu for selected page content.</p> - -<p dir="ltr"><img alt="Example of content menu items added by a WebExtension, from the context-menu-demo example" src="https://mdn.mozillademos.org/files/15051/context_menu_example.png" style="display: block; height: 587px; margin-left: auto; margin-right: auto; width: 573px;"></p> - -<h3 dir="ltr" id="A_minha_extensão_tem_definições_que_o_utilizador_pode_ajustar">A minha extensão tem definições que o utilizador pode ajustar?</h3> - -<p dir="ltr">If your extension enables the user to change and save settings that affect the behavior of the extension, use an <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Options_pages">options page</a> to provide a standard Preferences link to settings from the Add-on Manager.</p> - -<p dir="ltr"><img alt="Typical preferences button, to access an extension's settings, from the Add-on Manager" src="https://mdn.mozillademos.org/files/15271/add-on-manager-preferences-button.png" style="display: block; height: 80px; margin-left: auto; margin-right: auto; width: 732px;"></p> - -<h3 dir="ltr" id="A_minha_extensão_precisa_de_recolher_muita_informação_ou_exibir_conteúdo_em_adição_aos_separadores_atuais">A minha extensão precisa de recolher muita informação ou exibir conteúdo em adição aos separadores atuais?</h3> - -<p dir="ltr">Where your extension needs to gather or display significant amounts of information (more than is suitable for an <a href="/en-US/docs/Web/API/Window/alert">alert</a> or would benefit from additional formatting) use <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Bundled_web_pages">bundled web pages</a> to deliver forms and similar content.</p> - -<p dir="ltr"><img alt="Example of a simple bundled page displayed as a detached panel." src="https://mdn.mozillademos.org/files/15073/bundled_page_as_panel.png" style="display: block; height: 445px; margin-left: auto; margin-right: auto; width: 680px;"></p> - -<h3 dir="ltr" id="A_minha_extensão_tenta_ajudar_o_utilizador_a_entrar_as_páginas_da_Web_ou_conteúdo">A minha extensão tenta ajudar o utilizador a entrar as páginas da Web ou conteúdo?</h3> - -<p dir="ltr">Where your extension includes a use case to locate web pages or content, for example, offering a site specific search, use <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Omnibox">address bar suggestions</a> to deliver those recommendations.</p> - -<p dir="ltr"><img alt="Example showing the result of the firefox_code_search WebExtension's customization of the address bar suggestions." src="https://mdn.mozillademos.org/files/15075/omnibox_example_full.png" style="display: block; height: 325px; margin-left: auto; margin-right: auto; width: 679px;"></p> - -<h3 dir="ltr" id="A_minha_extensão_oferece_ferramentas_para_os_programadores">A minha extensão oferece ferramentas para os programadores?</h3> - -<p dir="ltr">Where you are providing tools for developers, add them to the Firefox developer tools using <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/devtools_panels">developer tools panels</a>.</p> - -<h2 dir="ltr" id="Mantenha_o_utilizador_informado">Mantenha o utilizador informado</h2> - -<p dir="ltr">Ensuring the user knows what will happen, is happening, and has happened in your extension is an essential part of building trust and ensuring a happy user.</p> - -<h3 dir="ltr" id="Diga_ao_utilizador_o_que_irá_acontecer_antes_que_aconteça">Diga ao utilizador o que irá acontecer, antes que aconteça</h3> - -<p dir="ltr">Users should understand what will happen when they click a button. In addition to a meaningful, descriptive button label, provide tooltips that describe the action that the button will perform.</p> - -<div class="note"> -<p dir="ltr">Do not put the name of the extension alone in the tooltip, unless it is descriptive of the action the button will perform.</p> -</div> - -<p dir="ltr">Do not use the tooltip for any other types of information such as elaborate statistics about your extension. Keep the tooltip content simple and focused on what will happen when the user clicks the button.</p> - -<h3 dir="ltr" id="Se_é_realmente_importante_e_o_utilizador_afastou-se_notifique-os">Se é realmente importante e o utilizador afastou-se, notifique-os</h3> - -<p dir="ltr">If your extension has completed a critical, long running background task, when the task completes use the operating system’s native <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Notifications">notifications</a> to update the user. This can be useful where the user may not be focusing on the extension, or the browser, when the process finishes. However, use sparingly. If it is sufficient for the user to discover that a process has completed when they return to the browser or extension, do not use notifications.</p> - -<p dir="ltr"><img alt="" src="https://mdn.mozillademos.org/files/14043/notify-shadowed.png" style="display: block; height: 334px; margin-left: auto; margin-right: auto; width: 700px;"></p> - -<h3 dir="ltr" id="Utilizar_browserAction_badges_sparingly">Utilizar browserAction badges sparingly</h3> - -<p dir="ltr">You can <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction/setBadgeText">add a badge</a> over the toolbar icon of a <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction">browserAction</a>, but do so sparingly to inform users about important events. Do not use them to provide regular or persistent status updates.</p> - -<p dir="ltr">When it comes to <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction/setBadgeBackgroundColor">coloring a badge</a>, using one of four colors for notifications of different severity is recommended:</p> - -<ul> - <li>Casual: azul</li> - <li>Sucesso: verde</li> - <li>Aviso: amarelo</li> - <li>Erro: vermelho</li> -</ul> - -<div class="note"> -<p dir="ltr">Use of Firefox colors is suggested, for more details see <a href="http://design.firefox.com/photon/visuals/color.html">Firefox Colors</a>. However, for compatibility with <a href="https://developer.chrome.com/extensions/browserAction#icon">Chrome</a> and Opera free color selection is supported.</p> -</div> - -<h2 dir="ltr" id="Testar_testar_e_depois_testar_novamente">Testar, testar, e depois testar novamente</h2> - -<p dir="ltr">Testing is a vital part of creating an outstanding UX for your extension. There are two key aspects of testing your UX:</p> - -<ol> - <li>Test across devices and platforms to ensure your extension works and performs well in as many places as possible. This includes considering factors such as the user’s screen size and resolution—just because your extension looks good and is easy to use on your desktop monitor does not mean it looks as good and works as well on a smaller laptop screen, or, indeed, vice versa.</li> - <li>Test with as many users as possible. Do not assume that you know your audience, as people’s backgrounds and experience can make a huge difference to how they interact with your extension. So, allow for user testing as part of your extension’s development.</li> -</ol> - -<p dir="ltr">Dicas de teste:</p> - -<ul> - <li>In AMO you have the option to <a href="/en-US/Add-ons/Distribution/Submitting_an_add-on#Listing_on_AMO">identify your extension as experimental</a> or publish a <a href="/en-US/Add-ons/Distribution#Beta_versions">beta or other non-final release</a>. If you flag your extension as experimental it is listed in AMO, so that any user can find it, but with a lower profile. When you are happy that the extension is ready for a wider audience, you can turn off the experimental flag and your extension will be listed as normal in AMO. If you have a published extension, you can use the Development channel to offer an alpha or beta version for testing. You will need to direct your testers to the Development Channel of your extension’s listing or let your testers know the link to use to install your extension.<br> - <img alt="The development channel section of an extension's listing page, offering access to alpha and beta versions for testing." src="https://mdn.mozillademos.org/files/15273/extensions-development-channel.png" style="display: block; height: 262px; margin-left: auto; margin-right: auto; width: 751px;"><br> - When you are happy with your update, you can publish it as the new release version of your extension.</li> - <li>If you want to distribute your extension to users outside AMO, you can find the instructions for doing so, and the installation instructions you need to provide users, in the article on <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Alternative_distribution_options/Sideloading_add-ons">Sideloading add-ons</a>. Remember that, unlike distribution through AMO, you will need to send users any updated versions of your extension as you make improvements.</li> - <li>Use the <a href="https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode">Responsive Design Mode</a> to test your extension for its behavior on other screen sizes and device types.</li> -</ul> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/suporte_navegador_apis_javascript/index.html b/files/pt-pt/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html index e34a4013d3..839b88a764 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/suporte_navegador_apis_javascript/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html @@ -1,9 +1,10 @@ --- title: Suporte de navegador para as APIs de JavaScript -slug: Mozilla/Add-ons/WebExtensions/Suporte_navegador_APIs_JavaScript +slug: Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs +original_slug: Mozilla/Add-ons/WebExtensions/Suporte_navegador_APIs_JavaScript --- <p>{{AddonSidebar}}</p> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/scripts_conteudo/index.html b/files/pt-pt/mozilla/add-ons/webextensions/content_scripts/index.html index 51356eed85..13daea5bbf 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/scripts_conteudo/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/content_scripts/index.html @@ -1,9 +1,10 @@ --- title: Scripts de Conteúdo -slug: Mozilla/Add-ons/WebExtensions/Scripts_Conteudo +slug: Mozilla/Add-ons/WebExtensions/Content_scripts tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/Content_scripts +original_slug: Mozilla/Add-ons/WebExtensions/Scripts_Conteudo --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/conversao_de_uma_extensao_legada_do_firefox/index.html b/files/pt-pt/mozilla/add-ons/webextensions/conversao_de_uma_extensao_legada_do_firefox/index.html deleted file mode 100644 index 1898b1712a..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/conversao_de_uma_extensao_legada_do_firefox/index.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Conversão de uma extensão legada do Firefox -slug: Mozilla/Add-ons/WebExtensions/Conversao_de_uma_extensao_legada_do_firefox -translation_of: Mozilla/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on ---- -<div>{{AddonSidebar}}</div> - -<p><span class="seoSummary">Se desenvolveu uma extensão do Firefox utilziando XUL/XPCOM ou SDK de EXtras, esta página irá ajudá-lo a migraar a sua extensão para utilizar as APIs das Extensões da Web. O padrão para criar extensões para o Firefox é para utilizar as </span>APIs das Extensões da Web. Este será a único tipo de extensão suportado no Firefox no fim de novembro de 2017, com o lançamento da versão 57 do <a class="external text" href="https://wiki.mozilla.org/RapidRelease/Calendar" rel="nofollow">Firefox</a>.</p> - -<h2 id="Início_rápido">Início rápido</h2> - -<ol> - <li>Get an idea of the main things you'll have to change in your extension: - <ul> - <li>Familiarize yourself with the <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension">WebExtension format and structure</a>, and <a href="/en-US/Add-ons/WebExtensions/Your_first_WebExtension">build a basic example</a>.</li> - <li>If your extension is based on XUL and XPCOM, whether it's an <a href="https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions">overlay extension</a> or a <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Bootstrapped_extensions">bootstrapped extension</a>, see <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">Comparison with XUL/XPCOM extensions</a> to find out how WebExtensions can correspond with the legacy APIs you're using.</li> - <li>If your extension is based on the Add-on SDK, see <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">Comparison with the Add-on SDK</a> to find out how WebExtensions can correspond with the legacy SDK APIs you're using.</li> - </ul> - </li> - <li>Rewrite your extension code. See below for migration paths for different types of extensions. From Firefox 51 onwards, you can embed an extension built using WebExtension APIs in a bootstrapped extension or an SDK add-on, and can thus port a legacy extension a piece at a time, and have a working extension at each step. See <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Embedded_WebExtensions">Embedded WebExtensions</a> for more information.</li> - <li>When you're ready to submit the WebExtension version of your extension to AMO... wait a minute... are you truly ready? Because of the extensions permissions model, you cannot revert from WebExtensions back to using a legacy extension format. So test <em>thoroughly</em>, because this is a permanent one-way trip. Also, see the hybrid example below. If you're not ready, you can embed your WebExtension in a legacy extension container, which allows you to test your extension migration but still go back if needed in an emergency.</li> - <li>When you're <em>really</em> ready to submit the WebExtension version of your extension to AMO, first port your old add-on ID to the new WebExtension manifest.json file. Your extension must have the same ID as previous versions. Copy the value in the "id" field from your package.json file into the id field in the <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a> section of the WebExtension manifest.json file. Then you can submit your extension update to AMO as your normally would.</li> -</ol> - -<div class="note"> -<p>Note that this is a one-way conversion: You <strong>cannot</strong> update an extension using WebExtensions to use a legacy technology. This means that you must be sure that you are ready to commit to using WebExtension APIs before you submit the updated add-on to AMO.</p> -</div> - -<h2 id="Camnihos_de_migração">Camnihos de migração</h2> - -<h3 id="Extensões_SDK">Extensões SDK</h3> - -<p>Here is the comparison chart showing <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">SDK APIs and their WebExtensions format counterparts</a>. If you don't see the APIs you need to port to use WebExtensions APIs, look below to learn how to request APIs and also how to implement them.</p> - -<h3 id="Extensões_XULXPCOM">Extensões XUL/XPCOM</h3> - -<p>Here is the comparison chart showing <a href="/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">XUL/XPCOM APIs and their WebExtensions format counterparts</a>. If you don't see the APIs you need to port to use WebExtension APIs, look below to learn how to request APIs and also how to implement them.</p> - -<h3 id="Migração_parcial">Migração parcial</h3> - -<p>An <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions">Embedded WebExtension</a> is an extension that combines two types of extensions in one, by incorporating a WebExtension inside of a bootstrapped or SDK extension. If you have a legacy extension that writes data to the filesystem, and you’re planning to port it to WebExtensions, <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Embedded_WebExtensions">Embedded WebExtensions</a> are available to help you transition. Embedded WebExtensions can be used to transfer the stored data of your add-on to a format that can be used by WebExtensions. This is essential because it lets you to convert your users without the need for them to take any actions.</p> - -<p>It’s important to emphasize that Embedded WebExtensions are intended to be a transition tool, and will not be supported past Firefox 57. They should not be used for add-ons that are not expected to transition to WebExtensions.</p> - -<h2 id="Não_vê_as_APIs_das_Extensões_da_Web_que_precisa">Não vê as APIs das Extensões da Web que precisa?</h2> - -<p><strong>Develop WebExtension APIs for Firefox</strong> - If you're experienced with Mozilla infrastructure and would like to develop WebExtensions APIs directly for Firefox, here is a list of <a href="https://mzl.la/2dVs5Ys">approved APIs</a> that you can start contributing to.</p> - -<p><strong>Experiment with new WebExtension APIs</strong> - If you want to prototype and tinker with WebExtensions APIs without having to build Firefox, <a href="http://webextensions-experiments.readthedocs.io/en/latest/index.html">WebExtensions Experiments</a> is for you!</p> - -<p><strong>Request a new WebExtensions API</strong> - If you want to request a new WebExtensions API, please read <a class="external text" href="https://wiki.mozilla.org/WebExtensions/NewAPIs" rel="nofollow">this page</a>.</p> - -<h2 id="Ferramentas">Ferramentas</h2> - -<ul> - <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Getting_started_with_web-ext">web-ext</a> is a command line tool designed to speed up various parts of the extension development process, making development faster and easier.</li> - <li><a href="https://github.com/mi-g/weh">WebExtensions Helper</a> speeds up browser extension development by providing utilities for WebExtensions-based (Firefox, Chrome, Opera and Edge) extensions</li> - <li><a href="https://github.com/yeoman/generator-chrome-extension">Chrome Extension generator </a>creates everything you need to get started with extension development. You can choose Browser UI(Browser,Page Action, Omnibox) type and select permissions you need.</li> - <li><a href="http://extensionizr.com/">Extensionizr</a> is a wizard that helps you create a basic extension</li> - <li><a href="https://github.com/mahemoff/chrome-boilerplate">Chrome Boilerplate</a> is boilerplate code for Chrome WebE<span class="col-11 mr-2 text-gray-dark">xtension.</span></li> - <li><a href="https://github.com/sitepoint/ChromeSkel_a">Skeleton Chrome Extension</a> is an extension bootstrap and template</li> -</ul> - -<h2 id="Documentação">Documentação</h2> - -<ul> - <li><a href="https://wiki.mozilla.org/Add-ons/developer/communication">WebExtensions Project Page</a> on the Mozilla Wiki</li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions">How-to guides</a> covering common extension developer cases, like <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests">intercepting web requests</a> and <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Add_a_button_to_the_toolbar">adding a button to the toolbar</a></li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK">Comparison with the Add-on SDK</a></li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_XUL_XPCOM_extensions">Comparison with XUL/XPCOM extensions</a></li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs">Browser compatibility table</a> for all WebExtensions APIs</li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples">Examples of extensions</a></li> -</ul> - -<h2 id="Contactar">Contactar</h2> - -<ul> - <li> - <p>Pode utilizar as hiperligações <a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Add-ons#Contacte-nos">aqui</a> para obter ajuda, manter-se atualizado com as novidades sobre os extras, e dar-nos a sua opinião.</p> - </li> -</ul> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/exemplos_extensoes/index.html b/files/pt-pt/mozilla/add-ons/webextensions/examples/index.html index 4a68068c6a..9e00250f9f 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/exemplos_extensoes/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/examples/index.html @@ -1,9 +1,10 @@ --- title: Exemplos de extensões -slug: Mozilla/Add-ons/WebExtensions/Exemplos_extensoes +slug: Mozilla/Add-ons/WebExtensions/Examples tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/Examples +original_slug: Mozilla/Add-ons/WebExtensions/Exemplos_extensoes --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/extensão_das_ferramentas_de_desenvolvimento/index.html b/files/pt-pt/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html index dc98e7fd37..ac5e8d664e 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/extensão_das_ferramentas_de_desenvolvimento/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html @@ -1,7 +1,8 @@ --- title: Extensão das ferramentas de desenvolvimento -slug: Mozilla/Add-ons/WebExtensions/Extensão_das_ferramentas_de_desenvolvimento +slug: Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools translation_of: Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools +original_slug: Mozilla/Add-ons/WebExtensions/Extensão_das_ferramentas_de_desenvolvimento --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/extennsoesweb_e_a_id_do_extra/index.html b/files/pt-pt/mozilla/add-ons/webextensions/extennsoesweb_e_a_id_do_extra/index.html deleted file mode 100644 index a462a1c02d..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/extennsoesweb_e_a_id_do_extra/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Extensões e a Id. do extra -slug: Mozilla/Add-ons/WebExtensions/ExtennsoesWeb_e_a_id_do_extra -tags: - - Extensões da Web - - WebExtensions -translation_of: Mozilla/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID ---- -<div>{{AddonSidebar}}</div> - -<div class="summary"> -<p>Os extras do Firefox contêm uma Id. única que é utilziada para distinguir este extra de qualquer outro extra do Firefox.</p> - -<p>Este artigo descreve como as Ids. de extra são tratados para as extensões criadas com APIs WebExtensions.</p> -</div> - -<p>Firefox add-ons contain a unique identifier which is used both inside Firefox itself and on the <a href="https://addons.mozilla.org/">addons.mozilla.org</a> (AMO) website. For example, it's used by Firefox to check for updates to installed add-ons and to identify which objects (such as data stores) are controlled by this add-on.</p> - -<p>With older types of Firefox add-on, the add-on developer must set the add-on ID explicitly. XUL/XPCOM add-ons set the ID in the <a href="/en-US/docs/Mozilla/Add-ons/Install_Manifests">install manifest</a>, while SDK add-ons set it in the <a href="/en-US/docs/Mozilla/Add-ons/SDK/Tools/package_json">package.json</a>.</p> - -<p>However, from Firefox 48 you can develop, debug, publish, and update extensions without needing to set an explicit ID at all.</p> - -<div class="note"> -<p>Note that the ability to develop and debug WebExtensions that don't include an ID is new in Firefox 48. If you need to use an earlier version of Firefox, then you must use the <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></code> key to set an ID explicitly.</p> -</div> - -<h2 id="Basic_workflow_with_no_add-on_ID">Basic workflow with no add-on ID</h2> - -<p>Extensions can explicitly set the add-on ID using the <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></code> key in manifest.json. However, this key is usually optional. If you don't set it, then you can usually develop, debug, publish, and update your extension without ever having to deal with an ID. One advantage of this is that Google Chrome does not recognize the <code>applications</code> key and will show a warning if you include it.</p> - -<p>Note, though, that some WebExtension APIs use the add-on ID and expect it to be the same from one browser session to the next. If you use these APIs in Firefox, then you must set the ID explicitly using the <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></code> key. See <a href="/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>.</p> - -<h3 id="Developing_and_debugging">Developing and debugging</h3> - -<p>Starting in Firefox 48, if your manifest.json does not contain an ID then the extension will be assigned a randomly-generated temporary ID when you <a href="/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox">install it in Firefox</a> through about:debugging. If you then reload the extension using the "Reload" button, the same ID will be used. If you then restart Firefox and load the add-on again, it will get a new ID.</p> - -<p>If you turn the extension into an .xpi or .zip and install it through about:addons, it will not work. To have it work in this scenario, you will need to add in the <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></code> key in manifest.json</p> - -<h3 id="Publishing">Publishing</h3> - -<p>Once you have finished developing the extension, you can <a href="/en-US/Add-ons/WebExtensions/Publishing_your_WebExtension">package it and submit it to AMO for review and signing</a>. If the packaged extension you upload does not contain an ID, AMO will generate one for you. It's only at this point that the add-on will be assigned a permanent ID, which will be embedded in the signed packaged extension.</p> - -<p>Note that once an extension has been given a permanent ID, you can't then update it to use the Add-on SDK or legacy XUL/XPCOM techniques. If you do switch to one of these platforms, you must submit it as a distinct new add-on, with a new ID.</p> - -<h3 id="Updating">Updating</h3> - -<p>Even after this point, though, you don't generally have to deal with the ID at all. You can continue to develop the add-on without an ID, and when you want to update, upload the new version by visiting the add-on's AMO page. Because you are uploading the add-on through that page, AMO knows that this is an update to this particular add-on, even though it doesn't contain an ID.</p> - -<div class="note"> -<p>It's essential with this workflow that you update the add-on <em>manually using its page on AMO</em>, otherwise AMO will not understand that the submission is an update to an existing add-on, and will treat the update as a brand-new add-on.</p> -</div> - -<p>You can do the same thing if you are updating from an older add-on type, such as a XUL/XPCOM add-on, to use WebExtensions APIs. Just visit the old add-on's page on AMO, upload the new extension there, and it will be treated as an update to the old version.</p> - -<h2 id="Quando_é_que_precisa_de_uma_Id._de_extra">Quando é que precisa de uma Id. de extra?</h2> - -<ul> - <li>If you are loading the add-on from its XPI file, are not loading it temporarily using about:debugging and it is not signed.</li> - <li>If you use <a href="https://addons-server.readthedocs.io/en/latest/topics/api/signing.html">AMO's API</a> for uploading your add-on, rather than uploading it manually on its page, then you need to include the add-on's ID in the request.</li> - <li>Some WebExtension APIs use the add-on ID and expect it to be the same from one browser session to the next. If you use these APIs, then you must set the ID explicitly using the <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/applications">applications</a></code> key. This applies to the following APIs: - <ul> - <li>{{WebExtAPIRef("storage.managed")}}</li> - <li>{{WebExtAPIRef("storage.sync")}}</li> - <li>{{WebExtAPIRef("identity.getRedirectURL")}}</li> - <li><a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging">Native messaging</a></li> - <li>{{WebExtAPIRef("pkcs11")}}</li> - <li>{{WebExtAPIRef("runtime.onMessageExternal")}}</li> - <li>{{WebExtAPIRef("runtime.onConnectExternal")}}</li> - </ul> - </li> - <li>Using Firefox for Android. See <a href="/en-US/Add-ons/WebExtensions/manifest.json/applications">applications in manifest.json</a>.</li> -</ul> - -<p> </p> - -<p> </p> - -<p> </p> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/instalacao_temporaria_no_firefox/index.html b/files/pt-pt/mozilla/add-ons/webextensions/instalacao_temporaria_no_firefox/index.html deleted file mode 100644 index 47730abceb..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/instalacao_temporaria_no_firefox/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: Instalação temporária no Firefox -slug: Mozilla/Add-ons/WebExtensions/Instalacao_temporaria_no_Firefox -tags: - - Extensões da Web -translation_of: Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox ---- -<div>{{AddonSidebar}}</div> - -<p>Este artigo descreve como um programador de extra (add-on) pode instalar temporariamente uma extensão no Firefox para testes e depuração. A extensão permanecerá instalada até que reinicie o Firefox. Pode utilizar este método com qualquer tipo de extensão sem reinício, incluindo as <a href="/pt-PT/docs/Archive/Add-ons/Extensoes_bootstrapped">extensões bootstrapped</a> e <a href="/pt-PT/Add-ons/SDK">extras de Add-on SDK</a>.</p> - -<p>Note that this is <em>not</em> how end users should install add-ons in Firefox. End users will install add-ons by downloading and opening packaged add-ons that have been signed by Mozilla. To learn how an extension developer can get an add-on packaged and signed, see <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Publishing_your_WebExtension">Publishing your extension</a>.</p> - -<p>To install an extension temporarily:</p> - -<ul> - <li>open Firefox</li> - <li>enter "about:debugging" in the URL bar</li> - <li>click "Load Temporary Add-on"</li> - <li>open the extension's directory and select any file inside the extension.</li> -</ul> - -<p>The extension will be installed, and will stay installed until you restart Firefox.</p> - -<p>{{EmbedYouTube("cer9EUKegG4")}}</p> - -<h2 id="Recarregar_uma_extensão_temporária">Recarregar uma extensão temporária</h2> - -<p>Starting in Firefox 48, there's a new button labeled "Reload" next to the extension's entry in about:debugging:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/13462/reload.png" style="display: block; height: 544px; margin-left: auto; margin-right: auto; width: 848px;">This does what it says:</p> - -<ul> - <li>reloading any persistent scripts, such as <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Background_scripts">background scripts</a></li> - <li>parsing the <code>manifest.json</code> file again, so changes to <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permissions</a></code>, <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts">content_scripts</a></code>, <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action">browser_action</a></code> or any other keys will take effect.</li> -</ul> - -<p>{{EmbedYouTube("NuajE60jfGY")}}</p> - -<div class="note"> -<p>Note that in Firefox 48 only, "Reload" does not update the extension's name and description that are displayed in about:debugging and about:addons. This is fixed in Firefox 49.</p> -</div> - -<h2 id="Utilizar_a_linha_de_comando">Utilizar a linha de comando</h2> - -<p>If you are already using the command line for development, check out the <a href="/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext">web-ext</a> tool. It automates the temporary installation step and automatically reloads your extension when its source code changes.</p> - -<h2 id="Detetar_instalaçao_temporária">Detetar instalaçao temporária</h2> - -<p>Your extension can detect whether it was installed from about:debugging rather than as a built and signed extension downloaded from <a href="https://addons.mozilla.org">addons.mozilla.org</a>. Listen for the {{WebExtAPIRef("runtime.onInstalled")}} event, and check the value of <code>details.temporary</code>.</p> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interceptar_pedidos_http/index.html b/files/pt-pt/mozilla/add-ons/webextensions/intercept_http_requests/index.html index b938b514d4..fef2c0534f 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interceptar_pedidos_http/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/intercept_http_requests/index.html @@ -1,12 +1,13 @@ --- title: Interceptar Pedidos HTTP -slug: Mozilla/Add-ons/WebExtensions/Interceptar_Pedidos_HTTP +slug: Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests tags: - Add-ons - Como-fazer - Extensões - ExtensõesWeb translation_of: Mozilla/Add-ons/WebExtensions/Intercept_HTTP_requests +original_slug: Mozilla/Add-ons/WebExtensions/Interceptar_Pedidos_HTTP --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icones/index.html b/files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icons/index.html index c9fd687771..66eb369f78 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icones/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/manifest.json/icons/index.html @@ -1,11 +1,12 @@ --- title: Ícones (icons) -slug: Mozilla/Add-ons/WebExtensions/manifest.json/icones +slug: Mozilla/Add-ons/WebExtensions/manifest.json/icons tags: - Extensões - Extensões da Web - Extras translation_of: Mozilla/Add-ons/WebExtensions/manifest.json/icons +original_slug: Mozilla/Add-ons/WebExtensions/manifest.json/icones --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/dubla_padrões/index.html b/files/pt-pt/mozilla/add-ons/webextensions/match_patterns/index.html index 8c0f5e3480..e7330b3010 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/dubla_padrões/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/match_patterns/index.html @@ -1,7 +1,8 @@ --- title: dubla padrões em extensão manifestos -slug: Mozilla/Add-ons/WebExtensions/dubla_padrões +slug: Mozilla/Add-ons/WebExtensions/Match_patterns translation_of: Mozilla/Add-ons/WebExtensions/Match_patterns +original_slug: Mozilla/Add-ons/WebExtensions/dubla_padrões --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/primeiros_passos_com_web-ext/index.html b/files/pt-pt/mozilla/add-ons/webextensions/primeiros_passos_com_web-ext/index.html deleted file mode 100644 index a6eb21ffc1..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/primeiros_passos_com_web-ext/index.html +++ /dev/null @@ -1,304 +0,0 @@ ---- -title: Primeiros passos com web-ext -slug: Mozilla/Add-ons/WebExtensions/Primeiros_passos_com_web-ext -tags: - - Extensão da Web - - Ferramentas - - Guía - - Instalação - - Testes - - empacotamento - - web-ext -translation_of: Mozilla/Add-ons/WebExtensions/Getting_started_with_web-ext ---- -<div>{{AddonSidebar}}</div> - -<p class="summary">web-ext é uma ferramenta da linha de comando desenhada para acelerar várias partes do processo de desenvolvimento da extensão, tornado o desenvolvimento mais rápido e fácil. Este artigo explica como instalar e utilizar web-ext.</p> - -<h2 id="Instalação">Instalação</h2> - -<p>web-ext is a node-based application that you install with the <a href="https://nodejs.org/">nodejs/npm</a> tool. Install web-ext using the following command:</p> - -<pre class="brush: bash"><code>npm install --global web-ext</code></pre> - -<p>web-ext requires the current <a href="https://github.com/nodejs/Release#release-schedule">LTS</a> (long-term support) version of <a href="https://nodejs.org/">NodeJS</a>.</p> - -<p>To test whether the installation worked run the following command, which displays the web-ext version number:</p> - -<pre class="brush: bash"><code>web-ext --version</code></pre> - -<h2 id="Utilizar_web-ext">Utilizar web-ext</h2> - -<p>Before you start using web-ext, locate an example extension to use—if you don't have one, use one from the <a href="https://github.com/mdn/webextensions-examples">webextensions-examples</a> repo.</p> - -<h3 id="Testar_uma_extensão">Testar uma extensão</h3> - -<p>Test an extension in Firefox by <code>cd</code>'ing into your extension's root directory and entering:</p> - -<pre class="brush: bash"><code>web-ext run</code></pre> - -<p>This starts Firefox and loads the extension temporarily in the browser, just as you can on the <a href="/en-US/docs/Tools/about:debugging#Add-ons">about:debugging page</a>.</p> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run">run reference guide</a> to learn more.</p> - -<h3 id="Recarregamento_automático_da_extensão">Recarregamento automático da extensão</h3> - -<p>The <code>run</code> command watches your source files and tells Firefox to reload the extension after you edit and save a file. For example, if you changed the <code>name</code> property in your <code>manifest.json</code> file, Firefox displays the new name. This makes it easy to try out new features because you can see the effect immediately. The automatic reloading feature is active by default, you use it like this:</p> - -<pre class="brush: bash"><code>web-ext run</code></pre> - -<p>You can also press the <code>r</code> key in the <code>web-ext</code> terminal to trigger an extension reload.</p> - -<p>If you experience unexpected behavior with the reloading feature, please <a href="https://github.com/mozilla/web-ext/issues">file a bug</a>. You can also disable reloading like this:</p> - -<pre class="brush: bash"><code>web-ext run --no-reload</code></pre> - -<div class="note"> -<p>O reccaregamento da extensão só é suportado a paratir da versão do Firefox 49 ou superior .</p> -</div> - -<h3 id="Testar_em_versões_diferentes_do_Firefox">Testar em versões diferentes do Firefox</h3> - -<p>To run your extension in a version of <a href="https://www.mozilla.org/en-US/firefox/">Firefox Desktop</a> other than the default, use the <code>--firefox</code> option to specify a full path to the binary file. Here is an example for Mac OS:</p> - -<pre class="brush: bash">web-ext run --firefox=/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin</pre> - -<p>On Windows, the path needs to include <code>firefox.exe</code>, for example:</p> - -<pre class="brush: bash">web-ext run --firefox="C:\Program Files\Mozilla Firefox\firefox.exe"</pre> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run">run command</a> reference to learn more.</p> - -<h3 id="Testar_no_Firefox_48">Testar no Firefox 48</h3> - -<p>Firefox 48 was the first stable version to use the WebExtension platform, but it doesn't allow <code>web-ext</code> to install an extension remotely. You need to run your extension in Firefox 48 using:</p> - -<pre class="brush: bash">web-ext run --pre-install</pre> - -<h3 id="Testar_no_Firefox_para_Android">Testar no Firefox para Android</h3> - -<p>To run your extension in <a href="https://www.mozilla.org/en-US/firefox/mobile/">Firefox for Android</a>, follow these instructions to <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Developing_WebExtensions_for_Firefox_for_Android#Set_up_your_computer_and_Android_emulator_or_device">set up your computer and device</a>.</p> - -<p>With your device connected to your development computer, run:</p> - -<pre class="brush: bash">web-ext run --target=firefox-android</pre> - -<p>This command displays the device ID for your connected Android device or devices. If you don't see a list of device IDs, make sure you set up the device for development correctly.</p> - -<p><span style="background-color: #ffffff;">N</span>ow, add the device ID to the command:</p> - -<pre class="brush: bash">web-ext run --target=firefox-android --android-device=<device ID></pre> - -<p>If you've multiple versions of Firefox installed, you may need to choose a specific version. For example:</p> - -<pre class="brush: bash">web-ext run --target=firefox-android ... --firefox-apk=org.mozilla.firefox</pre> - -<p>The first time you run this command, you may need to grant Android permissions for the APK. This is because the command needs read / write access to the device storage, so that Firefox for Android can run on a temporary profile. The <code>web-ext</code> output guides you in how to grant these permissions.</p> - -<p>The <code>web-ext</code> command does not alter any of your existing Firefox for Android preferences or data. To see more information about how <code>web-ext</code> is interacting with your device, run the command with <code>--verbose</code>.</p> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run">run command</a> reference to learn more.</p> - -<h3 id="Depurar_no_Firefox_para_Android">Depurar no Firefox para Android</h3> - -<p>When using <code>web-ext run</code> to test an extension on Firefox for Android, you'll notice a message like this in the console output:</p> - -<pre>You can connect to this Android device on TCP port 51499 -</pre> - -<p>This is a remote debugger port that you can <a href="/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android#Connecting">connect to with Firefox's developer tools</a>. In this case, you'd connect to host <code>localhost</code> on port <code>51499</code>.</p> - -<p>See <a href="/en-US/Add-ons/WebExtensions/Developing_WebExtensions_for_Firefox_for_Android#Debug_your_extension">this guide</a> for more information about debugging an extension on Firefox for Android.</p> - -<h3 id="Testar_extensões_não_assinadas">Testar extensões não assinadas</h3> - -<p>When you execute <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run">web-ext run</a>, the extension gets installed temporarily until you close Firefox. This does not violate any signing restrictions. If instead you create a zip file with <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_build">web-ext build</a> and try to install it into Firefox, you will see an error telling you that the add-on is not signed. You will need to use an <a href="https://wiki.mozilla.org/Addons/Extension_Signing#Unbranded_Builds">unbranded build</a> or use a <a href="https://www.mozilla.org/en-US/firefox/developer/">development build</a> to install unsigned extensions.</p> - -<h3 id="Utilizar_um_perfil_personalizado">Utilizar um perfil personalizado</h3> - -<p>By default, the <code>run</code> command will create a temporary Firefox profile. To run your extension with a specific profile use the <code>--firefox-profile</code> option, like this:</p> - -<pre class="brush: bash">web-ext run --firefox-profile=your-custom-profile</pre> - -<p>This option accepts a string containing the name of your profile or an absolute path to the profile directory. This is helpful if you want to manually configure some settings that will always be available to the <code>run</code> command.</p> - -<h3 id="Manter_alterações_de_perfil">Manter alterações de perfil</h3> - -<p>The <code>run</code> command does not save any changes made to the custom profile specified by <code>--firefox-profile</code>. To keep changes, add this option:</p> - -<pre class="brush: bash">web-ext run --keep-profile-changes --firefox-profile=your-custom-profile</pre> - -<p>This may be helpful if your extension has many different run states.</p> - -<div class="warning"> -<p>This option makes the profile specified by <code>--firefox-profile</code> completely insecure for daily use. It turns off auto-updates and allows silent remote connections, among other things. Specifically, it will make destructive changes to the profile that are required for <code>web-ext</code> to operate.</p> -</div> - -<h3 id="Empacotar_a_sua_extensão">Empacotar a sua extensão</h3> - -<p>Once you've tested your extension and verified that it's working, you can turn it into a package for submitting to <a href="https://addons.mozilla.org">addons.mozilla.org</a> using the following command:</p> - -<pre class="brush: bash"><code>web-ext build</code></pre> - -<p>This outputs a full path to the generated <code>.zip</code> file that can be loaded into a browser.</p> - -<div class="warning"> -<p>The generated <code>.zip</code> file doesn't work on Firefox without signing or adding <code><a href="/en-US/Add-ons/WebExtensions/manifest.json/applications">applications</a>.gecko.id</code> key into <code><a href="/en-US/Add-ons/WebExtensions/manifest.json">manifest.json</a></code>. For more information, please refer <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID">WebExtensions and the Add-on ID</a> page.</p> -</div> - -<p><code>web-ext build</code> is designed to ignore files that are commonly not wanted in packages, such as <code>.git</code>, <code>node_modules</code>, and other artifacts.</p> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_build">build reference guide</a> to learn more.</p> - -<h3 id="Assinar_a_sua_extensão_para_distribuição">Assinar a sua extensão para distribuição</h3> - -<p>As an alternative to publishing your extension on <a href="https://addons.mozilla.org/">addons.mozilla.org</a>, you can self-host your package file but it needs to be <a href="https://developer.mozilla.org/Add-ons/Distribution">signed by Mozilla</a> first. The following command packages and signs a ZIP file, then returns it as a signed XPI file for distribution:</p> - -<pre class="brush: bash"><code>web-ext sign --api-key=$AMO_JWT_ISSUER --api-secret=$AMO_JWT_SECRET </code></pre> - -<p>The API options are required to specify your <a href="https://addons.mozilla.org/en-US/developers/addon/api/key/">addons.mozilla.org credentials</a>.</p> - -<ul> - <li><code>--api-key</code>: the API key (JWT issuer) from <code>addons.mozilla.org</code> needed to sign the extension. This is a string that will look something like <code>user:12345:67</code>.</li> - <li><code>--api-secret</code>: the API secret (JWT secret) from <code>addons.mozilla.org</code> needed to sign the extension. This is a string that will look something like <code>634f34bee43611d2f3c0fd8c06220ac780cff681a578092001183ab62c04e009</code>.</li> -</ul> - -<p>See the <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_sign">sign reference guide</a> to learn more.</p> - -<h3 id="Assinar_as_extensões_sem_uma_Id._explicita">Assinar as extensões sem uma Id. explicita</h3> - -<p><code>web-ext</code> supports signing extensions that do not declare the <a href="/en-US/Add-ons/WebExtensions/manifest.json/applications">applications.gecko.id</a> property in their manifest. The first time you sign an extension without an explicit ID, <a href="https://addons.mozilla.org/">addons.mozilla.org</a> will generate an ID and <code>web-ext</code> will save it to <code>.web-extension-id</code> in the working directory. You should save the ID file so that you can sign future versions of the same extension. If you lose the ID file, you will have to add back the <code>applications.gecko.id</code> property or use the <code>--id</code> option when signing, for example:</p> - -<pre class="brush: bash"><code>web-ext sign --api-key=... --api-secret=... --id="</code>{c23c69a7-f889-447c-9d6b-7694be8035bc}<code>"</code></pre> - -<h3 id="Assinar_num_ambiente_restringido">Assinar num ambiente restringido</h3> - -<p>If you're working in an environment that restricts access to certain domains, you can try using a proxy when signing:</p> - -<pre class="brush: bash"><code>web-ext sign --api-key=... --api-secret=... --api-proxy=https://yourproxy:6000</code></pre> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#--api-proxy">--api-proxy</a> option to learn more.</p> - -<p>The following domains are used for signing and downloading files:</p> - -<ul> - <li><code>addons.mozilla.org</code></li> - <li><code>addons.cdn.mozilla.net</code></li> -</ul> - -<h3 id="Verificar_com_o_código_lint">Verificar com o código "lint"</h3> - -<p>Before trying out your extension with the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_run">run</a> command or submitting your package to <a href="https://addons.mozilla.org/en-US/firefox/">addons.mozilla.org</a>, use the <code>lint</code> command to make sure your <a href="/en-US/Add-ons/WebExtensions/manifest.json">manifest</a> and other source files do not contain any errors. Example:</p> - -<pre class="brush: bash">web-ext lint</pre> - -<p>This uses the <a href="https://github.com/mozilla/addons-linter">addons-linter</a> library to walk through your source code directory and report any errors, such as the declaration of an unknown permission.</p> - -<p>See the <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_lint">lint reference guide</a> to learn more.</p> - -<h3 id="Definindo_as_predefinições_de_opção_num_ficheiro_de_configuração">Definindo as predefinições de opção num ficheiro de configuração</h3> - -<p>You can specify <code>--config=my-config.js</code> to set default values for any option. Here is an example with the <code>build</code> command:</p> - -<pre class="brush: bash">web-ext --config=my-config.js build</pre> - -<p>The file should be a CommonJS module <a href="https://nodejs.org/docs/latest/api/modules.html#modules_modules">as understood by NodeJS</a> and must export each configuration value. Here is how you would set the default value of <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#--verbose_-v">--verbose</a> to <code>true</code>:</p> - -<pre class="brush: javascript">module.exports = { - verbose: true, -};</pre> - -<p>If you want to specify options that only apply to a specific command, you nest the configuration under the command name. Here is an example of adding configuration for <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#--overwrite-dest_-o">--overwrite-dest</a> that only applies to the <code>build</code> command as well as <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#--firefox_-f">--firefox</a> that only applies to the <code>run</code> command:</p> - -<pre class="brush: javascript">module.exports = { - // Global options: - verbose: true, - // Command options: - build: { - overwriteDest: true, - }, - run: { - firefox: 'nightly', - }, -};</pre> - -<p>To create a configuration key for a command line option, you remove the preceding dashes and convert the name to camel case. As you can see from this example, <code>--overwrite-dest</code> was converted to <code>overwriteDest</code>.</p> - -<p>If an option can be specified multiple times on the command line then you define it as an array. For example, here is how to specify multiple <a href="/en-US/Add-ons/WebExtensions/web-ext_command_reference#--ignore-files_-i">--ignore-files</a> patterns:</p> - -<pre class="brush: javascript">module.exports = { - ignoreFiles: [ - 'package-lock.json', - 'yarn.lock', - ], -};</pre> - -<h3 id="Automatic_discovery_of_configuration_files">Automatic discovery of configuration files</h3> - -<p><code>web-ext</code> will load existing configuration files in the following order:</p> - -<ul> - <li>A config file named <code>.web-ext-config.js</code> in your home directory, for example: - - <ul> - <li>On Windows: <code>C:\Users\<username>\.web-ext-config.js</code></li> - <li>On macOS: <code>/Users/<username>/.web-ext-config.js</code></li> - <li>On Linux: <code>/home/<username>/.web-ext-config.js</code></li> - </ul> - </li> - <li>A config file named <code>web-ext-config.js</code> in the current directory.</li> -</ul> - -<p>If a home directory config and a local directory config define the same option, the value from the latter file will be used.</p> - -<p>To disable automatic loading of configuration files, set this option:</p> - -<pre class="brush: bash">web-ext --no-config-discovery run</pre> - -<p>To diagnose an issue related to config files, re-run your command with <code>--verbose</code>. This will tell you which config file affected which option value.</p> - -<h3 id="Specifying_different_source_and_destination_directories">Specifying different source and destination directories</h3> - -<p>The preceding commands use default directories for the extension source and artifact creation (for example, built <code>.zip</code> files). The defaults are:</p> - -<ul> - <li>Source: The directory you are in.</li> - <li>Artifacts: A directory called <code>./web-ext-artifacts</code>, created inside the current directory.</li> -</ul> - -<p>You can specify different source and destination directories using the <code>--source-dir</code> and <code>--artifacts-dir</code> options when running your commands. Their values can be relative or absolute paths, but must always be specified as strings. Here is an example of specifying both options when building an extension:</p> - -<pre class="brush: bash"><code>web-ext build --source-dir=webextension-examples/notify-link-clicks-i18n --artifacts-dir=zips</code></pre> - -<h3 id="Outputting_verbose_messages">Outputting verbose messages</h3> - -<p>To see in detail what web-ext is doing when you run a command, include the <code>--verbose</code> option. For example:</p> - -<pre class="brush: bash"><code>web-ext build --verbose</code></pre> - -<h3 id="Viewing_all_commands_and_options">Viewing all commands and options</h3> - -<p>You can list all commands and options like this:</p> - -<pre class="brush: bash"><code>web-ext --help</code></pre> - -<p>You can list options for a specific command by adding it as an argument:</p> - -<pre class="brush: bash"><code>web-ext --help run</code></pre> - -<h3 id="Detecting_temporary_installation">Detecting temporary installation</h3> - -<p>Your extension can detect whether it was installed using <code>web-ext run</code>, rather than as a built and signed extension downloaded from <code>addons.mozilla.org</code>. Listen for the {{WebExtAPIRef("runtime.onInstalled")}} event and check the value of <code>details.temporary</code>.</p> - -<h3 id="Using_web-ext_from_a_script">Using web-ext from a script</h3> - -<p>You can use <code>web-ext</code> as a <code>NodeJS</code> module. Here is <a href="https://github.com/mozilla/web-ext#using-web-ext-in-nodejs-code">more information</a>, with example code.</p> - -<h2 id="Consulte_também">Consulte também</h2> - -<ul> - <li><a class="external external-icon" href="https://github.com/mozilla/web-ext">web-ext repo</a></li> - <li> - <p><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference">web-ext command reference</a></p> - </li> -</ul> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/publicar_a_sua_extensao/index.html b/files/pt-pt/mozilla/add-ons/webextensions/publicar_a_sua_extensao/index.html deleted file mode 100644 index acc5d21d53..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/publicar_a_sua_extensao/index.html +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Publicar a sua extensão -slug: Mozilla/Add-ons/WebExtensions/Publicar_a_sua_extensao -tags: - - Extensões da Web -translation_of: Mozilla/Add-ons/WebExtensions/Package_your_extension_ ---- -<div>{{AddonSidebar}}</div> - -<p> </p> - -<div class="pull-aside"> -<div class="moreinfo"> -<p>Packaged extensions in Firefox are called "XPI files", which are ZIP files with a different extension.</p> - -<p>You don't have to use the XPI extension when uploading to AMO.</p> -</div> -</div> - -<p> </p> - -<p>During development, your extension will consist of a directory containing a manifest.json file and the other files it needs—scripts, icons, HTML documents, and so on. You need to zip these into a single file for uploading to AMO.</p> - -<p>If you're using web-ext, use <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/web-ext_command_reference#web-ext_build">web-ext build </a>to package your extension. Otherwise, follow the instructions below for your chosen operating system.</p> - -<div class="note"> -<p><strong>Dica</strong>: The ZIP file must be a ZIP of the extension's files themselves, not of the directory containing them.</p> -</div> - -<h3 id="Windows">Windows</h3> - -<ol> - <li>Abra a pasta com os seus ficheiros da extensão.</li> - <li>Selecione todos os ficheiros.</li> - <li>Clique direito e escolha "Enviar para" → Pasta Comprimida (zipped).</li> -</ol> - -<p><img alt="" src="https://mdn.mozillademos.org/files/11949/install-windows.png" style="display: block; height: 576px; margin-left: auto; margin-right: auto; width: 800px;"></p> - -<h3 id="Mac_OS_X">Mac OS X</h3> - -<ol> - <li>Open the folder with your extension's files.</li> - <li>Select all of the files.</li> - <li>Right click and choose Compress <em>n</em> Items.</li> -</ol> - -<p><img alt="" src="https://mdn.mozillademos.org/files/11951/install-osx.png" style="display: block; height: 449px; margin-left: auto; margin-right: auto; width: 800px;"></p> - -<div class="pull-aside"> -<div class="moreinfo">See <a href="http://www.info-zip.org/mans/zip.html">http://www.info-zip.org/mans/zip.html</a>.</div> -</div> - -<h3 id="Linux_Mac_OS_X_Terminal">Linux / Mac OS X Terminal</h3> - -<ol> - <li>Open Terminal.</li> - <li>Open the directory containing your extension's files, using the command<br> - <code>cd path/to/<em>my-extension</em>/</code></li> - <li>ZIP the content of the directory, using the command<br> - <code>zip -r -FS ../<em>my-extension</em>.zip *</code></li> -</ol> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/trasnsferir_extensao_google_chrome/index.html b/files/pt-pt/mozilla/add-ons/webextensions/trasnsferir_extensao_google_chrome/index.html deleted file mode 100644 index 006ecce85c..0000000000 --- a/files/pt-pt/mozilla/add-ons/webextensions/trasnsferir_extensao_google_chrome/index.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Conversão de uma extensão do Google Chrome -slug: Mozilla/Add-ons/WebExtensions/Trasnsferir_extensao_Google_Chrome -tags: - - Extensões da Web -translation_of: Mozilla/Add-ons/WebExtensions/Porting_a_Google_Chrome_extension ---- -<div>{{AddonSidebar}}</div> - -<p>As extensões desenvolvidas com as APIs de Extensão da Web são preparadas para compatibilidade entre navegadores: em grande medida, a tecnologia é diretamente compatível com a <a class="external-icon external" href="https://developer.chrome.com/extensions">API de extensão</a> suportada pelo Google Chrome e Opera. As extensões escritas para estes navegadores irão, na maioria do casos, ser executadas no Firefox com apenas algumas alterações. Quase todas das <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API">APIs de extensão </a>são suportadas, utilizando as funções de chamada sob o espaço de nome <code>chrome</code>, o mesmo que Chrome. As únicas APIs que não são suportadas no nome de espaço <code>chrome</code> são aquelas que são intentionalmente incompatíveis com o Chrome. Nesses casos, a página da documentação de API irá declarar explicitamente que só é suportado no espaço do nome <code>browser</code> . O processo de transferir uma extensão do Chrome para Opera é como isto:</p> - -<ol> - <li>Reveja a sua utilização das funcionaldiades de manifest.json e APIs da Extensão da Web contra a <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities">referência de incompatibilidade do Chrome</a>. Se estiver a utilizar as funcionalidades ou APIs que ainda não são suportadas no Firefox, poderá não conseguir converter ainda a sua extensão. A Mozilla fornece um serviço que pode ajudar a automatizar este passo: <a href="https://www.extensiontest.com">Teste de Compatibilidade de Extensão para Firefox</a> (inglês).</li> - <li><a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Add-ons/WebExtensions/Instalacao_temporaria_no_Firefox">Instale a sua extensão no Firefox</a> e teste-a.</li> - <li>Se tiver quaisquer problemas, contacte-nos em <a href="https://mail.mozilla.org/listinfo/dev-addons">lista de endereços</a> ou <a href="irc://irc.mozilla.org/webextensions">#webextensions</a> no <a class="external external-icon" href="https://wiki.mozilla.org/IRC">IRC</a>.</li> - <li>Submeta o seu extra em <a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Add-ons/WebExtensions/Publicar_a_sua_extensao">AMO para assinar e distribuir</a>. </li> -</ol> - -<p>Se estava dependente da opção da linha de comando do Chrome para carregar uma extensão descompactada, consulte a ferramenta <a href="https://developer.mozilla.org/pt-PT/docs/Mozilla/Add-ons/WebExtensions/Primeiros_passos_com_web-ext">web-ext</a> que automatiza a instalação temporária no Firefox para desenvolvimento.</p> - -<ul> -</ul> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/ação_navegador/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_action/index.html index c5da78003b..421dffbb28 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/ação_navegador/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_action/index.html @@ -1,9 +1,10 @@ --- title: Botão da Barra de Ferramentas -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Ação_navegador +slug: Mozilla/Add-ons/WebExtensions/user_interface/Browser_action tags: - Extensão da Web translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Browser_action +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Ação_navegador --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/estilos_de_navegador/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_styles/index.html index bc2f1bd2da..233cf4ff31 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/estilos_de_navegador/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/browser_styles/index.html @@ -1,11 +1,12 @@ --- title: Estilos de navegador -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Estilos_de_navegador +slug: Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles tags: - Extensões - Extensões da Web - Extras translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Browser_styles +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Estilos_de_navegador --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/itens_do_menu_de_contexto/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/context_menu_items/index.html index 231a800bc3..bf69421558 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/itens_do_menu_de_contexto/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/context_menu_items/index.html @@ -1,10 +1,11 @@ --- title: Itens do menu de contexto -slug: >- - Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Itens_do_menu_de_contexto +slug: Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items +original_slug: >- + Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Itens_do_menu_de_contexto --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/devtools_panels/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/devtools_panels/index.html index a2bc9921ad..ffd1b942af 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/devtools_panels/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/devtools_panels/index.html @@ -1,12 +1,13 @@ --- title: Painéis das ferramentas de desenvolvimento -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/devtools_panels +slug: Mozilla/Add-ons/WebExtensions/user_interface/devtools_panels tags: - Extensões da Web - Guía - Interface do Utilizador - Principiante translation_of: Mozilla/Add-ons/WebExtensions/user_interface/devtools_panels +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/devtools_panels --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/paginas_de_extensão/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/extension_pages/index.html index 4bf94b9653..bea67ee60c 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/paginas_de_extensão/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/extension_pages/index.html @@ -1,7 +1,8 @@ --- title: Páginas de extensão -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Paginas_de_extensão +slug: Mozilla/Add-ons/WebExtensions/user_interface/Extension_pages translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Extension_pages +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Paginas_de_extensão --- <div>{{AddonSidebar()}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/index.html index 6ec29a7fcf..b18f1afd85 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/index.html @@ -1,11 +1,12 @@ --- title: Interface do utilizador -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador +slug: Mozilla/Add-ons/WebExtensions/user_interface tags: - Interface do Utilizador - Landing - WebExtensions translation_of: Mozilla/Add-ons/WebExtensions/user_interface +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/notificacoes/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/notifications/index.html index 5b38d4f29f..8c8c113425 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/notificacoes/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/notifications/index.html @@ -1,9 +1,10 @@ --- title: Notificações -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Notificacoes +slug: Mozilla/Add-ons/WebExtensions/user_interface/Notifications tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Notifications +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Notificacoes --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/omnibox/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/omnibox/index.html index c0f9f41dca..2470a05c32 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/omnibox/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/omnibox/index.html @@ -1,10 +1,11 @@ --- title: Sugestões da barra de endereço -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Omnibox +slug: Mozilla/Add-ons/WebExtensions/user_interface/Omnibox tags: - Extensões da Web - Interface do Utilizador translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Omnibox +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Omnibox --- <div>{{AddonSidebar()}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/options_pages/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/options_pages/index.html index b3bee11990..d3a560412f 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/options_pages/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/options_pages/index.html @@ -1,9 +1,10 @@ --- title: Página de opções -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Options_pages +slug: Mozilla/Add-ons/WebExtensions/user_interface/Options_pages tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Options_pages +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Options_pages --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/acoes_pagina/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/page_actions/index.html index 7093d3355c..57407bc175 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/acoes_pagina/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/page_actions/index.html @@ -1,10 +1,11 @@ --- title: Botão da barra de endereço -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Acoes_pagina +slug: Mozilla/Add-ons/WebExtensions/user_interface/Page_actions tags: - Extensões da Web - Interface do Utilizador translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Page_actions +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Acoes_pagina --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/popups/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/popups/index.html index 6bbf3f7ce8..043afd3ad5 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/popups/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/popups/index.html @@ -1,6 +1,6 @@ --- title: Janelas (Popups) -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Popups +slug: Mozilla/Add-ons/WebExtensions/user_interface/Popups tags: - Extensions - IU @@ -8,6 +8,7 @@ tags: - Janela - popup translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Popups +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Popups --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/barras_laterais/index.html b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/sidebars/index.html index 2cfa1800a7..02509b9229 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/interface_do_utilizador/barras_laterais/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/user_interface/sidebars/index.html @@ -1,9 +1,10 @@ --- title: Barras laterais -slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Barras_laterais +slug: Mozilla/Add-ons/WebExtensions/user_interface/Sidebars tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/user_interface/Sidebars +original_slug: Mozilla/Add-ons/WebExtensions/interface_do_utilizador/Barras_laterais --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/o_que_sao_webextensions/index.html b/files/pt-pt/mozilla/add-ons/webextensions/what_are_webextensions/index.html index c2d7ef5d71..ada2698b44 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/o_que_sao_webextensions/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/what_are_webextensions/index.html @@ -1,10 +1,11 @@ --- title: O que são extensões? -slug: Mozilla/Add-ons/WebExtensions/O_que_sao_WebExtensions +slug: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions tags: - Extensões - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions +original_slug: Mozilla/Add-ons/WebExtensions/O_que_sao_WebExtensions --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/e_a_seguir/index.html b/files/pt-pt/mozilla/add-ons/webextensions/what_next_/index.html index f16f7e619b..c4ac2a8348 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/e_a_seguir/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/what_next_/index.html @@ -1,11 +1,12 @@ --- title: E a seguir? -slug: Mozilla/Add-ons/WebExtensions/E_a_seguir +slug: Mozilla/Add-ons/WebExtensions/What_next_ tags: - Extensão da Web - Extensões - Principiante translation_of: Mozilla/Add-ons/WebExtensions/What_next_ +original_slug: Mozilla/Add-ons/WebExtensions/E_a_seguir --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/a_sua_primeira_extensao/index.html b/files/pt-pt/mozilla/add-ons/webextensions/your_first_webextension/index.html index 21b34f2e2c..2b711124ca 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/a_sua_primeira_extensao/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/your_first_webextension/index.html @@ -1,10 +1,11 @@ --- title: A sua primeira extensão -slug: Mozilla/Add-ons/WebExtensions/A_sua_primeira_extensao +slug: Mozilla/Add-ons/WebExtensions/Your_first_WebExtension tags: - Extensões da Web - Guía translation_of: Mozilla/Add-ons/WebExtensions/Your_first_WebExtension +original_slug: Mozilla/Add-ons/WebExtensions/A_sua_primeira_extensao --- <div>{{AddonSidebar}}</div> diff --git a/files/pt-pt/mozilla/add-ons/webextensions/a_sua_segunda_extensao/index.html b/files/pt-pt/mozilla/add-ons/webextensions/your_second_webextension/index.html index 503f2b4ae9..9d3c22efac 100644 --- a/files/pt-pt/mozilla/add-ons/webextensions/a_sua_segunda_extensao/index.html +++ b/files/pt-pt/mozilla/add-ons/webextensions/your_second_webextension/index.html @@ -1,9 +1,10 @@ --- title: A sua segunda extensão -slug: Mozilla/Add-ons/WebExtensions/A_sua_segunda_extensao +slug: Mozilla/Add-ons/WebExtensions/Your_second_WebExtension tags: - Extensões da Web translation_of: Mozilla/Add-ons/WebExtensions/Your_second_WebExtension +original_slug: Mozilla/Add-ons/WebExtensions/A_sua_segunda_extensao --- <div>{{AddonSidebar}} <p>Se já leu o artigo da <a href="/pt-PT/Add-ons/WebExtensions/A_sua_primeira_extensao">A sua primeira extens</a>ão, já tem uma ideia de como escrever uma extensão. Neste artigo, nós iremos escrever uma extensão um pouco mais complexa que demonstra algumas mais das APIs. <br> |