diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:50:24 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:50:24 +0100 |
commit | 2c2df5ea01eb5cd8b9ea226b2869337e59c5fe3e (patch) | |
tree | 86ab4534d10092b293d4b7ab169fe1a8a2421bfa /files/pt-pt/plugins | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-2c2df5ea01eb5cd8b9ea226b2869337e59c5fe3e.tar.gz translated-content-2c2df5ea01eb5cd8b9ea226b2869337e59c5fe3e.tar.bz2 translated-content-2c2df5ea01eb5cd8b9ea226b2869337e59c5fe3e.zip |
unslug pt-pt: move
Diffstat (limited to 'files/pt-pt/plugins')
-rw-r--r-- | files/pt-pt/plugins/ativacao_de_flash_colon__comparacao_de_navegador/index.html | 146 | ||||
-rw-r--r-- | files/pt-pt/plugins/flash_to_html5/index.html (renamed from files/pt-pt/plugins/flash_para_html5/index.html) | 0 |
2 files changed, 0 insertions, 146 deletions
diff --git a/files/pt-pt/plugins/ativacao_de_flash_colon__comparacao_de_navegador/index.html b/files/pt-pt/plugins/ativacao_de_flash_colon__comparacao_de_navegador/index.html deleted file mode 100644 index e804f3a3f9..0000000000 --- a/files/pt-pt/plugins/ativacao_de_flash_colon__comparacao_de_navegador/index.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: 'Ativação de Flash: Comparação de Navegador' -slug: 'Plugins/Ativacao_de_Flash:_comparacao_de_navegador' -tags: - - Como - - Flash - - Principiante - - compatibilidade de navegador -translation_of: 'Plugins/Flash_Activation:_Browser_Comparison' ---- -<p>Cada um dos principais navegadores implementou uma funcionalidade onde o conteúdo do Adobe Flash não é executado por predefinição, mas cada um dos navegadores implementou essa funcionalidade e a interface do utilizador de maneiras ligeiramente diferentes. Este guia irá ajudar a descrever as semelhanças e as diferenças entre os navegadores, para que os programadores da Web possam oferecer a melhor experiência ao utilizador. Está disponível outro guia para assistir os autores do site da Web em <a href="/pt-PT/docs/Plugins/Flash_para_HTML5">migrating away from Flash</a>.</p> - -<p>In each browser, the decision to enable Flash is made by users on a per-site basis. When a site attempts to use Flash, the browser will prompt the user in some way and give the user an opportunity to enable Flash for that site. Flash-blocking extensions are no longer necessary because this functionality is now built into the browser.</p> - -<table class="fullwidth-table"> - <thead> - <tr> - <td> </td> - <th scope="col">Mozilla Firefox</th> - <th scope="col">Google Chrome</th> - <th scope="col">Microsoft Edge</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">Setting Name</th> - <td>Ask to activate</td> - <td>HTML5 by default</td> - <td>Click-to-run</td> - </tr> - <tr> - <th scope="row">'application/x-shockwave-flash' in navigator.mimeTypes by default when Flash is inactive</th> - <td>yes</td> - <td>no</td> - <td>no</td> - </tr> - <tr> - <th scope="row">'application/x-shockwave-flash' in navigator.mimeTypes when user enables Flash</th> - <td>yes</td> - <td>yes</td> - <td>yes</td> - </tr> - <tr> - <th scope="row"><object> with fallback content triggers UI</th> - <td>yes, with exceptions</td> - <td>no</td> - <td>yes</td> - </tr> - <tr> - <th scope="row">small/hidden Flash triggers additional UI</th> - <td>yes</td> - <td>no</td> - <td>no</td> - </tr> - <tr> - <th scope="row">Enabling Flash automatically reloads the page</th> - <td>no</td> - <td>yes</td> - <td>yes</td> - </tr> - <tr> - <th scope="row">Other features related to Flash</th> - <td><a href="/en-US/docs/Plugins/Blocking_By_Domain">Domain Blocking</a></td> - <td><a href="https://sites.google.com/a/chromium.org/dev/flash-roadmap#TOC-Plugin-Power-Savings-Mode-Shipped:-Chrome-42---Sept-2015-">Plugin Power Saver</a></td> - <td><a href="https://blogs.windows.com/msedgedev/2016/04/07/putting-users-in-control-of-flash/#fLGW6bYgr4BpSHIr.97">Peripheral Content Pause</a></td> - </tr> - </tbody> -</table> - -<p>Each of the browser vendors has a roadmap about the future of Flash and changes to the user experience. The <a href="/en-US/docs/Plugins/Roadmap">Firefox Flash roadmap</a> includes links to roadmaps and posts from other vendors.</p> - -<h2 id="Caomparação_da_IU">Caomparação da IU</h2> - -<h3 id="Mozilla_Firefox">Mozilla Firefox</h3> - -<p>In-page UI is displayed when the site attempts to use Flash. An icon also appears on the left side of the location bar. The user can click on the Flash object or the location bar icon to activate Flash:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15127/Firefox-flash-inpage.png" style="height: 389px; width: 674px;"></p> - -<p>Users have the choice to allow Flash just for the current session, or to remember their choice:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15131/Firefox-notification.png" style="height: 199px; width: 426px;"></p> - -<h3 id="Google_Chrome">Google Chrome</h3> - -<p>In-page UI is displayed when the site attempts to use Flash without fallback content:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15141/Chrome-flash-inpage.png" style="height: 412px; width: 635px;"></p> - -<p>A user can click the plugin element to show a prompt for allowing Flash:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15161/Chrome-flash-prompt.png" style="height: 182px; width: 516px;"></p> - -<p>If the site provides fallback content for an object element, Chrome will display that content and will not prompt the user to enable Flash. If a Flash element is not visible to the user, the user will not get a visible prompt.</p> - -<p>A user can click the information icon on the left side of the location bar on any site to open the site information and allow Flash on that site:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15145/Chrome-info-icon.png" style="height: 544px; width: 399px;"></p> - -<h3 id="Microsoft_Edge">Microsoft Edge</h3> - -<p>In-page UI is displayed when the site attempts to use Flash. An icon also appears on the right side of the location bar. The user can click the Flash object to show activation options:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15135/Edge-flash-inpage.png" style="height: 227px; width: 611px;"></p> - -<p>Users have the choice to allow Flash just for the current session, or to remember their choice:</p> - -<p><img alt="" src="https://mdn.mozillademos.org/files/15139/Edge-flash-inpage.png" style="height: 173px; width: 453px;"></p> - -<h2 id="Dicas_de_Elaboração_do_Site">Dicas de Elaboração do Site</h2> - -<p>If a Flash element is very small, hidden, or covered by other content, users will probably not notice that Flash is required and will become confused. Even if the plugin element will eventually be hidden, pages should create the plugin element so that it's visible on the page, and should resize or hide it only after the user has activated the plugin. This can be done by calling a JavaScript function when the plugin is activated:</p> - -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">pluginCreated</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span> - <span class="comment token">// We don't need to see the plugin, so hide it by resizing</span> - <span class="keyword token">var</span> plugin <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">getElementById</span><span class="punctuation token">(</span><span class="string token">'myPlugin'</span><span class="punctuation token">)</span><span class="punctuation token">;</span> - plugin<span class="punctuation token">.</span>height <span class="operator token">=</span> <span class="number token">0</span><span class="punctuation token">;</span> - plugin<span class="punctuation token">.</span>width <span class="operator token">=</span> <span class="number token">0</span><span class="punctuation token">;</span> - plugin<span class="punctuation token">.</span><span class="function token">callPluginMethod</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="punctuation token">}</span></code></pre> - -<p>The HTML, by default, specifies the Flash object to be a size that makes it visible, like this:</p> - -<pre class="brush: html line-numbers language-html"><code class="language-html"><span class="comment token"><!-- Give the plugin an initial size so it is visible --></span> -<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>object</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>application/x-shockwave-flash<span class="punctuation token">"</span></span> <span class="attr-name token">data</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>myapp.swf<span class="punctuation token">"</span></span> - <span class="attr-name token">id</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>myPlugin<span class="punctuation token">"</span></span> <span class="attr-name token">width</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>300<span class="punctuation token">"</span></span> <span class="attr-name token">height</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>300<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>param</span> <span class="attr-name token">name</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>callback<span class="punctuation token">"</span></span> <span class="attr-name token">value</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>pluginCreated()<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> -<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>object</span><span class="punctuation token">></span></span></code></pre> - -<p>The <code>callback</code> parameter defined in the HTML can be called in Flash using its <code>flash.external.ExternalInterface</code> API.</p> - -<h3 id="Utilizar_um_callback_de_script_para_determinar_quando_um_plug-in_é_ativado">Utilizar um <em>callback</em> de <em>script</em> para determinar quando um plug-in é ativado</h3> - -<p>Similarly, a site's script shouldn't attempt to script a plugin immediately upon creation. Instead, the plugin object should call into a JavaScript function upon creation. That function can then issue the call into the plugin, knowing that everything is set up and ready to go.</p> - -<p>First, set your up your HTML with a callback that calls the JavaScript function <code>pluginCreated()</code>, like this:</p> - -<pre class="brush: html line-numbers language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>object</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>application/x-my-plugin<span class="punctuation token">"</span></span> <span class="attr-name token">data</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>somedata.mytype<span class="punctuation token">"</span></span> <span class="attr-name token">id</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>myPlugin<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>param</span> <span class="attr-name token">name</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>callback<span class="punctuation token">"</span></span> <span class="attr-name token">value</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>pluginCreated()<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> -<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>object</span><span class="punctuation token">></span></span></code></pre> - -<p>The <code>pluginCreated()</code> function is then responsible for the setup of your script and any calls back into the plugin that you need to make:</p> - -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">pluginCreated</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span> - document<span class="punctuation token">.</span><span class="function token">getElementById</span><span class="punctuation token">(</span><span class="string token">'myPlugin'</span><span class="punctuation token">)</span><span class="punctuation token">.</span><span class="function token">callPluginMethod</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="punctuation token">}</span></code></pre> diff --git a/files/pt-pt/plugins/flash_para_html5/index.html b/files/pt-pt/plugins/flash_to_html5/index.html index b17f365038..b17f365038 100644 --- a/files/pt-pt/plugins/flash_para_html5/index.html +++ b/files/pt-pt/plugins/flash_to_html5/index.html |