From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../mozilla/add-ons/add-on_guidelines/index.html | 124 ++ files/de/mozilla/add-ons/amo/index.html | 9 + files/de/mozilla/add-ons/amo/policy/index.html | 19 + .../add-ons/bootstrapped_extensions/index.html | 243 ++++ files/de/mozilla/add-ons/index.html | 198 +++ .../index.html | 156 +++ files/de/mozilla/add-ons/sdk/builder/index.html | 16 + .../add-ons/sdk/guides/content_scripts/index.html | 484 +++++++ files/de/mozilla/add-ons/sdk/guides/index.html | 154 +++ files/de/mozilla/add-ons/sdk/index.html | 83 ++ files/de/mozilla/add-ons/sdk/tools/index.html | 14 + files/de/mozilla/add-ons/sdk/tools/jpm/index.html | 497 +++++++ .../adding_a_button_to_the_toolbar/index.html | 100 ++ .../sdk/tutorials/getting_started/index.html | 214 +++ files/de/mozilla/add-ons/sdk/tutorials/index.html | 165 +++ .../add-ons/sdk/tutorials/installation/index.html | 134 ++ .../sdk/tutorials/mobile_development/index.html | 476 +++++++ .../index.html | 80 ++ .../de/mozilla/add-ons/themes/obsolete/index.html | 10 + .../anatomy_of_a_webextension/index.html | 133 ++ .../webextensions/api/browseraction/index.html | 135 ++ .../api/browseraction/setpopup/index.html | 136 ++ .../add-ons/webextensions/api/commands/index.html | 83 ++ .../add-ons/webextensions/api/downloads/index.html | 123 ++ .../mozilla/add-ons/webextensions/api/index.html | 51 + .../add-ons/webextensions/api/lesezeich/index.html | 121 ++ .../webextensions/arbeiten_mit_taps_api/index.html | 608 +++++++++ .../add-ons/webextensions/beispiele/index.html | 22 + .../browser_support_for_javascript_apis/index.html | 15 + .../deine_erste_weberweiterung/index.html | 155 +++ .../deine_zweite_erweiterung/index.html | 357 +++++ .../extending_the_developer_tools/index.html | 143 ++ files/de/mozilla/add-ons/webextensions/index.html | 86 ++ .../manifest.json/commands/index.html | 184 +++ .../manifest.json/devtools_page/index.html | 42 + .../add-ons/webextensions/manifest.json/index.html | 105 ++ .../webextensions/manifest.json/theme/index.html | 1361 ++++++++++++++++++++ .../webextensions/match_patterns/index.html | 430 +++++++ .../what_are_webextensions/index.html | 24 + .../\303\274berliegende_erweiterungen/index.html" | 54 + files/de/mozilla/chrome_registration/index.html | 48 + .../index.html | 105 ++ files/de/mozilla/css/index.html | 11 + .../firefox_erfolgreich_erstellt/index.html | 14 + files/de/mozilla/developer_guide/index.html | 108 ++ .../mozilla/developer_guide/quelltexte/index.html | 46 + .../mozilla/firefox/developer_edition/index.html | 57 + .../zur\303\274ckkehren/index.html" | 25 + files/de/mozilla/firefox/headless-mode/index.html | 237 ++++ files/de/mozilla/firefox/index.html | 60 + .../firefox/multiprocess_firefox/index.html | 80 ++ .../technical_overview/index.html | 164 +++ .../web_content_compatibility/index.html | 32 + .../firefox/nutzung_in_unternehmen/index.html | 142 ++ files/de/mozilla/firefox/privacy/index.html | 9 + .../firefox/privacy/tracking_protection/index.html | 88 ++ files/de/mozilla/firefox/releases/16/index.html | 104 ++ files/de/mozilla/firefox/releases/27/index.html | 56 + files/de/mozilla/firefox/releases/28/index.html | 116 ++ files/de/mozilla/firefox/releases/3.6/index.html | 301 +++++ files/de/mozilla/firefox/releases/34/index.html | 107 ++ files/de/mozilla/firefox/releases/47/index.html | 174 +++ files/de/mozilla/firefox/releases/5/index.html | 169 +++ files/de/mozilla/firefox/releases/56/index.html | 122 ++ files/de/mozilla/firefox/releases/57/index.html | 99 ++ files/de/mozilla/firefox/releases/58/index.html | 186 +++ files/de/mozilla/firefox/releases/60/index.html | 146 +++ files/de/mozilla/firefox/releases/68/index.html | 162 +++ files/de/mozilla/firefox/releases/index.html | 12 + .../mozilla/firefox/the_about_protocol/index.html | 190 +++ .../updating_add-ons_for_firefox_5/index.html | 69 + .../compatibility_testing/index.html | 103 ++ files/de/mozilla/firefox_fuer_android/index.html | 64 + files/de/mozilla/index.html | 12 + .../javascript_code_modules/deutsch/index.html | 197 +++ .../de/mozilla/javascript_code_modules/index.html | 102 ++ files/de/mozilla/localization/index.html | 25 + .../index.html | 137 ++ .../localization_content_best_practices/index.html | 324 +++++ .../lokalisierung_mit_mercurial/index.html | 252 ++++ .../lokalisierung_von_pontoon/index.html | 135 ++ .../lokalisierung_von_xliff-dateien/index.html | 59 + .../index.html" | 284 ++++ files/de/mozilla/mathml_project/index.html | 72 ++ .../mathml_project/mathml_torture_test/index.html | 1323 +++++++++++++++++++ files/de/mozilla/mathml_project/start/index.html | 95 ++ files/de/mozilla/mobile/index.html | 25 + .../de/mozilla/mobile/viewport_meta_tag/index.html | 86 ++ files/de/mozilla/performance/index.html | 145 +++ .../persona/bootstrapping_persona/index.html | 31 + files/de/mozilla/persona/branding/index.html | 42 + .../persona/browser_compatibility/index.html | 84 ++ files/de/mozilla/persona/index.html | 133 ++ .../mozilla/persona/protocol_overview/index.html | 61 + files/de/mozilla/persona/schnellstart/index.html | 201 +++ files/de/mozilla/persona/warum_persona/index.html | 31 + .../index.html | 10 + files/de/mozilla/preferences/index.html | 48 + files/de/mozilla/projects/deutsch/index.html | 35 + files/de/mozilla/projects/index.html | 14 + files/de/mozilla/projects/nss/index.html | 186 +++ .../projects/nss/nss_3.33_release_notes/index.html | 78 ++ .../projects/nss/nss_sample_code/index.html | 25 + files/de/mozilla/projects/nss/pkcs11/index.html | 20 + .../nss/pkcs11/module_installation/index.html | 32 + .../thunderbird_lokalisation/index.html | 98 ++ files/de/mozilla/qa/index.html | 70 + files/de/mozilla/tech/index.html | 14 + .../index.html | 56 + files/de/mozilla/tech/xpcom/guide/index.html | 13 + files/de/mozilla/tech/xpcom/reference/index.html | 27 + .../tech/xpcom/reference/interface/index.html | 19 + .../reference/interface/nsiloginmanager/index.html | 420 ++++++ .../using_nsiloginmanager/index.html | 212 +++ .../interface/nsixmlhttprequest/index.html | 89 ++ .../thunderbird/autokonfiguration/index.html | 146 +++ files/de/mozilla/thunderbird/index.html | 75 ++ .../building_a_thunderbird_extension/index.html | 57 + .../index.html | 61 + .../index.html | 58 + .../index.html | 24 + .../index.html | 24 + .../index.html | 43 + .../index.html | 31 + .../index.html | 44 + .../index.html | 53 + .../thunderbird/thunderbird_extensions/index.html | 138 ++ files/de/mozilla/verbinden/index.html | 94 ++ .../index.html" | 62 + 129 files changed, 17182 insertions(+) create mode 100644 files/de/mozilla/add-ons/add-on_guidelines/index.html create mode 100644 files/de/mozilla/add-ons/amo/index.html create mode 100644 files/de/mozilla/add-ons/amo/policy/index.html create mode 100644 files/de/mozilla/add-ons/bootstrapped_extensions/index.html create mode 100644 files/de/mozilla/add-ons/index.html create mode 100644 files/de/mozilla/add-ons/performance_best_practices_in_extensions/index.html create mode 100644 files/de/mozilla/add-ons/sdk/builder/index.html create mode 100644 files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html create mode 100644 files/de/mozilla/add-ons/sdk/guides/index.html create mode 100644 files/de/mozilla/add-ons/sdk/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tools/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tools/jpm/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tutorials/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tutorials/installation/index.html create mode 100644 files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html create mode 100644 files/de/mozilla/add-ons/security_best_practices_in_extensions/index.html create mode 100644 files/de/mozilla/add-ons/themes/obsolete/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/browseraction/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/browseraction/setpopup/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/commands/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/downloads/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/api/lesezeich/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/arbeiten_mit_taps_api/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/beispiele/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/deine_erste_weberweiterung/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/deine_zweite_erweiterung/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/manifest.json/commands/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/manifest.json/devtools_page/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/manifest.json/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/manifest.json/theme/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/match_patterns/index.html create mode 100644 files/de/mozilla/add-ons/webextensions/what_are_webextensions/index.html create mode 100644 "files/de/mozilla/add-ons/\303\274berliegende_erweiterungen/index.html" create mode 100644 files/de/mozilla/chrome_registration/index.html create mode 100644 files/de/mozilla/creating_a_spell_check_dictionary_add-on/index.html create mode 100644 files/de/mozilla/css/index.html create mode 100644 files/de/mozilla/developer_guide/firefox_erfolgreich_erstellt/index.html create mode 100644 files/de/mozilla/developer_guide/index.html create mode 100644 files/de/mozilla/developer_guide/quelltexte/index.html create mode 100644 files/de/mozilla/firefox/developer_edition/index.html create mode 100644 "files/de/mozilla/firefox/developer_edition/zur\303\274ckkehren/index.html" create mode 100644 files/de/mozilla/firefox/headless-mode/index.html create mode 100644 files/de/mozilla/firefox/index.html create mode 100644 files/de/mozilla/firefox/multiprocess_firefox/index.html create mode 100644 files/de/mozilla/firefox/multiprocess_firefox/technical_overview/index.html create mode 100644 files/de/mozilla/firefox/multiprocess_firefox/web_content_compatibility/index.html create mode 100644 files/de/mozilla/firefox/nutzung_in_unternehmen/index.html create mode 100644 files/de/mozilla/firefox/privacy/index.html create mode 100644 files/de/mozilla/firefox/privacy/tracking_protection/index.html create mode 100644 files/de/mozilla/firefox/releases/16/index.html create mode 100644 files/de/mozilla/firefox/releases/27/index.html create mode 100644 files/de/mozilla/firefox/releases/28/index.html create mode 100644 files/de/mozilla/firefox/releases/3.6/index.html create mode 100644 files/de/mozilla/firefox/releases/34/index.html create mode 100644 files/de/mozilla/firefox/releases/47/index.html create mode 100644 files/de/mozilla/firefox/releases/5/index.html create mode 100644 files/de/mozilla/firefox/releases/56/index.html create mode 100644 files/de/mozilla/firefox/releases/57/index.html create mode 100644 files/de/mozilla/firefox/releases/58/index.html create mode 100644 files/de/mozilla/firefox/releases/60/index.html create mode 100644 files/de/mozilla/firefox/releases/68/index.html create mode 100644 files/de/mozilla/firefox/releases/index.html create mode 100644 files/de/mozilla/firefox/the_about_protocol/index.html create mode 100644 files/de/mozilla/firefox/updating_add-ons_for_firefox_5/index.html create mode 100644 files/de/mozilla/firefox_fuer_android/compatibility_testing/index.html create mode 100644 files/de/mozilla/firefox_fuer_android/index.html create mode 100644 files/de/mozilla/index.html create mode 100644 files/de/mozilla/javascript_code_modules/deutsch/index.html create mode 100644 files/de/mozilla/javascript_code_modules/index.html create mode 100644 files/de/mozilla/localization/index.html create mode 100644 files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html create mode 100644 files/de/mozilla/localization/localization_content_best_practices/index.html create mode 100644 files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html create mode 100644 files/de/mozilla/localization/lokalisierung_von_pontoon/index.html create mode 100644 files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html create mode 100644 "files/de/mozilla/localization/programm\303\274bersetungen_mit_mercurial/index.html" create mode 100644 files/de/mozilla/mathml_project/index.html create mode 100644 files/de/mozilla/mathml_project/mathml_torture_test/index.html create mode 100644 files/de/mozilla/mathml_project/start/index.html create mode 100644 files/de/mozilla/mobile/index.html create mode 100644 files/de/mozilla/mobile/viewport_meta_tag/index.html create mode 100644 files/de/mozilla/performance/index.html create mode 100644 files/de/mozilla/persona/bootstrapping_persona/index.html create mode 100644 files/de/mozilla/persona/branding/index.html create mode 100644 files/de/mozilla/persona/browser_compatibility/index.html create mode 100644 files/de/mozilla/persona/index.html create mode 100644 files/de/mozilla/persona/protocol_overview/index.html create mode 100644 files/de/mozilla/persona/schnellstart/index.html create mode 100644 files/de/mozilla/persona/warum_persona/index.html create mode 100644 files/de/mozilla/preferences/eine_kurze_anleitung_zu_mozilla_einstellungen/index.html create mode 100644 files/de/mozilla/preferences/index.html create mode 100644 files/de/mozilla/projects/deutsch/index.html create mode 100644 files/de/mozilla/projects/index.html create mode 100644 files/de/mozilla/projects/nss/index.html create mode 100644 files/de/mozilla/projects/nss/nss_3.33_release_notes/index.html create mode 100644 files/de/mozilla/projects/nss/nss_sample_code/index.html create mode 100644 files/de/mozilla/projects/nss/pkcs11/index.html create mode 100644 files/de/mozilla/projects/nss/pkcs11/module_installation/index.html create mode 100644 files/de/mozilla/projects/thunderbird/thunderbird_lokalisation/index.html create mode 100644 files/de/mozilla/qa/index.html create mode 100644 files/de/mozilla/tech/index.html create mode 100644 files/de/mozilla/tech/xpcom/guide/empfang_von_benachrichtigungen_zum_startprozess/index.html create mode 100644 files/de/mozilla/tech/xpcom/guide/index.html create mode 100644 files/de/mozilla/tech/xpcom/reference/index.html create mode 100644 files/de/mozilla/tech/xpcom/reference/interface/index.html create mode 100644 files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/index.html create mode 100644 files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/using_nsiloginmanager/index.html create mode 100644 files/de/mozilla/tech/xpcom/reference/interface/nsixmlhttprequest/index.html create mode 100644 files/de/mozilla/thunderbird/autokonfiguration/index.html create mode 100644 files/de/mozilla/thunderbird/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_3_colon__install_manifest/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_7_colon__installation/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_8_colon__packaging/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_9_colon__distributing/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/ein_thunderbird_addon_programmieren_5_colon__xul/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_2_colon__erweiterungs-dateisystem/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_4_colon__chrome_manifest/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_6_colon__javascript_hinzufuegen/index.html create mode 100644 files/de/mozilla/thunderbird/thunderbird_extensions/index.html create mode 100644 files/de/mozilla/verbinden/index.html create mode 100644 "files/de/mozilla/\303\274ber_colon_omni.ja_(ehemals_omni.jar)/index.html" (limited to 'files/de/mozilla') diff --git a/files/de/mozilla/add-ons/add-on_guidelines/index.html b/files/de/mozilla/add-ons/add-on_guidelines/index.html new file mode 100644 index 0000000000..e781073547 --- /dev/null +++ b/files/de/mozilla/add-ons/add-on_guidelines/index.html @@ -0,0 +1,124 @@ +--- +title: Add-on guidelines +slug: Mozilla/Add-ons/Add-on_guidelines +tags: + - Zusatzgerä +translation_of: 'https://extensionworkshop.com/documentation/publish/add-on-policies/' +--- +

These add-on guidelines were created to foster an open and diverse add-on developer community while ensuring an excellent user experience. They apply to all add-ons and add-on updates regardless of where they are hosted, and also apply to customizations performed by installers that configure Firefox without using an add-on. Add-ons hosted on AMO are subject to additional policies.

+ +

Be Transparent

+ + + +

Be Respectful to Users

+ + + +

Be Safe

+ + + +

Be Stable

+ + + +

Exceptions

+ + + +

Other exceptions may apply.

+ +

Enforcement

+ +

Add-ons that do not follow these guidelines may qualify for blocklisting, depending on the extent of the violations. Guidelines qualified with the wordmust are especially important, and violations thereof will most likely result in a blocklisting nomination.

+ +

The Add-ons Team will do their best to contact the add-on's developers and provide a reasonable time frame for the problems to be corrected before a block is put in place. If an add-on is considered malicious or its developers have proven unreachable or unresponsive, or in case of repeat violations, blocklisting may be immediate.

+ +

Guideline violations should be reported via Bugzilla, under Tech Evangelism > Add-ons. Questions can be posted in the #addons IRC channel.

+ +

These guidelines may change in the future. All updates will be announced in the Add-ons Blog.

diff --git a/files/de/mozilla/add-ons/amo/index.html b/files/de/mozilla/add-ons/amo/index.html new file mode 100644 index 0000000000..5867afab50 --- /dev/null +++ b/files/de/mozilla/add-ons/amo/index.html @@ -0,0 +1,9 @@ +--- +title: AMO +slug: Mozilla/Add-ons/AMO +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Add-ons/AMO +--- +

Seiten, die addons.mozilla.org dokumentieren:

diff --git a/files/de/mozilla/add-ons/amo/policy/index.html b/files/de/mozilla/add-ons/amo/policy/index.html new file mode 100644 index 0000000000..45bdc8ac09 --- /dev/null +++ b/files/de/mozilla/add-ons/amo/policy/index.html @@ -0,0 +1,19 @@ +--- +title: AMO Policies +slug: Mozilla/Add-ons/AMO/Policy +translation_of: Mozilla/Add-ons/AMO/Policy +--- +

{{AddonSidebar}}

+ +

Mozilla ist bestrebt, unseren Nutzern und Entwicklern eine großartige Add-On-Erfahrung zu bieten. Bitte lesen Sie die folgenden Richtlinien, bevor Sie Ihr Add-on abschicken.

+ + +
+
Developer Agreement
+
Effective January 5, 2016
Review Process
+
Add-ons extend the core capabilities of Firefox, allowing users to modify and personalize their Web experience. A healthy add-on ecosystem, built on trust, is vital for developers to be successful and users to feel safe making Firefox their own. For these reasons, Mozilla requires all add-ons to comply with the following set of policies on acceptable practices. The below is not intended to serve as legal advice, nor is it intended to serve as a comprehensive list of terms to include in your add-on’s privacy policy.
Featured Add-ons
+
How up-and-coming add-ons become featured and what's involved in the process.
Contacting us + +

Wie Sie uns bezüglich dieser Richtlinien oder Ihres Add-ons kontaktieren können.

+ +
diff --git a/files/de/mozilla/add-ons/bootstrapped_extensions/index.html b/files/de/mozilla/add-ons/bootstrapped_extensions/index.html new file mode 100644 index 0000000000..582b48c775 --- /dev/null +++ b/files/de/mozilla/add-ons/bootstrapped_extensions/index.html @@ -0,0 +1,243 @@ +--- +title: Bootstrapped extensions +slug: Mozilla/Add-ons/Bootstrapped_extensions +translation_of: Archive/Add-ons/Bootstrapped_extensions +--- +

{{ gecko_minversion_header("2.0") }}

+
+

Note: All extensions created using the Add-on SDK are bootstrapped! All the bootstrapping code is generated for you, so you don't really need to think about it. Not using the Add-on SDK? Read on...

+
+

Traditional extensions include overlays, wherein the application can load up XUL from the extension's package and automatically apply it atop its own UI. While this makes creating extensions that add to the application's user interface relatively easy, it means that updating, installing, or disabling an extension requires an application restart.

+

Gecko 2.0 {{ geckoRelease("2.0") }} introduces bootstrapped extensions. These are special extensions that, instead of using overlays to apply their user interface to the application, programmatically insert themselves into the application. This is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down.

+

All the application does is call into this script file; the extension is responsible for adding and removing its user interface and handling any other setup and shutdown tasks it requires.

+

This article discusses how bootstrapped extensions work. See this tutorial on converting from an overlay extension to restartless for a practical step by step guide to migrating.

+

The startup and shutdown process

+

A key feature of bootstrapped extensions is that they must be able to be started up and shut down on demand by the application. When the extension's startup() function is called, it must manually inject its user interface and other behavior into the application. Similarly, when its shutdown() function is called, it must remove anything it's added to the application, as well as all references to any of its objects.

+

There are several scenarios in which the startup() function may be called; for example:

+ +

Some examples of when the shutdown() function may be called:

+ +

Notes on modifying the application user interface

+

chrome.manifest in bootstrapped add-ons

+

You can use a chrome.manifest file in bootstrapped add-ons to:

+
    +
  1. make your add-on's content available via a chrome:// URL (using the content, locale, and skin instructions in the manifest);
  2. +
  3. replace existing chrome:// URIs with your content (using the override instruction).
  4. +
+

Not all chrome.manifest instructions are supported in bootstrapped add-ons, for example you still cannot register XUL Overlays from a bootstrapped add-on. See the chrome.manifest documentation for details.

+

In Firefox 10 and later the chrome.manifest file located in the root of the add-on's XPI (i.e. a sibling of the install.rdf) is loaded automatically. In Firefox 8 and 9 you had to load/unload the manifest manually using {{ ifmethod("nsIComponentManager", "addBootstrappedManifestLocation") }} and {{ ifmethod("nsIComponentManager", "removeBootstrappedManifestLocation") }}. This feature was unavailable in Firefox versions before 8.

+

Adding user interface manually

+

If you decide to go ahead and try to develop a bootstrapped extension that modifies the application's user interface, here are a few suggestions to get you started.

+

You need to look up the relevant application UI elements by their ID by calling {{ domxref("document.getElementById()") }}, then manipulate them to inject your UI. For example, you can get access to the menu bar in Firefox with document.getElementById("main-menubar").

+

Be sure that at shutdown time, you remove any user interface you've added.

+

Creating a bootstrapped extension

+

To mark an extension as bootstrappable, you need to add the following element to its install manifest:

+
<em:bootstrap>true</em:bootstrap>
+

Then you need to add a bootstrap.js file that contains the required functions; this should be alongside the install.rdf file in the extension's package.

+

Backward compatibility

+

Because older versions of Firefox don't know about the bootstrap property or bootstrap.js file, it's not overly difficult to create an XPI that will work on both as a bootstrappable extension and as a traditional extension. Create your extension as a bootstrappable extension, then add the traditional overlays as well. Newer versions of Firefox will use the bootstrap.js script, ignoring the components and overlays, while older versions will use the overlays.

+

Bootstrap entry points

+

The bootstrap.js script should contain several specific functions, which are called by the browser to manage the extension. The script gets executed in a privileged sandbox, which is cached until the extension is shut down.

+

startup

+

Called when the extension needs to start itself up. This happens at application launch time or when the extension is enabled after being disabled (or after it has been shut down in order to install an update. As such, this can be called many times during the lifetime of the application.

+

This is when your add-on should inject its UI, start up any tasks it may need running, and so forth.

+
void startup(
+  data,
+  reason
+);
+
+
Parameters
+
+
+ data
+
+ A bootstrap data structure.
+
+ reason
+
+ One of the reason constants, indicating why the extension is being started up. This will be one of APP_STARTUP, ADDON_ENABLE, ADDON_INSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE.
+
+

shutdown

+

Called when the extension needs to shut itself down, such as when the application is quitting or when the extension is about to be upgraded or disabled. Any user interface that has been injected must be removed, tasks shut down, and objects disposed of.

+
void shutdown(
+  data,
+  reason
+);
+
+
Parameters
+
+
+ data
+
+ A bootstrap data structure.
+
+ reason
+
+ One of the reason constants, indicating why the extension is being shut down. This will be one of APP_SHUTDOWN, ADDON_DISABLE, ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE.
+
+

install

+

Your bootstrap script must include an install() function, which the application calls before the first call to startup() after the extension is installed, upgraded, or downgraded.

+
+ Note: This method is never called if the extension has never been started; for example, if an extension is installed but isn't compatible with the current version of the application, install() never gets called if it is uninstalled before becoming compatible. However, if the extension gets upgraded to a version that's compatible with the application, its install() function will be called at that time, before the first startup() call.
+
void install(
+  data,
+  reason
+);
+
+
Parameters
+
+
+ data
+
+ A bootstrap data structure.
+
+ reason
+
+ One of the reason constants, indicating why the extension is being installed. This will be one of ADDON_INSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE.
+
+

uninstall

+

This function is called after the last call to shutdown() before a particular version of an extension is uninstalled. This will not be called if install() was never called.

+
+ Note: It's important to keep in mind that uninstall() can be called even on extensions that are currently disabled, or are not compatible with the current application. Because of this, it's crucial that the function be implemented to gracefully handle APIs that may not be present in the application. This function will also not be called if a third-party application removes the extension while Firefox isn't running. Simply having code function install() {} IS NOT ENOUGH, if you have code in uninstall it will not run, you MUST run some code in the install function, at the least you must set arguments on the install function so like: function install(aData, aReason) {} then uninstall WILL WORK.
+
+ Note: If you open addon manager and then click "Remove" on addon, it will not call uninstall function right away. Because it was soft uninstalled, as the "Undo" button is there. If you close addon manager or something to make that "Undo" button to go away then the hard uninstall takes place.
+
+ Note: The uninstall function fires on downgrade and upgrade as well so you should make sure it is an uninstall by doing this:
+ function uninstall(aData, aReason) {
+      if (aReason == ADDON_UNINSTALL) {
+           console.log('really uninstalling');
+      } else {
+           console.log('not a permanent uninstall, likely an upgrade or downgrade');
+      }
+ }
+
void uninstall(
+  data,
+  reason
+);
+
+
Parameters
+
+
+ data
+
+ A bootstrap data structure.
+
+ reason
+
+ One of the reason constants, indicating why the extension is being uninstalled. This will be one of ADDON_UNINSTALL, ADDON_UPGRADE, or ADDON_DOWNGRADE.
+
+

Reason constants

+

The bootstrap functions accept a reason parameter, which explains to the extension why it's being called. The reason constants are:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstantValueDescription
APP_STARTUP1The application is starting up.
APP_SHUTDOWN2The application is shutting down.
ADDON_ENABLE3The add-on is being enabled.
ADDON_DISABLE4The add-on is being disabled. (Also sent during uninstallation)
ADDON_INSTALL5The add-on is being installed.
ADDON_UNINSTALL6The add-on is being uninstalled.
ADDON_UPGRADE7The add-on is being upgraded.
ADDON_DOWNGRADE8The add-on is being downgraded.
+

Bootstrap data

+

Each of the entry points is passed a simple data structure containing some useful information about the add-on being bootstrapped. More information about the add-on can be obtained by calling AddonManager.getAddonByID(). The data is a simple JavaScript object with the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
idstringThe ID of the add-on being bootstrapped.
versionstringThe version of the add-on being bootstrapped.
installPathnsIFileThe installation location of the add-on being bootstrapped. This may be a directory or an XPI file depending on whether the add-on is installed unpacked or not.
resourceURInsIURIA URI pointing at the root of the add-ons files, this may be a jar: or file: URI depending on whether the add-on is installed unpacked or not. {{ gecko_minversion_inline("7.0") }}
oldVersionstringThe previously installed version, if the reason is ADDON_UPGRADE or ADDON_DOWNGRADE, and the method is install or startup. {{ gecko_minversion_inline("22.0") }}
newVersionstringThe version to be installed, if the reason is ADDON_UPGRADE or ADDON_DOWNGRADE, and the method is shutdown or uninstall. {{ gecko_minversion_inline("22.0") }}
+
+

Note: An add-on may be upgraded/downgraded at application startup, in this case the startup method reason is APP_STARTUP, and the oldVersion property is not set. Also be aware that in some circumstances an add-on upgrade/downgrade may occur without the uninstall method being called.

+
+

Add-on debugger

+

From Firefox 31 onwards, you can use the Add-on Debugger to debug bootstrapped add-ons.

+

Further reading

+ diff --git a/files/de/mozilla/add-ons/index.html b/files/de/mozilla/add-ons/index.html new file mode 100644 index 0000000000..298aba8754 --- /dev/null +++ b/files/de/mozilla/add-ons/index.html @@ -0,0 +1,198 @@ +--- +title: Add-ons +slug: Mozilla/Add-ons +tags: + - Add-ons + - Erweiterungen + - Mozilla +translation_of: Mozilla/Add-ons +--- +
{{AddonSidebar}}
+ +
Ändern und Erweitern von Mozilla-Anwendungen
+ +

Add-ons fügen neue Funktionalitäten zu Gecko-basierten Anwendungen wie zum Beispiel Firefox, SeaMonkey und Thunderbird hinzu. Es gibt zwei Arten von Add-ons: Erweiterungen fügen neue Funktionen zur Anwendung hinzu, während Themes nur die Oberfläche verändern.

+ +

Für Erweiterungen und Themes betreibt Mozilla ein Repository auf addons.mozilla.org, auch bekannt als AMO. Wenn Sie Add-ons bei AMO einreichen werden diese überprüft und erst nach bestandener Prüfung veröffentlicht. Allerdings ist es nicht zwingend erforderlich, dass Add-ons nur über AMO veröffentlicht werden, aber durch die Überprüfung gewinnen Anwender an Vertrauen und im Gegenzug können Sie von AMO als einer zentralen Plattform, auf der viele hilfreiche Add-ons zu finden sind, nur profitieren.

+ +
+
Add-ons können großen Einfluss auf das Verhalten der Anwendung haben, die sie hosten. Wir haben eine Reihe von Richtlinien entwickelt, um sicherzustellen, dass Sie eine gute Erfahrung für Benutzer bereitstellen. Diese Richtlinien gelten für alle Arten von Add-ons, ob sie auf addons.mozilla.org oder nicht gehostet werden.
+
+ +
+

Erweiterungen

+ +

Erweiterungen fügen neue Funktionalität bei Mozilla-Anwendungen wie Firefox und Thunderbird hinzu. Sie können dem Browser neue Funktionen hinzufügen, z. B. eine andere Möglichkeit zum Verwalten von Registerkarten, neue Funktionen hinzufügen und sie können Web-Inhalte zur Verbesserung der Benutzerfreundlichkeit oder die Sicherheit von bestimmten Webseiten ändern.

+ +
+
Es gibt drei verschiedene Ansätze Erweiterungen zu erstellen können: Add-on SDK-basierte Erweiterungen, manuell bootstrapped restartless Erweiterungen und Overlay-Erweiterungen.
+ +
+
+ + + +
+
Wenn Sie können, ist es ratsam, das Add-on-SDK  zu verwenden, die Add-on-SDK verwendet die restartless Erweiterungsmechanismus die aber bestimmte Aufgaben vereinfacht und sich selbst bereinigt. Wenn das Add-on SDK nicht ausreichend für Ihre Bedürfnisse ist, implementieren Sie stattdessen eine manuelle restartless-Erweiterung.
+ +
+
+ +
+
Lesen Sie für weitere Informationen zur Auswahl "welche Technik verwenden" diesen Vergleich.
+ +
+
+ +

Debugging

+ +

Die Entwicklung von Erweiterung wird erschwert, wenn man für den Debug über keine Möglichkeit verfügt zu sehen, in welcher Zeile der Fehler aufgetreten ist. Sie müssen die Entwickler Präferenzen aktivieren, damit die logs in der Browser Konsole gezeigt werden. Für Dektopnutzer: Einrichten einer Entwicklungsumgebung für Erweiterungen.

+ +

Für eine Desktop-Umgebung nutzen Sie: Eine Entwicklungsumgebung einrichten, für Mobile Geräte (Android/iOS) nutzen Sie: Debugging Firefox for Android with WebIDE. Letztere verwendet die "Browser Toolbox" innerhalb der Dektop WebIDE, um auf dem Mobilgerät auftretende Fehler zu erkennen, nutzen Sie für Firefox OS auch die WebIDE.

+ +
+
+

Empfohlene Vorgehensweisen

+ +
+
Egal, wie Sie eine Erweiterung entwickeln. Gibt es einige Richtlinien, denen Sie folgen können, um sicherzustellen, dass Ihre Erweiterung einem Benutzer eine möglichst gute Nutzererfahrung bietet.
+ +
+
+ +
+
Leistung
+
+
+
Die Erweiterung ist schnell, reaktionsfähig und Speicher-effizient.
+
+
+
Sicherheit
+
+
+
Die Erweiterung setzt den Nutzer keinen schädlichen Websites aus.
+
+
+
Etikette
+
+
+

Die Erweiterung arbeitet problemlos mit anderen Erweiterungen.

+
+
+
+
+ +
+

Anwendungsspezifische

+ +
+
Der Großteil der Dokumentation geht davon aus, dass Sie für Firefox Desktop entwickeln. Wenn Sie für einige andere Gecko-basierte Anwendung entwickeln, gibt es große Unterschiede, über die Sie Bescheid wissen müssen.
+ +
+
+ +
+
Thunderbird
+
+
+
Entwicklung von Erweiterungen für den Thunderbird-Mail-Client.
+
+
+
Firefox for Android
+
+
+
Entwicklung von Erweiterungen für Firefox für Android.
+
+
+
SeaMonkey
+
+
+
Entwicklung von Erweiterungen für SeaMonkey Software-Suite.
+
+
+
+
+
+ +
+

Themes

+ +
+
Themen sind Add-ons, die Benutzeroberfläche der Anwendung anpassen. Es gibt zwei Arten von Themen: leichte Themen und komplette Themen.
+ +
+
+ +
+
+

Leichte Themen sind viel einfacher zu implementieren als komplette Themen, aber sie bieten sehr begrenzte Anpassungs möglichkeiten .

+
+ +
+
+
Mit kompletten Themes machen Sie viel tieferen Änderungen an der Benutzeroberfläche der Anwendung. Die Dokumentation für komplette Themes ist veraltet, aber ist hier als eine mögliche Grundlage für aktualisierte Dokumentation verbunden.
+
+
+
+ +

Andere Arten von Add-ons

+ +
+
Search engine plugins sind eine einfache und sehr spezifische Art von Add-on: sie fügen neue Suchmaschinen zu den Browser-Suchleiste hinzu.
+ +
+
+ +
+
Plugins helfen den Anwendung den Inhalt zu verstehen, die nicht nativ unterstützt werden. Wir sind dabei ablehnend Plugins zu Supporten, da sie eine Geschichte der Stabilität, Leistung und Sicherheitsprobleme verursacht haben.
+
+ +

Inhalt

+ +
    +
  1. Overlay Erweiterung
  2. +
  3. Restartless Erweiterung
  4. +
  5. Add-on SDK
  6. +
  7. Erweiterung  Bewährte +
      +
    1. Leistung
    2. +
    3. Sicherheit
    4. +
    5. Etikette
    6. +
    +
  8. +
  9. Themes +
      +
    1. Leichte Themes
    2. +
    3. Komplete Themes
    4. +
    +
  10. +
  11. Veröffentlichung Add-ons +
      +
    1. addons.mozilla.org
    2. +
    3. Add-on Richtlinien
    4. +
    +
  12. +
diff --git a/files/de/mozilla/add-ons/performance_best_practices_in_extensions/index.html b/files/de/mozilla/add-ons/performance_best_practices_in_extensions/index.html new file mode 100644 index 0000000000..5a1c7e8052 --- /dev/null +++ b/files/de/mozilla/add-ons/performance_best_practices_in_extensions/index.html @@ -0,0 +1,156 @@ +--- +title: Best Practice für Performance in Erweiterungen +slug: Mozilla/Add-ons/Performance_best_practices_in_extensions +tags: + - Add-ons + - Best Practice + - Erweiterungen + - Leitfaden + - Performanz +translation_of: Archive/Add-ons/Performance_best_practices_in_extensions +--- +

Einer der größten Vorteile von Firefox ist seine Erweiterbarkeit. Erweiterungen können beinahe jede beliebige Funktion erfüllen. Doch dieses Konzept hat einen Nachteil: Eine schlecht geschriebene Erweiterung kann sich stark negativ auf das Nutzungserlebnis auswirken, und auch zu allgemeinen Leistungseinbußen in Firefox führen. Der folgende Artikel soll eine Reihe von Vorschlägen liefern, um die Leistung und Geschwindigkeit Deiner Erweiterung zu erhöhen, und dadurch auch von Firefox selbst.

+ +

Die Startup Leistung Verbessern

+ +

Erweiterungen werden immer dann geladen und gestartet, wenn eine neues Browser Fenster geöffnet wird. Im Umkehrschluss bedeutet das aber, dass Deine Erweiterung einen direkten Einfluss darauf hat, wie lange ein Benutzer beim Laden einer neuen Seite warten muss. Es gibt mehrere Möglichkeiten, die Startzeit Deiner Erweiterung zu optimieren und somit die Verzögerung für den Endbenutzer zu minimieren.

+ +

Lade nur, was nötig ist

+ +

Lade keine Ressourcen beim Startup, die nicht direkt benötigt werden. Das sind Daten, die erst nach einer Benutzerinteraktion, etwa ein Klick auf einen Button, benötigt werden, oder Daten die nur bei bestimmten Einstellungen zum Tragen kommen. Auch wenn Deine Erweiterung Features anbietet, die nur funktionieren wenn der Benutzer sich in ein Service eingeloggt hat, lade die Ressourcen für diese Features erst beim tatsächlichen Login.

+ +

Nutze JavaScript Code Module

+ +

Du kannst Teile deiner Erweiterung in JavaScript code modules kapseln. Diese Module können zur Laufzeit bei Bedarf geladen werden und reduzieren somit den Ladeaufwand zum Programmstart.

+ +

Die JavaScript Code Module bieten hier einen Vorteil gegenüber XPCOM Modulen, die immer zu Beginn geladen werden.

+ +

Natürlich hängt es von der Komplexität der Erweiterung ab, ob eine Modularisierung des Codes sinnvoll ist.

+ +

Verschiebe alles, was verschoben werden kann

+ +

Die meisten Erweiterungen fangen das load event eines Fensters ab, um ihren Startup Code auszuführen. Hier sollte so wenig wie möglich getan werden. Das Browser Fenster wird so lange blockiert, bis der load Handler deiner Erweiterung abgeschlossen ist. Das bedeutet, je länger die Erweiterung dafür braucht, desto langsamer wirkt Firefox für den Benutzer.

+ +

Jede Operation, die nicht sofort ausgeführt werden muss, kann mittels einem {{ interface("nsITimer") }} oder mit der {{ domxref("window.setTimeout()") }} Funktion für einen späteren Zeitpunkt geplant werden. Sogar kurze Verzögerungen in diesem Programmbereich können eine große Auswirkung auf die Ladegeschwindigkeit haben.

+ +

General Performance Tips

+ +

Vermeide Speicherlecks

+ +

Speicherlecks können die Leistung deiner Erweiterung stark reduzieren, weil sie dafür sorgen, dass der Garbage Collector und der Cycle Collector mehr Arbeit haben.

+ +

Sogenannte Zombiebereiche sind eine Form von Speicherlecks, die Du selbst sehr einfach entdecken und verhindern kannst. Lies dazu den Artikel zu Zombie compartments, speziell die Sektion Proactive checking of add-ons.

+ +

Im Artikel Common causes of memory leaks in extensions werden weitere Möglichkeiten, wie Du Zombiebereiche und andere Formen von Speicherlecks verhindern kannst, besprochen.

+ +

Neben der direkten Suche nach den oben genannten Lecks solltest Du auch allgemein ein Auge auf die Speichernutzung deines Addons haben und regelmäßig unter about:memory überprüfen. Als Beispiel sei bug 719601 genannt, bei dem ein "System Principal" JavaScript Bereich auf mehrere 100 MB an Speicher anwuchs, was sehr viel größer ist als im Regelfall.

+ +

Nutze JavaScript Module

+ +

JavaScript Module verhalten sich wie jeder andere JavaScript Code, mit dem feinen Unterschied, dass sie als Singletons agieren und daher von Firefox in den Cache abgelegt werden können. Dadurch können sie beim nächsten Start sehr viel effizienter geladen werden. Wann immer deine Erweiterung JavaScript Code von einem {{ HTMLElement("script") }} Element lädt, solltest du überlegen, stattdessen ein JavaScript Modul zu nutzen. Weitere Information über JavaScript Module und ihre Verwendung werden im Artikel Using JavaScript Code Modules besprochen.

+ +

Vermeide Langsamen CSS Code

+ + + +

Vermeide DOM Mutation Event Listeners

+ +

Durch das Hinzufügen eines DOM Mutation Listeners in einem Dokument werden die meisten DOM Mutation Optimierungen deaktiviert und die Performanz von weiteren Änderungen der DOM-Struktur des Dokuments wird stark herabgesetzt. Des weiteren kann dieser Effekt durch das Deaktivieren eines Mutation Listeners nicht wieder rückgängig gemacht werden. Die folgenden Events sollten daher strikt vermieden werden: DOMAttrModified, DOMAttributeNameChanged, DOMCharacterDataModified, DOMElementNameChanged, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified

+ +

Weitere Information zu diesen veralteten Events findest Du im Artikel Mutation events. Stattdessen sollten Mutation Observers benutzt werden.

+ +

Benutze Lazy Load für Services

+ +

Das JavaScript Modul XPCOMUtils bietet zwei Möglichkeiten für Lazy Loading:

+ + + +

Seit Firefox 4.0 werden viele übliche Services bereits in Services.jsm gecached.

+ +

Reduziere File I/O

+ +

TODO: Hier fehlen Beispiele, wie etwa Links zu Code, Bugs, oder Docs.

+ + + +

Benutze die Richtige Kompressionsstufe für JAR und XPI Dateien

+ +

Daten von komprimierten Archiven zu lesen ist zeitaufwändig. Je stärker ein Archiv komprimiert ist, desto mehr Aufwand muss auch für das Lesen der darin befindlichen Daten erbracht werden. Daher sollten alle JAR Dateien in deiner Erweiterung mit Kompressionslevel 0 (keine Kompression) gepackt werden. Es mag kontraproduktiv klingen, aber dadurch wird zwar die Dateigröße der JAR Datei erhöht, die Größe der XPI Datei aber reduziert, weil dadurch die Möglichkeit gegeben ist, dass beim Komprimiered der XPI Datei Kompressionen der einzelnen im JAR enthaltenen Dateien stattfinden können. (Das kann als eine Art progressive Kompression bezeichnet werden).

+ +

Wenn deine Erweiterung nicht explizit em:unpack verwendet, wird das XPI file ab Firefox 4 nicht entpackt, sondern direkt genutzt. Aus diesem Grund ist eine niedrige Kompressionsstufe zu bevorzugen, wobei wir zu Kompressionslevel 1 raten. Selbst im Vergleich mit maximaler Kompression wird dadurch die Größe des Downloads nur geringfügig angehoben.

+ +

Benutze asynchrone I/O

+ +

Diese Regel kann nicht oft genug wiederholt werden: Benutze niemals synchrone I/O in einem GUI Thread.

+ + + +

Unnötige Verwendung von onreadystatechange in XHR

+ +

Für die meisten Anwendungsfälle sind addEventListener(load/error) und/oder xhr.onload/.onerror völlig ausreichend und bieten den Vorteil, dass sie nur einmal aufgerufen werden, im Gegensatz zu onreadystatechange. In vielen Fällen wird onreadystatechange aus Kompatibilitätsgründen verwendet, wenn XHR in einer Webseite verwendet wird. Das ist oft auchreichend, um Ressourcen zu laden oder Fehler zu behandeln. Allerdings werden load/error Event Listener viel seltener aufgerufen als onreadystatechange, genauer gesagt nur einmal, und es ist nicht notwendig jedes mal den readyState  zu überprüfen oder herauszufinden, ob es sich um ein error Event handelt. onreadystatechange sollte nur benutzt werden, wenn es notwendig ist, eine Antwort noch während ihrem Einlangen zu behandeln.

+ +

Entferne Event Listeners

+ +

Entferne Event Listener, wenn sie nicht mehr benötigt werden. Es ist viel effizienter, Event Listener zu entfernen, als sie etwa durch Flags zu deaktivieren; denn bei zweiterem Ansatz muss bei jedem auftretenden Event die Flag abgefragt werden. Konstrukte wie function onMouseOver(evt) { if (is_active) { /* doSomeThing */ } } sollten also vermieden werden. Auch "Einmal-Events" sollten danach wieder deaktiviert werden:

+ +
 function init() {
+   var largeArray;
+   addEventListener('load', function onLoad() {
+        removeEventListener('load', onLoad, true);
+        largeArray.forEach();
+ }, true);
+
+ +

Andernfalls kann es vorkommen, dass Closure Objekte des Listeners weiter referenziert werden (in obigem Beispiel die Variable largeArray). Der Listener wird dadurch weit über seine nötige Lebensdauer im Speicher gehalten.

+ +

Befülle Menüs nach Bedarf

+ +

Befülle Kontextmenüs (page, tabs, tools) nur nach Bedarf und reduziere Berechnungen auf ein Minimum, um die Reaktionsgeschwindigkeit der UI zu erhalten. Es ist nicht notwendig, bei jeder Änderung das gesamte Menü neu zu befüllen. Diese Aufgabe kann warten, bis der Benutzer das Menü tatsächlich verwenden will. Füge einen Listener für das "popupshowing" Event hinzu und erstelle/befülle das Kontextmenü dort.

+ +

Vermeide Maus-Bewegungs-Events

+ +

Vermeide die Verwendung von Mausbewegungsevents (enter, over, exit) oder minimiere zumindest die Berechnungen, die beim Auslösen eines solchen Events durchgeführt werden auf ein Minimum. Solche Events, besonders das mouseover Event, treten überlichweise sehr häufig auf. Es wird geraten, im Eventhandler nur neue Information zu speichern und die Berechnung erst dann auszuführen, wenn der Benutzer sie benötigt (zum Beispiel bei einem popupshowing Event). Vergiss auch nicht darauf, nicht mehr benötigte Event Listener auszuschalten (siehe oben).

+ +

Vermeide Polling

+ +

Benutze die {{ interface("nsIObserverService") }} Funktion stattdessen. Jede Erweiterung darf via {{ interface("nsIObserverService") }} eigene Benachrichtigungen versenden, aber die wenigsten benutzen diese Funktionalität. Auch viele andere Services bieten Funktionalität zur Beobachtung, etwa nslPrefBranch2.

+ +

aPNG/aGIF sind oft nicht zu Empfehlen

+ +

Animationen benötigen viel Ladezeit, weil eine große Anzahl an Bildern dekodiert werden muss (die Frames der Animation). Animierte Bilder werden häufig aus dem Cache entfernt, was dazu führt, dass sie immer wieder neu geladen werden müssen. Besonders anfällig dafür ist {{ interface("nsITree") }} / {{ XULElem("tree") }}, das unter manchen Umständen gar kein Caching betreibt.

+ +

base64/md5/sha1 Implementierungen

+ +

Verwende keine eigenen base64/md5/sha1 Implementierungen. Die eingebauten Funktionen für base64 atob/btoa sind völlig ausreichend und können in overlay Scripts sowie in JavaScript Modulen verwendet werden. Hashes können mit {{ interface("nsICryptoHash") }}, berechnet werden, das entweder einen String oder {{ interface("nsIInputStream") }} akzeptiert.

+ +

Image sprites

+ +

Mehrere Bilder können in ein Sprite kombiniert werden. Siehe {{ cssxref("-moz-image-region") }}. Die meisten XUL Widgets, die zum Anzeigen von Bildern verwendet werden können (inklusive {{ XULElem("button") }} und {{ XULElem("toolbarbutton") }}) erlauben auch die Verwendung von {{ cssxref("list-style-image") }}. Vermeide die Benutzung der imagesrc/src Attribute für die einbettung von Bildern.

+ +

Verwende Chrome Workers

+ +

Für lange andauernde Berechnungen oder Datenverarbeitung kann {{ domxref("ChromeWorker") }} verwendet werden.

+ + + + diff --git a/files/de/mozilla/add-ons/sdk/builder/index.html b/files/de/mozilla/add-ons/sdk/builder/index.html new file mode 100644 index 0000000000..d243acec45 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/builder/index.html @@ -0,0 +1,16 @@ +--- +title: Builder +slug: Mozilla/Add-ons/SDK/Builder +tags: + - builder +translation_of: Archive/Add-ons/Add-on_SDK/Builder +--- +

Der Add-on Builder war ein web-basiertes Entwicklungssystem welches Entwicklern erlaubt hat, mit den SDK APIs Addons zu erstellen ohne das cfx Kommando-Zeilen-Tool verwenden zu müssen. Es wurde am 1. April 2014 eingestellt und jetzt leitet es auf die builder.addons.mozilla.org-Seite weiter.
+
+ Falls sie bisher das SDK nur über den Builder verwendet haben, wissen sie bereits das meiste, das sie benötigen um direkt mit dem SDK arbeiten zu können. Die high-level und low-level APIs, die für Builder Addons verwendet wurden sind jeweils die gleichen. Mit folgenden Schritten können sie zum SDK wechseln:

+ + diff --git a/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html b/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html new file mode 100644 index 0000000000..a94176f2cb --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/guides/content_scripts/index.html @@ -0,0 +1,484 @@ +--- +title: Content Scripts +slug: Mozilla/Add-ons/SDK/Guides/Content_Scripts +translation_of: Archive/Add-ons/Add-on_SDK/Guides/Content_Scripts +--- +
+

Viele Add-ons müssen den Inhalt von Webseiten modifizieren oder auf diesen zugreifen können. Der Grundcode des Add-on  bekommt aber keinen direkten Zugriff auf Webinhalte. Stattdessen müssen SDK Add-ons den Code,  der Zugriff auf Webinhalte erhält in seperate Skripte auslagern, die sogenannten "Content Scripts". Diese Seite beschreibt wie man Content Scripts entwickelt und diese implementiert.

+ +

Content Scripts sind einer der verwirrenderen Aspekte beim Arbeiten mit der SDK, aber Sie werden mit Sicherheit mit ihnen arbeiten müssen. Es gibt fünf grundlegende Prinzipien:

+ + + +

Dieses komplette Add-on zeigt alle diese Prinzipien. Die "main.js" hängt ein Content Skript an den aktuellen Tab, mittels den tabs Modules, an. In diesem Fall wird der Content Skript in Form eines Strings übergeben. Das Content Skript ersetzt einfach nur den Inhalt der Seite:

+ +
// main.js
+var tabs = require("sdk/tabs");
+var contentScriptString = 'document.body.innerHTML = "<h1>Diese Seite wurde aufgegessen</h1>";'
+
+tabs.activeTab.attach({
+  contentScript: contentScriptString
+});
+ +

Die folgenden high-level SDK Module können Content Skripts benutzen, um Webseiten zu bearbeiten:

+ + + +

Zusätzlich sind manche SDK Benutzeroberflächen Komponenten - Panel, Sidebar, frames - darauf ausgelegt HTML zu benutzen und haben deshalb seperate Skripte um mit ihrem Inhalt zu interagieren. In vielen Punkten sind diese Skripte wie Content Skripte, aber dies ist nicht Teil dieses Artikels. Um mehr über die Interaktion des Inhalts eines Benutzeroberflächenmoduls zu erfahren, schauen Sie sich die modulspezifischen Dokumentationen: panel, sidebar, frame an.

+ +

Fast alle diese Beispiele, die in dieser Anleitung präsentiert werden, sind als komplette, aber minimalistische, Add-ons in der addon-sdk-content-scripts repository auf Github vorhanden.

+ +

Content Skripts laden

+ +
+

Sie können ein einzelnes Skript laden, indem Sie einen String an die contentScript oder die contentScriptFile Option übergeben. Die contentScript Option behandelt den übergebenen String wie ein eigenes Skript:

+ +
// main.js
+
+var pageMod = require("sdk/page-mod");
+var contentScriptValue = 'document.body.innerHTML = ' +
+                         ' "<h1>Page matches ruleset</h1>";';
+
+pageMod.PageMod({
+  include: "*.mozilla.org",
+  contentScript: contentScriptValue
+});
+ +

Die contentScriptFile Option behandelt den String wie eine resource:// URL, die auf ein Skript zeigt, dass in ihrem Add-on Verzeichnis "data" gespeichert ist. jpm erstellt standardmäßig keinen "data" Ordner, also muss dieser erst erstellt werden, wenn Sie ihre Content Scripts verwenden wollen.

+ +

Das Add-on liefert eine URL, die auf die Datei "content-script.js" zeigt, welche im data Unterordner des Add-on Stammverzeichnisses enthalten ist:

+ +
// main.js
+
+var data = require("sdk/self").data;
+var pageMod = require("sdk/page-mod");
+
+pageMod.PageMod({
+  include: "*.mozilla.org",
+  contentScriptFile: data.url("content-script.js")
+});
+ +
// content-script.js
+
+document.body.innerHTML = "<h1>Seite erfüllt die Regeln.</h1>";
+ +
+

Ab Firefox 34 , kann "./content-script.js" als Alias für self.data.url("content-script.js") verwendet werden. Die main.js kann also auch folgendermaßen geschrieben werden:

+ +
var pageMod = require("sdk/page-mod");
+
+pageMod.PageMod({
+  include: "*.mozilla.org",
+  contentScriptFile: "./content-script.js"
+});
+
+
+ +
+

Wenn ihr Content Skript nicht sehr simpel ist oder aus einem statischen String besteht, sollten Sie contentScript:  nicht benutzen. Wenn Sie es doch tun, könnten Sie Probleme haben Ihr Add.on auf AMO verifiziert zu bekommmen.

+ +

Stattdessen sollten Sie ihr Skript in einer seperaten Datei schreiben und mit contentScriptFile laden. Das macht ihren Code übersichtlicher und er ist einfacher zu Warten, sichern und debuggen.

+
+ +

Sie können auch mehrere Skripte in contentScript oder contentScriptFile laden, indem Sie ein Array von Strings übergeben:

+ +
// main.js
+
+var tabs = require("sdk/tabs");
+
+tabs.on('ready', function(tab) {
+  tab.attach({
+      contentScript: ['document.body.style.border = "5px solid red";', 'window.alert("hi");']
+  });
+});
+
+ +
// main.js
+
+var data = require("sdk/self").data;
+var pageMod = require("sdk/page-mod");
+
+pageMod.PageMod({
+  include: "*.mozilla.org",
+  contentScriptFile: [data.url("jquery.min.js"), data.url("my-content-script.js")]
+});
+ +

Wenn Sie das tuen, können die Skripte direkt miteinander kommunizieren, als wären es Skripte der gleichen Webseite.

+ +

Sie können auch contentScript und contentScriptFile zusammen benutzen. Wenn Sie das tun, werden die Skripte, die sie in contentScriptFile spezifizieren vor denen in contentScript geladen. Das ermöglicht es Ihnen javaScript Bibliotheken, wie JQuery über eine URL zu laden und dann ein simples Skript inline zu verwenden, dass diese Bibliothek benutzt:

+ +
// main.js
+
+var data = require("sdk/self").data;
+var pageMod = require("sdk/page-mod");
+
+var contentScriptString = '$("body").html("<h1>Page matches ruleset</h1>");';
+
+pageMod.PageMod({
+  include: "*.mozilla.org",
+  contentScript: contentScriptString,
+  contentScriptFile: data.url("jquery.js")
+});
+ +
+

Wenn ihr Content Skript nicht sehr simpel ist oder aus einem statischen String besteht, sollten Sie contentScript:  nicht benutzen. Wenn Sie es doch tun, könnten Sie Probleme haben Ihr Add.on auf AMO verifiziert zu bekommmen.

+ +

Stattdessen sollten Sie ihr Skript in einer seperaten Datei schreiben und mit contentScriptFile laden. Das macht ihren Code übersichtlicher und er ist einfacher zu Warten, sichern und debuggen.

+
+ +

Kontrollieren, wann das Skript angehängt werden soll.

+ +

Die contentScriptWhen Option spezifiziert, wann das/die Content Skript/e geladen werden sollen. Diese brauch eine dieser Parameter:

+ +
    +
  • "start": Läd das Skript sofort, nach dem das Dokumentelement der Seite in den DOM eingefügt wird. ZU diesem Zeitpunkt wurde der DOM Inhalt noch nicht geladen,, deshalb kann das Skript nicht damit interagieren.
  • +
  • "ready": Läd das Skript nachdem der DOM der Seite geladen wurde: Dies ist der Fall, wenn das DOMContentLoaded Event  abgefeuert wird. Ab diesem Zeitpunkt können Content Skripts mit dem DOM interagieren, aber extern referenzierte Stylesheets und Bilder könnten noch nicht geladen sein.
  • +
  • "end": Läd das Skript nachdem der komplette Inhalt (DOM, JS, CSS, images) der Seute geladen wurde. Zu diesem Zeitpunkt wird das window.onload event abgefeuert.
  • +
+ +

Der Standardwert ist "end".

+ +

Die Funktion tab.attach() akzepiert contentScriptWhen nicht, da es generell aufgerufen wird wenn die Seite geladen wurde.

+ +

Übergabe von Konfigurationsoptionen

+ +

Das contentScriptOptions Objekt ist ein JSON Objekt, das den Content Skripts als "read-only" Wert als self.options Eigenschaft übergeben wird:

+ +
// main.js
+
+var tabs = require("sdk/tabs");
+
+tabs.on('ready', function(tab) {
+  tab.attach({
+      contentScript: 'window.alert(self.options.message);',
+      contentScriptOptions: {"message" : "hello world"}
+  });
+});
+ +

Jeder Wert (Objekt, Feld, String, etc), dass in JSON dargestellt werden kann, kann hier benutzt werden.

+ +

Zugriff auf den DOM

+ +

Content Skripts können natürlich wie jedes andere Skript, dass die Seite geladen hat ( Page Skripts) auf den DOM zugreifen. Content Skripts und Page Skripts sind wie folgt von einander isoliert:

+ +
    +
  • Content Skripts sehen keine JavaScript Objekte, die der Seite über Page Skripts hinzugefügt wurden.
  • +
  • Auch wenn ein Page Skript das Verhalten eines DOM Objekts verändert hat, sieht das Content Skript nur das Originalverhalten.
  • +
+ +

Das gleiche gilt auch umgekehrt: Page Skripts sehen keine JavaScript Objekte, die von Content Skripts hinzugefügt wurden.

+ +

Stellen Sie sich eine Seite vor, die zum Beispiel eine Variable foo über ein Page Skript zum window Objekt hinzufügt:

+ +
<!DOCTYPE html">
+<html>
+  <head>
+    <script>
+    window.foo = "hello from page script"
+    </script>
+  </head>
+</html>
+ +

Ein anderes Skript, dass nach diesem Skript in die Seite geladen wird, kann auf foo zugreifen. Ein Content Skript kann dies nicht:

+ +
// main.js
+
+var tabs = require("sdk/tabs");
+var mod = require("sdk/page-mod");
+var self = require("sdk/self");
+
+var pageUrl = self.data.url("page.html")
+
+var pageMod = mod.PageMod({
+  include: pageUrl,
+  contentScript: "console.log(window.foo);"
+})
+
+tabs.open(pageUrl);
+ +
console.log: my-addon: null
+
+ +

Es gibt gute Gründe für diese Isolation. Erstens können Content Skripts so keine Objekte an Webseiten übermitteln und somit Sicherheitslücken schaffen. Zweitens können Content Skripts so Objekte erzeugen, ohne sich Sorgen machen zu müssen, dass diese mit Objekten kollidieren, die in Page Skripts erzeugt wurden.

+ +

Die Isulation bedeutet, dass wenn zum Beispiel eine Webseite die JQuery Bibliothek läd, das Content Skript nicht in der Lage ist dieses zu sehen, aber eine eigene JQuery Bibliothek laden kann ohne das es ein Problem mit der Version gibt, die über das Page Skript hinzugefügt wurde.

+ +

Interaktion mit Page Skripts

+ +

Normalerweise möchte man Content Skripts und Page Skripts voneinander isolieren. Wenn dies nicht der Fall ist, da Sie zum Beispiel Objekte zwischen beiden Skripten austauschen wollen, oder Nachrichten zwischen ihnen schicken wollen können Sie mehr zum Thema unter  Interaktion mit Page Skripts finden.

+ +

Event Listeners

+ +

Man kann in Content Skripts genau wie in einem Page Skript auf DOM Events warten. Es gibt nur zwei wichtige Unterschieden:

+ +

Erstens: Falls Sie einen Event Listener als String an setAttribute() übergeben, wird der Listener im Seitenkontext ausgeführt und hat somit keinen Zugriff auf Variablen, die im Content Skript definiert wurden.

+ +

Zum Beispiel, wird dieses Content Skript mit der Fehlermeldung "theMessage is not defined" ausgeben:

+ +
var theMessage = "Hello from content script!";
+anElement.setAttribute("onclick", "alert(theMessage);");
+ +

Zweitens: Falls Sie einen Event Listener per direkter Zuweisung einem globalen Event Handler  wie onclick zuweisen, könnten Zuweisungen, die die Seite vornimmt überschrieben werden. Zur Veranschaulichung ist hier ein Add-on, das versucht einen click Handler per Zuweisung an window.onclick anzufügen:

+ +
var myScript = "window.onclick = function() {" +
+               "  console.log('unsafewindow.onclick: ' + window.document.title);" +
+               "}";
+
+require("sdk/page-mod").PageMod({
+  include: "*",
+  contentScript: myScript,
+  contentScriptWhen: "start"
+});
+ +

Das wird auf den meisten Seiten funktionieren, bis auf denen, die ebenfalls ein onclick zuweisen:

+ +
<html>
+  <head>
+  </head>
+  <body>
+    <script>
+    window.onclick = function() {
+      window.alert("it's my click now!");
+    }
+    </script>
+  </body>
+</html>
+ +

Aus diesen Gründen ist es besser Event Listeners per addEventListener() hinzuzufügen. So definieren Sie einen Listener als Funktion:

+ +
var theMessage = "Hello from content script!";
+
+anElement.onclick = function() {
+  alert(theMessage);
+};
+
+anotherElement.addEventListener("click", function() {
+  alert(theMessage);
+});
+ +

Kommunikation mit dem Add-on

+ +

Damit Add-On Sktipts und Content Skripts miteinander kommunizieren können, haben beide Seiten der Konversation Zugriff auf ein port Objekt.

+ +
    +
  • Um eine Nachricht von einer Seite zur anderen zu schicken nutzen Sie port.emit()
  • +
  • Um eine Nachricht von der anderen Seite zu empfangen nutzen port.on()
  • +
+ +

Nachrichten sind asyncron, was bedeutet, dass der Sender nicht wartet, bis er eine Antwort des Empfängers erhält, sondern die Nachricht schickt und das weiter arbeitet.

+ +

Hier ist ein simples Beispieladd-on, das eine Nachricht an ein Content Skript per port schickt:

+ +
// main.js
+
+var tabs = require("sdk/tabs");
+var self = require("sdk/self");
+
+tabs.on("ready", function(tab) {
+  worker = tab.attach({
+    contentScriptFile: self.data.url("content-script.js")
+  });
+  worker.port.emit("alert", "Message from the add-on");
+});
+
+tabs.open("http://www.mozilla.org");
+ +
// content-script.js
+
+self.port.on("alert", function(message) {
+  window.alert(message);
+});
+ +
+

Das context-menu Modul benutzt das Kommunikationsmodul, das hier beschrieben wird nicht. Um etwas über die Kommunikation mit geladenen Content Skripts im context-menu zu erfahren, schauen Sie in die context-menu Dokumentation.

+
+ +

Zugriff auf port im Content Skript

+ +

Im Content Skript ist das port Objekt als Eigenschaft im globalen Objekt self verfügbar. So versenden Sie eine Nachricht vom Content Skript:

+ +
self.port.emit("myContentScriptMessage", myContentScriptMessagePayload);
+ +

Um eine Nachricht vom Add-on Code zu bekommen:

+ +
self.port.on("myAddonMessage", function(myAddonMessagePayload) {
+  // Handle the message
+});
+ +
+

Das globale self Objekt ist etwas komplett anderes als das self Modul, das einer API in einem Add-on die Möglichkeit bietet auf Daten und die ID des Add-ons zuzugreifen.

+
+ +

Zugriff auf port im Add-on Skript

+ +

Im Add-on Code ist das Bindeglied zur Kommunikation zwischen Add-on und einem spezifischen Content Skript das  worker Objekt. Das port Objekt ist also eine Eigenschaft des  worker Objekts.

+ +

Der worker wird aber im Add-on Code nicht von allen Modulen gleich verwendet.

+ +

Vom page-worker

+ +

Das page-worker Objekt integriert die worker API direkt. Um also eine Nachricht von einem Content Skript zu erhalten, das mit dem page-worker assoziiert wird benutzt man pageWorker.port.on():

+ +
// main.js
+
+var pageWorkers = require("sdk/page-worker");
+var self = require("sdk/self");
+
+var pageWorker = require("sdk/page-worker").Page({
+  contentScriptFile: self.data.url("content-script.js"),
+  contentURL: "http://en.wikipedia.org/wiki/Internet"
+});
+
+pageWorker.port.on("first-para", function(firstPara) {
+  console.log(firstPara);
+});
+ +

Um eine benutzerdefinierte Nachricht vom Add-on zu schicken, nutz man pageWorker.port.emit():

+ +
// main.js
+
+var pageWorkers = require("sdk/page-worker");
+var self = require("sdk/self");
+
+pageWorker = require("sdk/page-worker").Page({
+  contentScriptFile: self.data.url("content-script.js"),
+  contentURL: "http://en.wikipedia.org/wiki/Internet"
+});
+
+pageWorker.port.on("first-para", function(firstPara) {
+  console.log(firstPara);
+});
+
+pageWorker.port.emit("get-first-para");
+ +
// content-script.js
+
+self.port.on("get-first-para", getFirstPara);
+
+function getFirstPara() {
+  var paras = document.getElementsByTagName("p");
+  if (paras.length > 0) {
+    var firstPara = paras[0].textContent;
+    self.port.emit("first-para", firstPara);
+  }
+}
+ +

Vom page-mod

+ +

Ein einziges  page-mod Objekt kann ein Skript an mehrere Seiten anhängen. Jede dieser Seiten hat ihren eigenen Context, in dem sie dieses Skript aufrufen. Daher benötigt es seperate Kanäle(worker) für jede Seite.

+ +

page-mod integriert also die worker API nicht direkt, sondern es wird jedes Mal wenn ein Content Skript an eine Seite angehängt wird das attach Event aufgerufen,  dessen listener einen worker für den Kontext übergeben bekommt. Durch das bereit stellen eines listeners bei attach kann man das port Objekt für das Content Skript, dass dieser Seite angefügt wurde über diesen page-mod verwenden:

+ +
// main.js
+
+var pageMods = require("sdk/page-mod");
+var self = require("sdk/self");
+
+var pageMod = pageMods.PageMod({
+  include: ['*'],
+  contentScriptFile: self.data.url("content-script.js"),
+  onAttach: startListening
+});
+
+function startListening(worker) {
+  worker.port.on('click', function(html) {
+    worker.port.emit('warning', 'Do not click this again');
+  });
+}
+ +
// content-script.js
+
+window.addEventListener('click', function(event) {
+  self.port.emit('click', event.target.toString());
+  event.stopPropagation();
+  event.preventDefault();
+}, false);
+
+self.port.on('warning', function(message) {
+  window.alert(message);
+});
+
+ +

Im oben gezeigten Add-on gibt es zwei Nachrichten:

+ +
    +
  • click wird vom page-mod an das Add-on geschickt, wenn der Nutzer auf ein Element auf der Seite klickt
  • +
  • warning schickt einen String zurück an den page-mod
  • +
+ +

Von Tab.attach()

+ +

Die Tab.attach() methode liefert einen worker zurück, den man zur Kommunikation mit dem/den Content Skript/Content Skripts, die angehängt wurden, verwenden kann.

+ +

Das Add-on fügt einen Button zu Firefox hinzu: Wenn der Benutzer den Button drückt, fügt das Add-on ein Content Skript an den aktuellen Tab an. Das Skript sendet eine Nachricht namens "my-addon-message" und wartet auf eine Antwort namens "my-script-response":

+ +
//main.js
+
+var tabs = require("sdk/tabs");
+var buttons = require("sdk/ui/button/action");
+var self = require("sdk/self");
+
+buttons.ActionButton({
+  id: "attach-script",
+  label: "Attach the script",
+  icon: "./icon-16.png",
+  onClick: attachScript
+});
+
+function attachScript() {
+  var worker = tabs.activeTab.attach({
+    contentScriptFile: self.data.url("content-script.js")
+  });
+  worker.port.on("my-script-response", function(response) {
+    console.log(response);
+  });
+  worker.port.emit("my-addon-message", "Message from the add-on");
+}
+
+ +
// content-script.js
+
+self.port.on("my-addon-message", handleMessage);
+
+function handleMessage(message) {
+  alert(message);
+  self.port.emit("my-script-response", "Response from content script");
+}
+ +

Die port API

+ +

Schaue unter der Referenzseite für das port Objekt.

+
+ +

Die postMessage API

+ +

bevor das port Objekt hinzugefügt wurde, kommunizierten Add-on Code und Content Skripts über eine andere API:

+ + + +

Die API ist immer noch verfügbar und dokumentiert, aber es gibt keinen Grund sie statt der port API zu verwenden, die hier beschrieben wird. Die Ausnahme bildet das context-menu Modul, welches immer noch postMessage verwendet.

+ +

Content Skript zu Content Skript

+ +

Content Skripts können nur direkt miteinander kommunizieren, wenn diese im gleichen Kontext geladen wurden. Beispiel: Wenn ein einziger Aufruf von  Tab.attach()  zwei Content Skripts anhängt, können diese sich gegenseitig sehen. Wenn aber Tab.attach() zweimal aufgerufen wird, und die Content Skripts einzeln anhängt,können die Content Skripte nicht miteinander kommunizieren. Dann müssen die Nachrichten über die  port API über den Add-on code gesendet werden.

+ +

Cross-domain Content Skripts

+ +

Grundsätzlich hat ein Content Skript keine cross-domain Privilegien. Sie können also keinen Inhalt eines iframes auslesen, wenn dieser Inhalt von einer anderen Domain stammt, oder XMLHttpRequests an eine andere Domain schicken.

+ +

Um dieses Feature für spezielle Domains hinzuzufügen fügen Sie dem package.json ihres Add-ons den Schlüssel "cross-domain-content" unter dem "permissions" Schlüssel hinzu. Siehe dafür den Artikel  cross-domain content scripts.

+
diff --git a/files/de/mozilla/add-ons/sdk/guides/index.html b/files/de/mozilla/add-ons/sdk/guides/index.html new file mode 100644 index 0000000000..fbb8311866 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/guides/index.html @@ -0,0 +1,154 @@ +--- +title: Leitfäden +slug: Mozilla/Add-ons/SDK/Guides +translation_of: Archive/Add-ons/Add-on_SDK/Guides +--- +

Auf dieser Seite sind theoretische und detailliertere Artikel über das SDK auffindbar.

+
+

Für Mitwirkende

+
+
+
+
+ Erste Schritte
+
+ Erfahre, wie du zu dem SDK beitragen kannst: den Quellcode erhalten, Bugs melden und beheben, Patches einreichen, Überprüfungen und Hilfe erhalten.
+
+ Module
+
+ Erfahre mehr über das vom SDK verwendete Modulsystem (basierend auf der CommonJS-Spezifikation), wie Sandboxes und Compartments zum Erhöhen der Sicherheit verwendet werden können, und über den im SDK enthaltenen Modul-Loader Cuddlefish.
+
+ Klassen und Vererbung
+
+ Erfahre, wie Klassen und Vererbungen in JavaScript implementiert werden können, unter Verwendung von Konstruktoren und Prototypen, und über die Helper-Funktion des SDKs zum Vereinfachen dieser Prozesse.
+
+
+
+
+
+ Private Eigenschaften
+
+ Erfahre, wie private Eigenschaften in JavaScript unter Verwendung von Prefixes, Closures und WeakMaps implementiert werden können und wie das SDK private Eigenschaften durch das Verwenden von Namespaces (eine Verallgemeinerung von WeakMaps) unterstützt.
+
+ Prozesse
+
+ Das SDK wurde dafür entwickelt, in einer Umgebung zu arbeiten, in welcher Code zum Manipulieren von Web-Inhalten in unterschiedlichen Prozessen wie der Haupt-Code des Add-ons ausgeführt wird. Dieser Artikel erklärt die wichtigsten Vorteile dieses Konzepts.
+
+
+
+
+

SDK-Infrastruktur

+
+
+
+
+ Modulstruktur des SDKs
+
+ Das SDK selbst sowie die dafür konzipierten Add-ons bestehen aus wiederverwendbaren JavaScript-Modulen. Dieser Artikel erklärt, worum es sich bei diesen Modulen handelt, wie sie geladen werden können und wie die Modul-Baumstruktur des SDKs aufgebaut ist.
+
+ SDK-API-Lebenszyklus
+
+  Einführung in den Lebenszyklus der SDK-APIs, beinhaltet Stabilitätsbewertungen für APIs.
+
+
+
+
+
+ Programm-ID
+
+ Die Programm-ID ist ein eindeutiger Bezeichner für ein Add-on. Dieser Leitfaden zeigt, wie sie erstellt wird, und wozu sie dient.
+
+ Firefox-Kompatibilität
+
+ Lerne, mit welchen Firefox-versionen eine SDK-Version kompatibel ist und wie Kompatibilitätsprobleme behandelt werden können.
+
+
+
+
+

SDK-Spracheigenschaften

+
+
+
+
+ Arbeiten mit Events
+
+ Erstelle Event-basierten Code mit Hilfe des SDK-Eventausgabe-Frameworks.
+
+
+
+
+
+ Zwei Arten von Scripts
+
+ Dieser Artikel erklärt die Unterschiede zwischen den vom Haupt-Code des Add-ons verwendbaren APIs und von denen, die von einem Content-Script verwendet werden können.
+
+
+
+
+

Content-Scripts

+
+
+
+
+ Einführung in Content-Scripts
+
+ Eine Übersicht über Content-Scripts.
+
+ Laden von Content-Scripts
+
+ Laden von Content-Scripts in Webseiten, Einbindung entweder von Strings oder von eigenen Dateien und Festlegen des Ausführungszeitpunktes.
+
+ Auf das DOM zugreifen
+
+ Informationen über den Zugriff von Content-Scripts auf das DOM (Document Object Model).
+
+ Kommunikation mit anderen Scripts
+
+ Erfahre, wie ein Content-Script mit der main.js-Datei, mit anderen Content-Scripts und von der Webseite selbst geladenen Scripts kommunizieren kann.
+
+
+
+
+
+ Verwendung von "port"
+
+ Kommunikation zwischen einem Content-Script und den anderen Bestandteilen des Add-ons über das port-Objekt.
+
+ Verwendung von "postMessage()"
+
+ Kommunikation zwischen einem Content-Script und den anderen Bestandteilen des Add-ons über die postMessage()-API und ein Vergleich dieser Technik mit dem port-Objekt.
+
+ Domainübergreifende Content-Scripts
+
+ Lerne, wie man Content-Scripts dazu befähigt, mit Inhalten von anderen Domains zu interagieren.
+
+ Reddit-Beispiel
+
+ Ein einfaches Add-on mit Content-Scripts.
+
+
+
+
+

XUL-Portierung

+
+
+
+
+ XUL Portierungsleitfaden
+
+ Techniken zum Portieren eines XUL Add-ons auf das SDK.
+
+ XUL versus SDK
+
+ Ein Vergleich der Stärken und Schwächen des SDK's mit denen der traditionellen XUL-basierten Add-ons.
+
+
+
+
+
+ Portierungs-Beispiel
+
+ Ein Walkthrough durch das Portieren eines relativ einfachen XUL-basierten Add-ons auf das SDK.
+
+
+
diff --git a/files/de/mozilla/add-ons/sdk/index.html b/files/de/mozilla/add-ons/sdk/index.html new file mode 100644 index 0000000000..4a73b5fbeb --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/index.html @@ -0,0 +1,83 @@ +--- +title: Add-on SDK +slug: Mozilla/Add-ons/SDK +translation_of: Archive/Add-ons/Add-on_SDK +--- +

Das Add-on SDK ermöglicht es, Add-ons für Firefox unter Verwendung der Standard-Webtechnologien zu entwickeln: JavaScript, HTML und CSS. Das SDK beinhaltet JavaScript APIs zum Erstellen, Ausführen, Testen und Packen von Add-ons.

+ +
+

Tutorials

+ +
+ + +
+
+
Benutzeroberflächen
+
Erstelle Benutzeroberflächenkomponenten wie Toolbar-Buttons, Kontextmenüs, Menüeinträge oder Dialoge.
+
Inhalte von Webseiten bearbeiten
+
Inhalte von Seiten über ein spezifisches URL-Muster oder dynamisch einen bestimmten Tab bearbeiten.
+
Zusammenfassung
+
Walk-through durch das Beispiel-Add-on "Annotator".
+
+
+
+ +
+

Leitfäden

+ +
+
+
+
Zum SDK beitragen
+
Trage zum SDK bei und lerne die wichtigsten im SDK-Quelltext verwendeten Objekte wie Module, Klassen und Vererbung, private Eigenschaften und Inhaltsabläufe kennen.
+
SDK-Aufbau
+
Verstehe die Technologien, die dem SDK zugrunde liegen: Modulstruktur, Programm-ID und die Regeln, die die Firefox-Kompatibilität definieren.
+
Content-Scripts
+
Eine detaillierte Anleitung zum Arbeiten mit Content-Scripts. Erklärt wird das Laden von Content-Scripts, auf welche Objekte ein Content-Script zugreifen kann und wie man zwischen einem Content-Script und dem Rest des Add-ons kommunizieren kann.
+
+
+ + +
+ +
+

Referenzen

+ +
+
+
+
High-Level-APIs
+
Dokumentation der High-Level-SDK-APIs.
+
Tools-Referenz
+
Dokumentation des cfx-Tools zum Entwickeln, Testen und Packen von Add-ons, der Konsole, die global zum Loggen verwendet wird und der package.json-Datei.
+
+
+ +
+
+
Low-Level-APIs
+
Dokumentation der Low-Level-SDK-APIs.
+
+
+
+ +

 

diff --git a/files/de/mozilla/add-ons/sdk/tools/index.html b/files/de/mozilla/add-ons/sdk/tools/index.html new file mode 100644 index 0000000000..8c67b4644e --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tools/index.html @@ -0,0 +1,14 @@ +--- +title: Tools +slug: Mozilla/Add-ons/SDK/Tools +tags: + - Add-on SDK + - CFX + - JPM + - NeedsTranslation + - TopicStub +translation_of: Archive/Add-ons/Add-on_SDK/Tools +--- +

Articles listed here provide a reference for the SDK's tools:

+ +

{{ LandingPageListSubpages ("/en-US/Add-ons/SDK/Tools", 7) }}

diff --git a/files/de/mozilla/add-ons/sdk/tools/jpm/index.html b/files/de/mozilla/add-ons/sdk/tools/jpm/index.html new file mode 100644 index 0000000000..86e6a82aa3 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tools/jpm/index.html @@ -0,0 +1,497 @@ +--- +title: jpm +slug: Mozilla/Add-ons/SDK/Tools/jpm +translation_of: Archive/Add-ons/Add-on_SDK/Tools/jpm +--- +
+

Sie können jpm ab Firefox 38 verwenden.

+ +

Dieser Artikel bezieht sich auf jpm.

+
+ +

Der Node-basierte Ersatz für cfx, erlaubt das Testen, Starten und Paketieren von Add-Ons.

+ +

Schauen Sie sich das jpm-Tutorial als Einführung an.

+ +

jpm wird folgendermaßen verwendet:

+ +
jpm [command] [options]
+
+ +

jpm unterstützt die folgenden globalen Optionen:

+ +
-h, --help        - Zeigt eine Hilfsnachricht
+-V, --version     - Anzeigen der JPM Versionsnummer
+
+ +

Installation

+ +

jpm wird über den Node Package Manager (npm) installiert. npm ist im Installer von Node.js enthalten, welchen Sie auf nodejs.org finden.

+ +

Nachdem Sie npm installiert haben, können Sie jpm wie jedes andere npm-Paket installieren:

+ +
npm install jpm -g
+ +

Abhängig von ihren Einstellungen müssen Sie den Befehl möglicherweise mit Adminrechten ausführen:

+ +
sudo npm install jpm -g
+ +

Tippen Sie folgendes in die Eingabeaufforderung:

+ +
jpm
+ +

Es sollte sich eine Zusammenfassung der jpm-Kommandos öffnen. Im Gegensatz zu cfx ist jpm in jeder Eingabeaufforderung verwendbar, solange Sie es mit der Option -g installiert haben.

+ +

Probleme?

+ +

Falls Sie die Zusammenfassung nicht verstehen, fragen Sie nach Hilfe. SDK-Nutzer und Teammitglieder des Projekts diskutieren über Probleme und Vorschläge in der  Projekt- Mailingliste. Andere könnten das selbe Problem wie Sie gehabt haben, also suchen Sie bitte zuerst im Listenarchiv. Sie können mit anderen SDK-Nutzern im Kanal #jetpack in Mozillas IRC-Netzwerk chatten.

+ +

Command reference

+ +

There are six jpm commands:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
jpm initCreate a skeleton add-on as a starting point for your own add-on.
jpm runLaunch an instance of Firefox with your add-on installed.
jpm testRuns your add-on's unit tests.
jpm xpiPackage your add-on as an XPI file, which is the install file format for Firefox add-ons.
jpm postPackage your add-on as an XPI file, then post it to some url.
jpm watchpostPackage your add-on as an XPI file whenever there is a file changed, and post that to some url.
+ +

jpm init

+ +

This command initializes a new add-on from scratch.

+ +

Create a new directory, change into it, and run jpm init.

+ +
mkdir my-addon
+cd my-addon
+jpm init
+ +

You'll then be asked to supply some information about your add-on: this will be used to create your add-on's package.json file.

+ + + +

Most of these fields have a default, which is shown in brackets after the question. If you just press Enter, your add-on will get the default value.

+ +

Once you've supplied a value or accepted the default for these properties, you'll be shown the complete contents of "package.json" and asked to accept it.

+ +

Then jpm will create an skeleton add-on, as a starting point for your own add-on development, with the following file structure:

+ + + +

jpm run

+ +

This command runs a new instance of Firefox with the add-on installed:

+ +
jpm run
+ +

jpm run accepts the following options:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-b --binary BINARY +

Use the version of Firefox specified in BINARY. BINARY may be specified as a full path or as a path relative to the current directory.

+ +
+jpm run -b /path/to/Firefox/Nightly
+ See Selecting a browser version.
--binary-args CMDARGS +

Pass extra arguments to Firefox.

+ +

For example, to pass the -jsconsole argument to Firefox, which will launch the Browser Console, try the following:

+ +
+jpm run --binary-args -jsconsole
+ +

To pass multiple arguments, or arguments containing spaces, quote them:

+ +
+jpm run --binary-args '-url mzl.la -jsconsole'
+
--debugRun the add-on debugger attached to the add-on.
-o --overload PATH +

Rather than use the SDK modules built into Firefox, use the modules found at PATH. If -o is specified and PATH is omitted, jpm will look for the JETPACK_ROOT environment variable and use its value as the path.

+ +

See Overloading the built-in modules for more information.

+
-p --profile= PROFILE +

By default, jpm uses a clean temporary Firefox profile each time you call jpm run. Use the --profile option to instruct jpm to launch Firefox with an existing profile.

+ +

The PROFILE value may be a profile name or the path to the profile.

+ +

See Using profiles for more information.

+
-v --verboseVerbose operation.
--no-copy +
Use with caution because jpm run|test changes many preferences, never use with your main profile.
+ +
This only applies when --profile is used.
+ Disables the copying of the profile used, which allows one to reuse a profile.
 
+ +

jpm test

+ +

Use this command to run an add-on's unit tests. It will:

+ + + +
jpm test
+
+ +

See the tutorial on unit testing and the reference documentation for the assert module for more details on this.

+ +

jpm test accepts the following options:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-b --binary BINARY +

Use the version of Firefox specified in BINARY. BINARY may be specified as a full path or as a path relative to the current directory.

+ +
+jpm test -b /path/to/Firefox/Nightly
+ +

See Selecting a browser version.

+
--binary-args CMDARGS +

Pass extra arguments to Firefox.

+ +

For example, to pass the -jsconsole argument to Firefox, which will launch the Browser Console, try the following:

+ +
+jpm test --binary-args -jsconsole
+ +

To pass multiple arguments, or arguments containing spaces, quote them:

+ +
+jpm test --binary-args '-url mzl.la -jsconsole'
+
--debugRun the add-on debugger attached to the add-on.
-f --filter FILE[:TEST] +

Only run tests whose filenames match FILE and optionally match TEST, both regexps.

+ +
+jpm test --filter base64:btoa
+ +

The above command only runs tests in files whose names contain "base64", and in those files only runs tests whose names contain "btoa".

+
-o --overload PATH +

Rather than use the SDK modules built into Firefox, use the modules found at PATH. If -o is specified and PATH is omitted, jpm will look for the JETPACK_ROOT environment variable and use its value as the path.

+ +

See Overloading the built-in modules for more information.

+
-p --profile PROFILE +

By default, jpm uses a clean temporary Firefox profile each time you call jpm run. Use the --profile option to instruct jpm to launch Firefox with an existing profile.

+ +

The PROFILE value may be a profile name or the path to the profile.

+ +

See Using profiles for more information.

+
--stop-on-error +

By default jpm test keeps running tests even after tests fail. Specify --stop-on-error to stop running tests after the first failure:

+ +
+jpm test --stop-on-error
+
--tbplPrint test output in Treeherder format
--times NUMBER +

Run tests NUMBER of times:

+ +
+jpm test --times 2
+
-v --verboseVerbose operation.
--no-copy +
Use with caution because jpm run|test changes many preferences, never use with your main profile.
+ +
This only applies when --profile is used.
+ Disables the copying of the profile used, which allows one to reuse a profile.
+ +

jpm xpi

+ +

This command packages the add-on as an XPI file, which is the install file format for Mozilla add-ons.

+ +
jpm xpi
+ +

It looks for a file called package.json in the current directory and creates the corresponding XPI file. It ignores any ZIPs or XPIs in the add-on's root, and any test files.

+ +

Once you have built an XPI file you can distribute your add-on by submitting it to addons.mozilla.org.

+ +

jpm xpi accepts the following option:

+ + + + + + + + +
-v --verbose +

Verbose operation:

+ +
+jpm xpi -v
+
+ +

jpm post

+ +

This command packages the add-on as an XPI file, the posts it to some url.

+ +
jpm post
+ +

It looks for a file called package.json in the current directory and creates a XPI file with which to post to the --post-url.

+ +

jpm post accepts the following options:

+ + + + + + + + + + + + +
--post-url URL +

The url to post the extension to after creating a XPI.

+ +
+jpm post --post-url http://localhost:8888/
+ +

See Using Post and Watchpost for more information.

+
-v --verbose +

Verbose operation:

+ +
+jpm post --post-url http://localhost:8888/ -v
+
+ +

jpm watchpost

+ +

This command packages the add-on as an XPI file, the posts it to some url whenever a file in the current working directory changes.

+ +
jpm watchpost
+ +

Creates a XPI whenever a file in the current working directory changes and posts that to the --post-url.

+ +

jpm watchpost accepts the following options:

+ + + + + + + + + + + + +
--post-url URL +

The url to post the extension to after creating a XPI.

+ +
+jpm watchpost --post-url http://localhost:8888/
+ +

See Using Post and Watchpost for more information.

+
-v --verbose +

Verbose operation:

+ +
+jpm watchpost --post-url http://localhost:8888/ -v
+
+ +

Techniques

+ +

Selecting a browser version

+ +

By default, jpm run and jpm test will run the release version of Firefox. You can instruct jpm to use a different version in one of two ways:

+ + + +

Using .jpmignore to ignore files

+ +

Using .jpmignore is similar to using .gitignore with git, .hgignore with Mercurial, or .npmignore with npm. By using this file you can let jpm know which files you would like it to ignore when building a .xpi file with jpm xpi.

+ +

Here is an example:

+ +
# Ignore .DS_Store files created by mac
+.DS_Store
+
+# Ignore any zip or xpi files
+*.zip
+*.xpi
+
+ +

A .jpmignore file with the above contents would ignore all zip files and .DS_Store files from the xpi generated by jpm xpi.

+ +

Using profiles

+ +

By default, jpm run uses a new profile each time it is executed. This means that any profile-specific data entered from one run of jpm will not, by default, be available in the next run.

+ +

This includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage API.

+ +

To make jpm use a specific profile, pass the --profile option, specifying the name of the profile you wish to use, or the path to the profile.

+ +
jpm run --profile boogaloo
+
+ +
jpm run --profile path/to/boogaloo
+ +

If you supply --profile but its argument is not the name of or path to an existing profile, jpm will open the profile manager,  enabling you to select and existing profile or create a new one:

+ +
jpm run --profile i-dont-exist
+ +

Developing without browser restarts

+ +

Because jpm run restarts the browser each time you invoke it, it can be a little cumbersome if you are making very frequent changes to an add-on. An alternative development model is to use the Extension Auto-Installer add-on: this listens for new XPI files on a specified port and installs them automatically. That way you can test new changes without needing to restart the browser:

+ + + +

You could even automate this workflow with a simple script. For example:

+ +
jpm watchpost --post-url http://localhost:8888/
+
+ +

Note that the logging level defined for the console is different when you use this method, compared to the logging level used when an add-on is run using jpm run. This means that if you want to see output from console.log() messages, you'll have to tweak a setting. See the documentation on logging levels for the details on this.

+ +

Overloading the built-in modules

+ +

The SDK modules you use to implement your add-on are built into Firefox. When you run or package an add-on using jpm run or jpm xpi, the add-on will use the versions of the modules in the version of Firefox that hosts it.

+ +

As an add-on developer, this is usually what you want. But if you're developing the SDK modules themselves, of course, it isn't. In this case you need to:

+ + + +
jpm run -o
+
+ +

This instructs jpm to use the local copies of the SDK modules, not the ones in Firefox. If you don't want to set the JETPACK_ROOT environment variable, you can pass the location of your copy of the SDK modules along with -o:

+ +
jpm run -o "/path/to/SDK/"
diff --git a/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html b/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html new file mode 100644 index 0000000000..c5f41a2baf --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tutorials/adding_a_button_to_the_toolbar/index.html @@ -0,0 +1,100 @@ +--- +title: Einen Button zur Toolbar hinzufügen +slug: Mozilla/Add-ons/SDK/Tutorials/Adding_a_Button_to_the_Toolbar +translation_of: Archive/Add-ons/Add-on_SDK/Tutorials/Adding_a_Button_to_the_Toolbar +--- +
+ Für dieses Tutorial wird die erfolgreiche Installation des SDK und erlernte Vorkenntnisse von cfx vorrausgesetzt.
+
+

Dieses Widget wird ab Firefox 29 nicht mehr verwendet/funktionieren. Um Buttons in Firefox 29 (+) hinzuzufügen, benutze bitte die UI Module, besonders die Action-Buttons oder Toogle-Buttons APIs.

+
+

Um einen Button zur Toolbar hinzuzufügen, verwende das widget-Module.

+

Erstelle ein neues Verzeichnis, navigiere mit der Eingabeaufforderung in dieses Verzeichnis, und gib cfx init ein. Dann öffne die Datei "main.js" im "lib"-Verzeichnis und gib folgenden Code ein:

+
var widgets = require("sdk/widget");
+var tabs = require("sdk/tabs");
+
+var widget = widgets.Widget({
+  id: "mozilla-link",
+  label: "Mozilla website",
+  contentURL: "http://www.mozilla.org/favicon.ico",
+  onClick: function() {
+    tabs.open("http://www.mozilla.org/");
+  }
+});
+

Das Widget wird wird zur AddOn-Leiste (unten am Fensterrand) hinzugefügt:

+

Du kannst leider nicht die Standart-Position des Icons ändern, aber der User kann den Standort jederzeit verändern. Das id-Attribut ist zwingend erforderlich. Es speichert die Position des Icons und sollte nicht verändert weren, da sonst wieder der Standart wiederhergestellt wird.

+

Beim Aktivieren wird dieser Link geöffnet: http://www.mozilla.org.

+
+  
+

Das Icon angeben (URL)

+

Wenn Du dieses Widget verwendest, kannst Du das Icon via contentURL: anzeigen. Das kann eine lokale, aber auch eine externe Datei sein. Allerdings lässt es sich nicht empfehlen Icons im Internet zu verwenden, da bei einem Serverausfall die Grafik nicht geladen werden kann. Das Beispiel verwendet eine Grafik namens "my-icon.png" aus dem AddOn-Verzeichnis (data):

+
+
var widgets = require("sdk/widget");
+var tabs = require("sdk/tabs");
+var self = require("sdk/self");
+
+var widget = widgets.Widget({
+  id: "mozilla-link",
+  label: "Mozilla website",
+  contentURL: self.data.url("my-icon.png"),
+  onClick: function() {
+    tabs.open("http://www.mozilla.org/");
+  }
+});
+
+

Du kannst das Icon immer mit contentURL ändern!

+

Responding To the User

+

You can listen for click, mouseover, and mouseout events by passing handler functions as the corresponding constructor options. The widget example above assigns a listener to the click event using the onClick option, and there are similar onMouseover and onMouseout options.

+

To handle user interaction in more detail, you can attach a content script to the widget. Your add-on script and the content script can't directly access each other's variables or call each other's functions, but they can send each other messages.

+

Here's an example. The widget's built-in onClick property does not distinguish between left and right mouse clicks, so to do this we need to use a content script. The script looks like this:

+
window.addEventListener('click', function(event) {
+  if(event.button == 0 && event.shiftKey == false)
+    self.port.emit('left-click');
+  if(event.button == 2 || (event.button == 0 && event.shiftKey == true))
+    self.port.emit('right-click');
+    event.preventDefault();
+}, true);
+

It uses the standard DOM addEventListener() function to listen for click events, and handles them by sending the corresponding message to the main add-on code. Note that the messages "left-click" and "right-click" are not defined in the widget API itself, they're custom events defined by the add-on author.

+

Save this script in your data directory as "click-listener.js".

+

Next, modify main.js to:

+ +
var widgets = require("sdk/widget");
+var tabs = require("sdk/tabs");
+var self = require("sdk/self");
+
+var widget = widgets.Widget({
+  id: "mozilla-link",
+  label: "Mozilla website",
+  contentURL: "http://www.mozilla.org/favicon.ico",
+  contentScriptFile: self.data.url("click-listener.js")
+});
+widget.port.on("left-click", function(){
+  console.log("left-click");
+});
+widget.port.on("right-click", function(){
+  console.log("right-click");
+});
+

Now execute cfx run again, and try right- and left-clicking on the button. You should see the corresponding string written to the command shell.

+

Attaching a Panel

+ +

+

If you supply a panel object to the widget's constructor, then the panel will be shown when the user clicks the widget:

+
var data = require("sdk/self").data;
+var clockPanel = require("sdk/panel").Panel({
+  width:215,
+  height:160,
+  contentURL: data.url("clock.html")
+});
+require("sdk/widget").Widget({
+  id: "open-clock-btn",
+  label: "Clock",
+  contentURL: data.url("History.png"),
+  panel: clockPanel
+});
+

To learn more about working with panels, see the tutorial on displaying a popup.

+

Learning More

+

To learn more about the widget module, see its API reference documentation.

+

To learn more about content scripts, see the content scripts guide.

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html b/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html new file mode 100644 index 0000000000..dbafb57553 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tutorials/getting_started/index.html @@ -0,0 +1,214 @@ +--- +title: Getting started +slug: Mozilla/Add-ons/SDK/Tutorials/Getting_started +translation_of: Mozilla/Add-ons/SDK/Tutorials/Getting_Started_%28jpm%29 +--- +

This tutorial walks through creating a simple add-on using the SDK.

+ +

Prerequisites

+ +

To create add-ons for Firefox using the SDK, you'll first need to follow the instructions to install and activate the SDK. Once you've done that, you'll be looking at a command prompt.

+ +

Initializing an empty add-on

+ +

In the command prompt, create a new directory. The directory doesn't have to be under the SDK root: you can create it anywhere you like. Navigate to it, type cfx init, and hit enter:

+ +
mkdir my-addon
+cd my-addon
+cfx init
+
+ +

You'll see some output like this:

+ +
* lib directory created
+* data directory created
+* test directory created
+* doc directory created
+* README.md written
+* package.json written
+* test/test-main.js written
+* lib/main.js written
+* doc/main.md written
+Your sample add-on is now ready for testing:
+try "cfx test" and then "cfx run". Have fun!"
+
+ +

Implementing the add-on

+ +

Now you can write the add-on's code, which goes in the "main.js" file in your "lib" directory. This file was created for you in the previous step. Open it and add the following code:

+ +
var buttons = require('sdk/ui/button/action');
+var tabs = require("sdk/tabs");
+
+var button = buttons.ActionButton({
+  id: "mozilla-link",
+  label: "Visit Mozilla",
+  icon: {
+    "16": "./icon-16.png",
+    "32": "./icon-32.png",
+    "64": "./icon-64.png"
+  },
+  onClick: handleClick
+});
+
+function handleClick(state) {
+  tabs.open("https://www.mozilla.org/");
+}
+
+ +

Save the file.

+ +

Next, save these three icon files to the "data" directory:

+ + + + + + + + + + + + + + + + +
icon-16.png
icon-32.png
icon-64.png
+ +

Back at the command prompt, type:

+ +
cfx run
+
+ +

This is the SDK command to run a new instance of Firefox with your add-on installed. When Firefox launches, in the top-right corner of the browser you'll see an icon with the Firefox logo. Click the icon, and a new tab will open with https://www.mozilla.org/ loaded into it.

+ +
+

You might see an error message like this when you type cfx run:

+ +
A given cfx option has an inappropriate value:
+  ZIP does not support timestamps before 1980
+ +

If so, you've run into bug 1005412, meaning that the icon files you downloaded are given a timestamp of 1970. Until this bug is fixed, the workaround is to use the touch command to update the timestamps:

+ +
touch icon-16.png
+
+ +

That's all this add-on does. It uses two SDK modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs. In this case, we've created a button whose icon is the Firefox icon, and added a click handler that loads the Mozilla home page in a new tab.

+ +

Try editing this file. For example, we could change the page that gets loaded:

+ +
var buttons = require('sdk/ui/button/action');
+var tabs = require("sdk/tabs");
+
+var button = buttons.ActionButton({
+  id: "mozilla-link",
+  label: "Visit Mozilla",
+  icon: {
+    "16": "./icon-16.png",
+    "32": "./icon-32.png",
+    "64": "./icon-64.png"
+  },
+  onClick: handleClick
+});
+
+function handleClick(state) {
+  tabs.open("https://developer.mozilla.org/");
+}
+ +

At the command prompt, execute cfx run again. This time clicking it takes you to https://developer.mozilla.org/.

+ +

Packaging the add-on

+ +

When you've finished the add-on and are ready to distribute it, you'll need to package it as an XPI file. This is the installable file format for Firefox add-ons. You can distribute XPI files yourself or publish them to https://addons.mozilla.org so other users can download and install them.

+ +

To build an XPI, just execute the command cfx xpi from the add-on's directory:

+ +
cfx xpi
+
+ +

You should see a message like:

+ +
Exporting extension to my-addon.xpi.
+
+ +

To test that this worked, try installing the XPI file in your own Firefox installation. You can do this by pressing the Ctrl+O key combination (Cmd+O on Mac) from within Firefox, or selecting the "Open" item from Firefox's "File" menu. This will bring up a file selection dialog; navigate to the "my-addon.xpi" file, open it and follow the prompts to install the add-on.

+ +

Summary

+ +

In this tutorial we've built and packaged an add-on using three commands:

+ + + +

These are the three main commands you'll use when developing SDK add-ons. There's comprehensive reference documentation covering all the commands you can use and all the options they take.

+ +

The add-on code itself uses two SDK modules, action button and tabs. There's reference documentation for all the high-level and low-level APIs in the SDK.

+ +

What's next?

+ +

To get a feel for some of the things you can do with the SDK APIs, try working through some of the tutorials.

+ +

Advanced techniques

+ +

Overriding the built-in modules

+ +

The SDK modules you use to implement your add-on are built into Firefox. When you run or package an add-on using cfx run or cfx xpi, the add-on will use the versions of the modules in the version of Firefox that hosts it.

+ +

As an add-on developer, this is usually what you want. But if you're developing the SDK modules themselves, of course, it isn't. In this case it's assumed that you have checked out the SDK from its GitHub repo and will have run the bin/activate script from the root of your checkout.

+ +

Then when you invoke cfx run or cfx xpi, you pass the "-o" option:

+ +
cfx run -o
+
+ +

This instructs cfx to use the local copies of the SDK modules, not the ones in Firefox.

+ +

Developing without cfx run

+ +

Because cfx run restarts the browser each time you invoke it, it can be a little cumbersome if you are making frequent changes to an add-on. An alternative development model is to use the Extension Auto-Installer add-on: this listens for new XPI files on a specified port and installs them automatically. That way you can test new changes without needing to restart the browser:

+ + + +

You could even automate this workflow with a simple script. For example:

+ +
while true ; do cfx xpi ; wget --post-file=codesy.xpi http://localhost:8888/ ; sleep 5 ; done
+
+ +

Note that the logging level defined for the console is different when you use this method, compared to the logging level used when an add-on is run using cfx run. This means that if you want to see output from console.log() messages, you'll have to tweak a setting. See the documentation on logging levels for the details on this.

+ +

Another example using grunt and grunt-shell:

+ +
module.exports = function(grunt) {
+  'use strict';
+  require('matchdep').filterDev('grunt-!(cli)').forEach(grunt.loadNpmTasks);
+  grunt.initConfig({
+    shell: {
+      xpi: {
+        command: [
+          'cd pluginpath',
+          'cfx xpi',
+          'wget --post-file=pluginname.xpi http://localhost:8888/ || echo>/dev/null'
+        ].join('&&')
+      }
+    },
+    watch: {
+      xpi: {
+        files: ['pluginpath/**'],
+        tasks: ['shell:xpi']
+      }
+    }
+  });
+
+  grunt.loadNpmTasks('grunt-contrib-watch');
+  grunt.loadNpmTasks('grunt-shell');
+  grunt.registerTask('default', ['watch']);
+};
diff --git a/files/de/mozilla/add-ons/sdk/tutorials/index.html b/files/de/mozilla/add-ons/sdk/tutorials/index.html new file mode 100644 index 0000000000..6eb7e95b49 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tutorials/index.html @@ -0,0 +1,165 @@ +--- +title: Tutorials +slug: Mozilla/Add-ons/SDK/Tutorials +translation_of: Archive/Add-ons/Add-on_SDK/Tutorials +--- +

Auf dieser Seite wird gezeigt, wie man spezifische praktische Aufgaben unter Verwendung des SDKs bewältigen kann.

+
+

Erste Schritte

+
+
+
+
+ Installation
+
+ Download, Installation und Einrichtung des SDKs unter Windows, OS X und Linux.
+
+
+
+ Fehlerbehebung
+
+ Lösungsansätze zum Beheben klassischer Probleme und Möglichkeiten zum Erhalten weiterer Hilfe.
+
+
+
+
+
+ Erste Schritte mit cfx
+
+ Die elementaren cfx-Befehle zum Erstellen von Add-ons.
+
+
+
+
+

Benutzeroberflächen erstellen

+
+
+
+
+ Toolbar-Button hinzufügen
+
+ Einen Button zur Firefox-Toolbar hinzufügen.
+
+ Hauptmenü erweitern
+
+ Items den Hauptmenüs von Firefox hinzufügen.
+
+
+
+
+
+ Popups anzeigen
+
+ Einen Popup-Dialog unter Verwendung von HTML und JavaScript anzeigen.
+
+ Kontextmenü erweitern
+
+ Items dem Kontextmenü von Firefox hinzufügen.
+
+
+
+
+

Interagieren mit dem Browser

+
+
+
+
+ Webseiten öffnen
+
+ Mit Hilfe des tabs-Moduls eine Seite in einem neuen Tab oder einem neuen Fenster öffnen und auf deren Inhalt zugreifen.
+
+ Auf das Laden von Webseiten reagieren
+
+ Mit dem tabs-Modul erkennen, wenn neue Webseiten geladen werden und auf deren Inhalte zugreifen.
+
+
+
+
+
+ Geöffnete Tabs auflisten
+
+ Mit dem tabs-Modul geöffnete Tabs auflisten und auf ihre Inhalte zugreifen.
+
+
+
+
+

Inhalte von Webseiten bearbeiten

+
+
+
+
+ Webseiten basierend auf deren URL bearbeiten
+
+ URL-Filter für Webseiten erstellen und ein Script darin ausführen, sobald eine Seite geladen wird, deren URL mit einer URL im Filter übereinstimmt.
+
+
+
+
+
+ Aktive Webseite bearbeiten
+
+ Ein Script dynamisch in der aktuell aktiven Website ausführen.
+
+
+
+
+

Entwicklungstechnologien

+
+
+
+
+ Loggen
+
+ Nachrichten auf der Konsole für Diagnosezwecke ausgeben.
+
+ Wiederverwendbare Module erstellen
+
+ Gliedere dein Add-on in einzelne Module und erleichtere somit das Entwickeln, Debuggen und Erhalten des Add-ons. Erstelle wiederverwendbare Pakete, die deine Module enthalten, damit auch andere Add-on-Entwickler diese verwenden können.
+
+ Testen der Bestandteile
+
+ Erstellen und Ausführen von Tests mit dem SDK-test-Framework.
+
+ Chrome-Autorität
+
+ Erhalte Zugriff auf das Components-Objekt und erlaube deinem Add-on XPCOM-Objekte zu laden und zu verwenden.
+
+ Erstellen von benutzerdefinierten Events
+
+ Erlaube deinen erstellten Objekten, eigene Events auszugeben.
+
+
+
+
+
+ Auf das Starten und Beenden des Add-ons reagieren
+
+ Werde benachrichtigt, wenn ein Add-on von Firefox gestartet oder beendet wird und übergebe Argumente an das Add-on über die Kommandozeile.
+
+ Module von Drittanbietern verwenden
+
+ Installation und Verwendung von zusätzlichen Modulen, die nicht im SDK enthalten sind.
+
+ Lokalisierung
+
+ Entwicklung lokalisierbarer Add-ons.
+
+ Entwicklung für mobile Endgeräte
+
+ Entwicklung von Add-ons für Firefox Mobile für Android.
+
+
+
+
+

Zusammenfassung

+
+
+
+
+ Add-on "Annotator"
+
+ Walk-through durch das Beispiel-Add-on "Annotator".
+
+
+
+

 

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html b/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html new file mode 100644 index 0000000000..28e899226e --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tutorials/installation/index.html @@ -0,0 +1,134 @@ +--- +title: Installation +slug: Mozilla/Add-ons/SDK/Tutorials/Installation +translation_of: Mozilla/Add-ons/SDK/Tools/jpm#Installation +--- +
+

Die cfx Installation ist veraltet. Sie sollten stattdessen  jpm benutzen.

+ +

Mehr Informationen finden Sie unter JPM replaces CFX for Firefox 38.

+
+ +

Vorraussetzungen

+ +

Um mit dem Add-on SDK zu entwickeln, brauchen Sie:

+ + + +

Installation

+ +

Installation auf FreeBSD/ OS X / Linux

+ +

Entpacken Sie die Dateien an einen beliebigen Ort und navigieren Sie mit einer Kommandozeile/Shell in das Stammverzeichnis der SDK. Zum Beispiel so:

+ +
tar -xf addon-sdk.tar.gz
+cd addon-sdk
+
+ +

Danach aktivieren Sie so die SDK, wenn Sie ein Bash Benutzer sind (was die meisten sind):

+ +
source bin/activate
+
+ +

Als nicht-Bash Benutzer, müssen Sie folgenden Befehl verwenden:

+ +
bash bin/activate
+
+ +

In Ihrer Eingabeaufforderung sollten Sie jetzt einen neuen Prefix haben, der den Namen des SDK's root Verzeichniss hat:

+ +
(addon-sdk)~/mozilla/addon-sdk >
+
+ +

Installation auf Mac mit Homebrew

+ +

Falls Sie ein Mac Benutzer sind, können Sie die SDK auch mithilfe von Homebrew und dem folgenden Befehl installieren:

+ +
brew install mozilla-addon-sdk
+ +

Sobald die Installation erfolgreich abgeschlossen wurde, können Sie das cfx Programm jederzeit in der Kommandozeile verwenden und benötigen keine vorherige Aktivierung.

+ +

Installation auf Windows

+ +

Entpacken Sie die Dateien an einen beliebigen Ort und navigieren Sie mit einer Kommandozeile/Shell in das Stammverzeichnis der SDK. Zum Beispiel so:

+ +
7z.exe x addon-sdk.zip
+cd addon-sdk
+
+ +

Dann führen Sie folgenden Befehl aus:

+ +
bin\activate
+
+ +

In Ihrer Eingabeaufforderung sollten Sie jetzt einen neuen Prefix haben, der den Namen des SDK's root Verzeichniss hat:

+ +
(C:\Users\mozilla\sdk\addon-sdk) C:\Users\Work\sdk\addon-sdk>
+
+ +

Plausibilitätsprüfung

+ +

Rufen Sie diesen Befehl in einer Kommandozeile auf:

+ +
cfx
+
+ +

Es sollte eine Meldung produzieren, die in etwa so aussieht, gefolgt von einer Auflistung der Benutzungsoptionen:

+ +
Usage: cfx [options] [command]
+
+ +

Das ist das cfx Kommandozeilen Programm. Es ist ihr primäres Interface für das Add-on SDK. Damit können Sie Firefox starten und ihr Add-on testen, ihr Add-on zur Veröffentlichung verpacken, sich Dokumentationen ansehen und Unit tests durchführen.

+ +

Nächste Schritte

+ +

Schauen Sie sich als nächstes das Tutorial  Getting Started With cfx an, das erklärt, wie man ein Add-on mit dem CFX Tool erstellt.

+ +

Fortgeschrittene Themen

+ +

Das SDK von Git verwenden

+ +

Die SDK wurde in GitHub entwickelt. Statt das verpackte Release zu verwenden, können Sie von GitHub repository den letzten Entwicklungsstand, statt dem offiziellen Release verwenden.

+ +

Wenn Sie den letzten Entwicklungsstand verwenden, benötigen Sie eine Nightly Version von Firefox und Sie können keine Add-ons bei addons.mozilla.org (AMO) einreichen, da AMP den offiziellen Release vorraussetzt.

+ +

Erweiterungen für AMO von Git Quellen entwickeln

+ +

Zum Einreichein bei AMO können nur der neuste git release tag für die Add-On SDK Quelldateien benutzt werden.

+ +

Der Gitarchivbefehl wird benötigt um ein Paar  Git Atrributplatzhalter im Git Klonverzeichnis zu erweitern.

+ +

git checkout 1.16

+ +

git archive 1.16 python-lib/cuddlefish/_version.py | tar -xvf -

+ +

Permanente Aktivierung

+ +

Sie können die Aktivierung permanent machen, in dem Sie die Variablen in ihrer Umgebung permanent setzen, so dass jede Eingabeaufforderung sie lesen kann. In diesem Fall müssen nicht jedesmal den activate Befehl verwenden, sobald Sie eine neue Eingabeaufforderung öffnen.

+ +

Da sich die Anzahl der zu setzenden Variable mit jeder neuen Version des SDK ändern kann, ist es am Besten sich nach den jeweiligen Aktivierungsskripten zu richten um Festzustellen welche Variablen verwendet werden. Die Aktivierung benutzt verschieden Skripte für Bashumgebungen (Linux und OS X) und Windowsumgebungen.

+ +

Windows

+ +

Bei Windows, benutzt bin\activate die activate.bat Datei. Sie können die Aktivierung permanent machen, indem Sie in der Kommandozeile das setx tool verwenden.

+ +

Linux / OS X

+ +

Auf Linux und OS X benutz source bin/activate das activate bash Skript. Die Aktivierung kann per ~/.bashrc (Linux) oder ~/.bashprofile (OS X) Permanent gemacht werden.

+ +

Eine Alternative ist das Erstellen eines symbolischen Links im Ordner ~/bin, der auf das cfx Programm verweist:

+ +
ln -s PATH_TO_SDK/bin/cfx ~/bin/cfx
+
+ +

Falls Sie Homebrew zur Installation des SDKs verwenden, werden die Umgebungsvariablen bereits permanent für Sie gesetzt.

+ +

activate

+ +

Der activate Befehl setzt Umgebungsvariablen, die zur Nutzung der SDK nötig sind. Er setzt die Variablen nur für die aktuelle Kommandozeile. Das heisst, wenn Sie eine neue Kommandozeile öffnen, müssen Sie den Befehl erneut ausführen, bevor Sie die SDK wieder benutzen können.

+ +

Das bedeutet, dass Sie mehrere Kopien der SDK an verschiedenen Orten ihrer Festplatte haben können und zwischen diesen wechseln können, oder sogar gleichzeitig in verschiedenen Eingabeaufforderungen aktiviert haben können.

diff --git a/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html b/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html new file mode 100644 index 0000000000..9d33162519 --- /dev/null +++ b/files/de/mozilla/add-ons/sdk/tutorials/mobile_development/index.html @@ -0,0 +1,476 @@ +--- +title: Developing for Firefox Mobile +slug: Mozilla/Add-ons/SDK/Tutorials/Mobile_development +translation_of: Archive/Add-ons/Add-on_SDK/Tutorials/Mobile_development +--- +
+

Developing add-ons for Firefox Mobile is still an experimental feature of the SDK. Although the SDK modules used are stable, the setup instructions and cfx commands are likely to change.

+
+
+

To follow this tutorial you'll need to have installed the SDK and learned the basics of cfx.

+
+

Firefox for Android implements its UI using native Android widgets instead of XUL. With the add-on SDK you can develop add-ons that run on this new version of Firefox Mobile as well as on the desktop version of Firefox.

+

You can use the same code to target both desktop Firefox and Firefox Mobile, and just specify some extra options to cfx run, cfx test, and cfx xpi when targeting Firefox Mobile.

+

Right now not all modules are fully functional, but we're working on adding support for more modules. The tables at the end of this guide list the modules that are currently supported on Firefox Mobile.

+

This tutorial explains how to run SDK add-ons on an Android device connected via USB to your development machine. We'll use the Android Debug Bridge (adb) to communicate between the Add-on SDK and the device.

+

+

It's possible to use the Android emulator to develop add-ons for Android without access to a device, but it's slow, so for the time being it's much easier to use the technique described below.

+

Setting up the Environment

+

First you'll need an Android device capable of running the native version of Firefox Mobile. Then:

+ +

On the development machine:

+ +

Next, attach the device to the development machine via USB.

+

Now open up a command shell. Android Platform Tools will have installed adb in the "platform-tools" directory under the directory in which you installed the Android SDK. Make sure the "platform-tools" directory is in your path. Then type:

+
adb devices
+
+

You should see some output like:

+
List of devices attached
+51800F220F01564 device
+
+

(The long hex string will be different.)

+

If you do, then adb has found your device and you can get started.

+

Running Add-ons on Android

+

You can develop your add-on as normal, as long as you restrict yourself to the supported modules.

+

When you need to run the add-on, first ensure that Firefox is not running on the device. Then execute cfx run with some extra options:

+
cfx run -a fennec-on-device -b /path/to/adb --mobile-app fennec --force-mobile
+
+

See "cfx Options for Mobile Development" for the details of this command.

+

In the command shell, you should see something like:

+
Launching mobile application with intent name org.mozilla.fennec
+Pushing the addon to your device
+Starting: Intent { act=android.activity.MAIN cmp=org.mozilla.fennec/.App (has extras) }
+--------- beginning of /dev/log/main
+--------- beginning of /dev/log/system
+Could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'.
+info: starting
+info: starting
+zerdatime 1329258528988 - browser chrome startup finished.
+
+

This will be followed by lots of debug output.

+

On the device, you should see Firefox launch with your add-on installed.

+

console.log() output from your add-on is written to the command shell, just as it is in desktop development. However, because there's a lot of other debug output in the shell, it's not easy to follow. The command adb logcat prints adb's log, so you can filter the debug output after running the add-on. For example, on Mac OS X or Linux you can use a command like the below to filter only the lines of console output:

+
adb logcat | grep console
+
+

You can experiment with different filter strings on adb logcat to focus in on the lines relevant to you.

+

Running cfx test is identical:

+
cfx test -a fennec-on-device -b /path/to/adb --mobile-app fennec --force-mobile
+
+

cfx Options for Mobile Development

+

As you see in the quote above, cfx run and cfx test need four options to work on Android devices.

+ + + + + + + + + + + + + + + + + + + + + + + +
-a fennec-on-deviceThis tells the Add-on SDK which application will host the add-on, and should be set to "fennec-on-device" when running an add-on on Firefox Mobile on a device.
-b /path/to/adb +

As we've seen, cfx uses the Android Debug Bridge (adb) to communicate with the Android device. This tells cfx where to find the adb executable.

+

You need to supply the full path to the adb executable.

+
--mobile-app +

This is the name of the Android intent. Its value depends on the version of Firefox Mobile that you're running on the device:

+
    +
  • fennec: if you're running Nightly
  • +
  • fennec_aurora: if you're running Aurora
  • +
  • firefox_beta: if you're running Beta
  • +
  • firefox: if you're running Release
  • +
+

If you're not sure, run a command like this (on OS X/Linux, or the equivalent on Windows):

+
+adb shell pm list packages | grep mozilla
+

You should see "package" followed by "org.mozilla." followed by a string. The final string is the name you need to use. For example, if you see:

+
+package:org.mozilla.fennec
+

...then you need to specify:

+
+--mobile-app fennec
+

This option is not required if you have only one Firefox application installed on the device.

+
--force-mobile +

This is used to force compatibility with Firefox Mobile, and should always be used when running on Firefox Mobile.

+
+

Packaging Mobile Add-ons

+

To package a mobile add-on as an XPI, use the command:

+
cfx xpi --force-mobile
+
+

Actually installing the XPI on the device is a little tricky. The easiest way is probably to copy the XPI somewhere on the device:

+
adb push my-addon.xpi /mnt/sdcard/
+
+

Then open Firefox Mobile and type this into the address bar:

+
file:///mnt/sdcard/my-addon.xpi
+
+

The browser should open the XPI and ask if you want to install it.

+

Afterwards you can delete it using adb as follows:

+
adb shell
+cd /mnt/sdcard
+rm my-addon.xpi
+
+

+

Module Compatibility

+

Modules not supported in Firefox Mobile are marked in the tables below.

+

High-Level APIs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addon-pageNot supported
base64Supported
clipboardNot supported
context-menuNot supported
hotkeysSupported
indexed-dbSupported
l10nSupported
notificationsSupported
page-modSupported
page-workerSupported
panelNot supported
passwordsSupported
private-browsingNot supported
querystringSupported
requestSupported
selectionNot supported
selfSupported
simple-prefsSupported
simple-storageSupported
systemSupported
tabsSupported
timersSupported
uiNot supported
urlSupported
widgetNot supported
windowsSupported
+

Low-Level APIs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
loaderSupported
chromeSupported
console/plain-textSupported
console/tracebackSupported
content/contentSupported
content/loaderSupported
content/modSupported
content/workerSupported
core/heritageSupported
core/namespaceSupported
core/promiseSupported
event/coreSupported
event/targetSupported
frame/hidden-frameSupported
frame/utilsSupported
io/byte-streamsSupported
io/fileSupported
io/text-streamsSupported
lang/functionalSupported
lang/typeSupported
loader/cuddlefishSupported
loader/sandboxSupported
net/urlSupported
net/xhrSupported
places/bookmarksNot supported
places/faviconNot supported
places/historyNot supported
platform/xpcomSupported
preferences/serviceSupported
stylesheet/styleSupported
stylesheet/utilsSupported
system/environmentSupported
system/eventsSupported
system/globalsSupported
system/runtimeSupported
system/unloadSupported
system/xul-appSupported
tabs/utilsSupported
test/assertSupported
test/harnessSupported
test/httpdSupported
test/runnerSupported
test/utilsSupported
ui/button/actionNot supported
ui/button/toggleNot supported
ui/frameNot supported
ui/idSupported
ui/sidebarNot supported
ui/toolbarNot supported
util/arraySupported
util/collectionSupported
util/deprecateSupported
util/listSupported
util/match-patternSupported
util/objectSupported
util/uuidSupported
window/utilsSupported
+

 

diff --git a/files/de/mozilla/add-ons/security_best_practices_in_extensions/index.html b/files/de/mozilla/add-ons/security_best_practices_in_extensions/index.html new file mode 100644 index 0000000000..689a9b9679 --- /dev/null +++ b/files/de/mozilla/add-ons/security_best_practices_in_extensions/index.html @@ -0,0 +1,80 @@ +--- +title: Sicherheitsleitfaden bei Erweiterungen +slug: Mozilla/Add-ons/Security_best_practices_in_extensions +tags: + - Add-ons + - Anleitung + - Erweiterungen + - Leitfaden + - Sicherheit +translation_of: Archive/Add-ons/Security_best_practices_in_extensions +--- +

{{ draft() }}

+ +

Dieses Dokument ist dazu gedacht, für Entwickler als Leitfaden zu bestmöglichen Vorgensweisen bei der Absicherung ihrer Erweiterung zu dienen. Dein Ziel ist es, deine Nutzer zu schützen. Einige Einträge sind strikte Richtlinien, was Bedeutet, dass wenn Du diesen nicht folgst, dein Add-On im Gegenzug auf Mozilla Add-Ons nicht akzeptiert wird. Andere Einträge sind Empfehlungen. Der Unterschied wird klar gekennzeichnet.

+ +

Es ist aus der Perspektive einer Firefox Erweiterung geschrieben, aber die meisten Einträge beziehen sich auf Erweiterungen für andere Mozilla-basierte Applikationen wie Thunderbird oder SeaMonkey.

+ +

Handhabung von Webinhalten

+ +

Im Allgemeinen ist der beste Weg sicherzustellen, dass der Browser beim Laden von Inhalten nicht kompromittiert wird, dafür zu sorgen, dass diese keine entsprechenden Rechte haben. Eine detailliertere Erklärung dieses Prozesses findet sich unter Webinhalte ohne Sicherheitsprobleme in einer Erweiterung anzeigen.

+ +

Die Rechte, die ein Dokument bekommt, hängen auch davon ab, wo es herkommt.  Zum Beispiel: Wenn Du eine chrome URL lädst, bedeutet es, dass der Inhalt in Firefox registriert wurde und vollen Zugriff hat. Inhalt von einer Domain (wie http://example.com) kann nur auf die gleiche Domain zugreifen. Über das File Protocol geladene Dateien können auf solche zugreifen, die auf der Festplatte und anderen lokalen Datenträgern liegen. Es gibt Wege, die content/chrome Sicherheitsbarriere zu umgehen, falls Du zum Beispiel möchtest, dass eine Webseite eine Notifikation an ein Add-On sendet (oder umgekehrt). Ein Weg das zu tun ist es, eigene DOM Events zu nutzen; siehe Interaktionen zwischen priviligierten und nicht-priviligierten Seiten.

+ +

Unabhängig davon, wo das Dokument herkommt, kannst du weiter Beschränken, was es kann, indem du Eigenschaften zum Dokumentenhalter - auch bekannt als docshell - zuweist.

+ +

frame.docShell.allowImages = false;
+ frame.docShell.allowJavascript = false;
+ frame.docShell.allowPlugins = false;

+ +

Es gibt mehr Beispiele in dem oben gelisteten Dokument. Unter gewissen Umständen möchte man Code in der Erweiterung ausführen, allerdings solltest du ihm eingeschränkte Rechte geben. Einer der besten Wege das zu tun ist Components.utils.evalInSandbox() zu nutzen. Beachte, dass Objekte, die an die Sandbox weitergegeben werden, eingeschränkt sind, aber solche, die wieder herauskommen es nicht sind. Nimm Bezug auf den Artikel, um herauszufinden, wie du solche Tücken vermeidest. Für weitere Informationen, siehe den Abschnitt evalInSandbox.

+ +

Die Sidebar: Ein Anwendungsfall

+ +

Die Sidebar in Firefox ist dafür gestaltet, sowohl chrome (priviligierte) Inhalte, als auch Web (nichtpriviligierte) Inhalte zu beinhalten - letzteres in Form von Webseiten. Diese Webseiten können von einem Server oder von lokalen HTML Dateien, die mit der Erweiterung gekommen sind, stammen. Für Seiten, die vom Server kommen, musst du Schritte vornehmen, um zu sicherzustellen, dass die Inhalte nicht in den Browser rückrufen und Schadcode ausführen. Hauptsächlich wird dies bewerkstelligt, indem man ein Iframe- oder Browserelement in der Sidebar erstellt und dort die Inhalte lädt. Gebe dem Inhalt ein type="content" Attribut, welches den Code im Wesentlichen sandboxed und alle Rückrufe direkt nach chrome blockiert.

+ +

eval() in einer Erweiterung nutzen

+ +

Das Nutzen der eingebauten JavaScript Funktion {{jsxref("eval")}} ist im Kontext von Erweiterungen verpönt. Während es einige Fälle gibt, in denen die Nutzung legitim ist, gibt es meist sicherere Alternativen. Dieser Blogeintrag bietet einige exzellente Beispiele, warum man eval() nicht nutzen sollte.

+ +

Gesandboxte HTTP Verbindungen

+ +

Der Hauptzweck von gesandboxten HTTP Verbindungen ist es, mit einem Webdienst zu kommunizieren, ohne mit im Browser zu der Website/dem Service gesetzten Cookies zu interferieren. Wenn Du zum Beispiel Fotos oder andere Daten von einer photo sharing Seite lädst, kannst du die Verbindungen sandboxen, sodass normales Surfen des Nutzers auf der Webseite nicht beeinflusst wird. Für einen echten Anwendungsfall, siehe diesen Blogeintrag.

+ +

Umgang mit Logins und Passwörtern

+ +

Es gibt viele Möglichkeiten, Daten in Firefox zu speichern, aber für Logins und Passwörter, solltest Du den Login Manager nutzen. Das ist der gleiche Speicher, welcher Logins von Webseiten beinhaltet und Passwörter können nur abgerufen werden, indem die Kombination von Seite/Username dem Author bekannt sind. Die Gepflogenheit für Erweiterungen ist es, eine chrome URL als den Seitenidentifikator zu nutzen, um Konflikte mit Logins für Seiten zu verhindern. Es könnte der Fall sein, dass deine Erweiterung ein anderes Werkzeug oder andere Werkzeuge für Dienste auf deiner Seite anbietet.

+ +

Diese Herangehensweise ist vorzuziehen, da es den Nutzern eine gewohnte Oberfläche für die Interaktion mit Logins über den Firefox Passwort Manager bietet. Wenn Nutzer Logins über die "Neueste Chronik löschen" Option säubern, wird das die Daten deiner Erweiterung miteinbeziehen.

+ +

APIs und Umgang mit anderen Daten

+ +

Web Inhalte sind mehr als nur Seiten, und mehr und mehr Add-Ons interagieren über das Application Programming Interfae (API) mit Webdiensten.

+ + + +

Remote Javascript und -Inhalte

+ +

Es gibt eine Zahl von Arten, wie Remotescripte in Erweiterungen genutzt werden können. Sie können in Inhalten eingebettet oder in Intervallen heruntergeladen werden.

+ +

Nicht-chrome URLs in chrome XUL oder HTML, so wie im folgenden Beispiel sind nicht erlaubt:

+ +

<script type="text/javascript" src="http://mysite.greatsite.com/js/wow-content.js" />

+ +

Im Allgemeinen sind Skripte von Remotequellen, die im Kontext von chrome laufen, nicht akzeptabel, da die Quelle der Skripte nie zu 100% garantiert werden kann und sie für Man-In-The-Middle Attacken empfindlich sind. Die einzig legitime Umgebung für Remoteskripte ist es, in einer Sandbox zu laufen. Für mehr Informationen, siehe die Sektion evalInSandbox().

+ +

evalInSandbox

+ +

Das evalInSandbox Dokument erklärt die Funktion ziemlich gut, also wird es hier keine Wiederholung geben. Die Nützlichkeit und Kraft der Funktionsweise wird von der beliebten Erweiterung Greasemonkey veranschaulich, welche unter der Prämisse arbeitet, dass Skripte heruntergeladen und gespeichert werden, um im Kontext von Webinhalten via der Sandbox injiziert zu werden. Viele Erweiterungen nutzen den Greasemonkey compiler, um die Funktion aus Bequemlichkeit in ihrer Erweiterung zu bündeln. Wenn Du dich entscheidest das zu tun, sei vorsichtig beim Editieren von gebündelten Dateien, insofern als, gut durchdachte Sicherheitsarchitekturen nicht zu verletzen.

+ +

Drittanbieter JavaScript

+ +

Im Kontext von Webseiten, ist das Nutzen von JavaScripten, welche von anderen geschrieben wurden sehr geläufig. Auch in Add-Ons ist es nicht unbekannt und kann einen nützlichen Weg darstellen, um Codewiederholungen zu vermeiden und die Entwicklung zu beschleunigen. Dieser Artikel ist über Webseiten, aber liefert einige Einsichten in generelle Risiken. Wenn Du andere Skripte einbettest, gibt es eine Reihe von Dingen, die du tun kannst, um ihre Integrität und Sicherheit für Nutzer zu gewährleisten. Als erstes, es immer von einer glaubwürdigen Quelle zu beziehen. Eine andere Sache, die du tun solltest, ist das Namespacen, nur für den Fall, dass andere Add-Ons es inkludieren. Zum Beispiel, wenn Du jQuery nutzt, gibt es da jQuery.noConflict().

+ +

Fazit

+ +

Sicherheit kann nicht als selbstverständlich angesehen werden und jede Veröffentlichung deines Add-Ons, sollte es eine neue Sicherheitsprüfung geben. Ein guter Ort, um mit Mozillas Sicherheitsmeldungen und Sicherheitsdiskussionen mitzuhalten, ist im  Mozilla Security Blog.

diff --git a/files/de/mozilla/add-ons/themes/obsolete/index.html b/files/de/mozilla/add-ons/themes/obsolete/index.html new file mode 100644 index 0000000000..d420b6ebf0 --- /dev/null +++ b/files/de/mozilla/add-ons/themes/obsolete/index.html @@ -0,0 +1,10 @@ +--- +title: Obsolete +slug: Mozilla/Add-ons/Themes/Obsolete +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Add-ons/Themes/Obsolete +--- +

This page collects theme docs that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.

+

{{ ListSubPages ("/en-US/Add-ons/Themes/Obsolete", 5) }}

diff --git a/files/de/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html b/files/de/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html new file mode 100644 index 0000000000..04bd9d08b5 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/anatomy_of_a_webextension/index.html @@ -0,0 +1,133 @@ +--- +title: Aufbau einer WebExtension +slug: Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension +translation_of: Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension +--- +
{{AddonSidebar}}
+ +

Eine Extension (Erweiterung) beinhaltet eine Sammlung von Dateien, gepackt für die Verbreitung and Installation. In diesem Artikel, gehen wir kurz auf Dateien ein, die vorhanden sein könnten.

+ +

manifest.json

+ +

"manifest.json" ist die einzige Datei, die in jeder Extension vorhanden sein muss. Sie enthält die grundlegenden Metadaten wie Name, Version und benötigte Genehmigungen. Außerdem verweist sie auf andere Dateien der Extension.

+ +

Dieses Manifest kann auch Zeiger zu mehreren anderen Dateitypen haben:

+ + + +

+ +

Für weitere Einzelheiten gehe auf manifest.json.

+ +

Neben den vom Manifest referenzierten Seiten, kann eine Extension zusätzlche Extension pages mit unterstützenden Dateien enthalten.

+ +

Hintergrundskripte

+ +

Extensions müssen oft langzeitig ihren Zustand aufrechterhalten oder Operationen, unabhängig der Lebensdauer von irgendwelchen speziellen Webseiten oder Browserfenstern, durchführen. Dafür gibt es Hintergrundskripte (background scripts).

+ +

Hintergrundskripte werden geladen, sobald die Extension geladen ist und laufen bis die Extension deaktiviert oder deinstalliert wird. Du kannst alles aus den WebExtension APIs im Skript benutzen, solange du die notwendigen Berechtigungen abgefragt hast.

+ +

Hintergrundskripte festlegen

+ +

Du kannst ein Hintergrundskript einbinden in dem du den background-Key in "manifest.json" benutzt:

+ +
// manifest.json
+
+"background": {
+  "scripts": ["background-script.js"]
+}
+ +

Du kannst mehrere background scripts angeben: wenn du sie im selben Kontext laufen lässt, so wie mehrere Skripts, die in eine einzelne Seite geladen werden.

+ +

Hintergrundskript-Umgebung

+ +

DOM APIs

+ +

Hintergrundskripte laufen im Rahmen spezieller Seiten genannt 'background pages' (Hintergrundseiten). Diese geben ihnen ein globales window, samt der vollständigen Standard DOM APIs, die von diesem Objekt bereitgestellt werden.

+ +

Du musst deine Hintergrundseite nicht bereitstellen. Wenn du dein Hintergrundskript hinzufügst, wird eine leere Hintergrundseite für dich erstellt.

+ +

Dennoch kannst du deine Hintergrundseite auch als separate HTML-Datei erstellen:

+ +
// manifest.json
+
+"background": {
+  "page": "background-page.html"
+}
+ +

WebExtension APIs

+ +

Hintergrundskripte können alles aus den WebExtension APIs im Skript nutzen, solange deren Extension die notwendigen Berechtigungen hat.

+ +

Cross-origin access

+ +

Hintergrundskripte können XHR-Anfragen an alle Hosts machen, für die sie host permissions haben.

+ +

Web content

+ +

Hintergrundskripte haben keinen direkten Zugriff auf Webseiten. Sie können jedoch Content-Scripts in Webseiten laden und mit ihnen über message-passing API kommunizieren.

+ +

Content security policy

+ +

Hintergrundskripte sind beschränkt in einigen potenziell gefährlichen Operationen, wie dem Benutzen von eval(), durch ein Sicherheitskonzept. Für mehr Informationen siehe Content Security Policy.

+ + + +

Deine Extension kann unterschiedliche Benutzeroberflächenkomponenten enthalten, deren Inhalt wird durch ein HTML-Dokument festgelegt:

+ + + +

Für jeden dieser Komponenten, erstellst du eine HTML-Datei und verweist auf sie über ein spezielles Attribut in manifest.json. Die HTML-Datei kann, wie eine normale Webseite, CSS- und JavaScript-Dateien einbinden.

+ +

Sie alle sind Arten von Extension pages, und nicht wie eine normale Webseite, dein JavaScript kann dieselben WebExtension APIs wie dein Hintergrundskript benutzen. Sie können sogar direkt Variabeln aus der Hintergrundseite, mit {{WebExtAPIRef("runtime.getBackgroundPage()")}}, abrufen.

+ +

Extension pages

+ +

Du kannst außerdem HTML-Dokumente in deine Extension mit einbeziehen, die nicht vordefinierten Benutzeroberflächenkomponenten beigefügt wurden. Anders als die Dokumente, die du für Sidebars, Pop-ups, oder Option-Pages bereitstellen könntest, haben diese keinen Zugang zu "manifest.json". Dennoch haben sie Zugriff auf dieselben WebExtension APIs wie dein Hintergrundskript.

+ +

Du lädst eine solche Seite normalerweise mit {{WebExtAPIRef("windows.create()")}} oder {{WebExtAPIRef("tabs.create()")}}.

+ +

Siehe Extension pages um mehr zu lernen.

+ +

Content scripts

+ +

Benutze Content-Scripts um Webseiten abzurufen und zu manipulieren. Content-Scripts werden in Webseiten geladen und laufen im Rahmen der jeweiligen Seite.

+ +

Content-Scripts sind von der Erweiterung bereitgestellte Skripts, die im Kontext einer Webseite laufen; das unterscheidet sie von Skripts, die von der Seite selber geladen werden, einschließlich derer, die in {{HTMLElement("script")}}-Elementen innerhalb der Seite bereitgestellt werden.

+ +

Content-Scripts können das Seiten-DOM sehen und manipulieren, so wie normale, von der Seite geladene Skripte.

+ +

Im Gegensatz zu normalen Skripten können sie:

+ + + +

Content-Scripts können nicht direkt normale Skripte der Seite abrufen, aber mit ihnen Nachrichten austauschen über die übliche window.postMessage() API.

+ +

Wenn wir gewöhnlich über Content-Scripts sprechen, dann im Bezug auf JavaScript. Du kannst jedoch auch CSS zu einer Webseite über das selbe System hinzufügen.

+ +

Sieh dir content scripts an um mehr zu erfahren.

+ +

Web accessible resources

+ +

Zugängliche Webressourcen(Web accessible resources) sind Ressourcen wie Bilder, HTML, CSS, und JavaScript, die du in die Extension einbindest und für Content-Scripts und Skripten der Seite zugänglich machen möchtest. Ressourcen, die web-zugänglich gemacht werden, können von Skripten der Seite und Content-Scripts über ein spezielles URI-Schema referenziert werden.

+ +

Wenn zum Beispiel ein Content-Script Bilder in eine Webseite einfügen will, kannst du sie in der Extension beifügen und web-zugänglich machen. Dann könnte das Content-Script img-Tags erzeugen und hinzufügen, die über das src-Attribut auf die Bilder verweisen.

+ +

Um mehr zu lernen, sieh die Dokumentation für den web_accessible_resources manifest.json key.

+ +

 

+ +

 

diff --git a/files/de/mozilla/add-ons/webextensions/api/browseraction/index.html b/files/de/mozilla/add-ons/webextensions/api/browseraction/index.html new file mode 100644 index 0000000000..184dccf3d6 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/browseraction/index.html @@ -0,0 +1,135 @@ +--- +title: browserAction +slug: Mozilla/Add-ons/WebExtensions/API/browserAction +tags: + - API + - Add-ons + - Extensions + - Interface + - NeedsTranslation + - Non-standard + - Reference + - TopicStub + - WebExtensions + - browserAction +translation_of: Mozilla/Add-ons/WebExtensions/API/browserAction +--- +
{{AddonSidebar}}
+ +

Adds a button to the browser's toolbar.

+ +

A browser action is a button in the browser's toolbar.

+ +

You can associate a popup with the button. The popup is specified using HTML, CSS and JavaScript, just like a normal web page. JavaScript running in the popup gets access to all the same WebExtension APIs as your background scripts, but its global context is the popup, not the current page displayed in the browser. To affect web pages you need to communicate with them via messages.

+ +

If you specify a popup, it will be shown — and the content will be loaded — when the user clicks the icon. If you do not specify a popup, then when the user clicks the icon an event is dispatched to your extension.

+ +

You can define most of a browser action's properties declaratively using the browser_action key in the manifest.json.

+ +

With the browserAction API, you can:

+ + + +

Types

+ +
+
{{WebExtAPIRef("browserAction.ColorArray")}}
+
An array of four integers in the range 0-255 defining an RGBA color.
+
{{WebExtAPIRef("browserAction.ImageDataType")}}
+
Pixel data for an image. Must be an ImageData object (for example, from a {{htmlelement("canvas")}} element).
+
+ +

Functions

+ +
+
{{WebExtAPIRef("browserAction.setTitle()")}}
+
Sets the browser action's title. This will be displayed in a tooltip.
+
{{WebExtAPIRef("browserAction.getTitle()")}}
+
Gets the browser action's title.
+
{{WebExtAPIRef("browserAction.setIcon()")}}
+
Sets the browser action's icon.
+
{{WebExtAPIRef("browserAction.setPopup()")}}
+
Sets the HTML document to be opened as a popup when the user clicks on the browser action's icon.
+
{{WebExtAPIRef("browserAction.getPopup()")}}
+
Gets the HTML document set as the browser action's popup.
+
{{WebExtAPIRef("browserAction.openPopup()")}}
+
Open the browser action's popup.
+
{{WebExtAPIRef("browserAction.setBadgeText()")}}
+
Sets the browser action's badge text. The badge is displayed on top of the icon.
+
{{WebExtAPIRef("browserAction.getBadgeText()")}}
+
Gets the browser action's badge text.
+
{{WebExtAPIRef("browserAction.setBadgeBackgroundColor()")}}
+
Sets the badge's background color.
+
{{WebExtAPIRef("browserAction.getBadgeBackgroundColor()")}}
+
Gets the badge's background color.
+
{{WebExtAPIRef("browserAction.setBadgeTextColor()")}}
+
Sets the badge's text color.
+
{{WebExtAPIRef("browserAction.getBadgeTextColor()")}}
+
Gets the badge's text color.
+
{{WebExtAPIRef("browserAction.enable()")}}
+
Enables the browser action for a tab. By default, browser actions are enabled for all tabs.
+
{{WebExtAPIRef("browserAction.disable()")}}
+
Disables the browser action for a tab, meaning that it cannot be clicked when that tab is active.
+
{{WebExtAPIRef("browserAction.isEnabled()")}}
+
Checks whether the browser action is enabled or not.
+
+ +

Events

+ +
+
{{WebExtAPIRef("browserAction.onClicked")}}
+
Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
+
+ +

Browser compatibility

+ +

{{Compat("webextensions.api.browserAction")}}

+ + + +

{{WebExtExamples("h2")}}

+ +
Acknowledgements + +

This API is based on Chromium's chrome.browserAction API. This documentation is derived from browser_action.json in the Chromium code.

+ +

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

+
+ + diff --git a/files/de/mozilla/add-ons/webextensions/api/browseraction/setpopup/index.html b/files/de/mozilla/add-ons/webextensions/api/browseraction/setpopup/index.html new file mode 100644 index 0000000000..2a4a40e794 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/browseraction/setpopup/index.html @@ -0,0 +1,136 @@ +--- +title: browserAction.setPopup() +slug: Mozilla/Add-ons/WebExtensions/API/browserAction/setPopup +translation_of: Mozilla/Add-ons/WebExtensions/API/browserAction/setPopup +--- +
{{AddonSidebar()}}
+ +

Sets the HTML document that will be opened as a popup when the user clicks on the browser action's icon. Tabs without a specific popup will inherit the global popup, which defaults to the default_popup specified in the manifest.

+ +

Syntax

+ +
browser.browserAction.setPopup(
+  details // object
+)
+
+ +

Parameters

+ +
+
details
+
object.
+
+
+
tabId{{optional_inline}}
+
integer. Sets the popup only for a specific tab. The popup is reset when the user navigates this tab to a new page.
+
windowId{{optional_inline}}
+
integer. Sets the popup only for the specified window.
+
+ +
+
popup
+
+

string or null. The HTML file to show in a popup, specified as a URL.

+ +

This can point to a file packaged within the extension (for example, created using {{WebExtAPIRef("extension.getURL")}}), or a remote document (e.g. https://example.org/).

+ +

If an empty string ("") is passed here, the popup is disabled, and the extension will receive {{WebExtAPIRef("browserAction.onClicked")}} events.

+ +

If popup is null:

+ +

If tabId is specified, removes the tab-specific popup so that the tab inherits the global popup.

+ +

If windowId is specified, removes the window-specific popup so that the window inherits the global popup.

+ +

Otherwise it reverts the global popup to the default value.

+
+
+
+
+ + + +

Browser compatibility

+ + + +

{{Compat("webextensions.api.browserAction.setPopup",2)}}

+ +

Examples

+ +

This code adds a pair of context menu items that you can use to switch between two popups. Note that you'll need the "contextMenus" permission set in the extension's manifest to create context menu items.

+ +
function onCreated() {
+  if (browser.runtime.lastError) {
+    console.log("error creating item:" + browser.runtime.lastError);
+  } else {
+    console.log("item created successfully");
+  }
+}
+
+browser.contextMenus.create({
+  id: "popup-1",
+  type: "radio",
+  title: "Popup 1",
+  contexts: ["all"],
+  checked: true
+}, onCreated);
+
+browser.contextMenus.create({
+  id: "popup-2",
+  type: "radio",
+  title: "Popup 2",
+  contexts: ["all"],
+  checked: false
+}, onCreated);
+
+browser.contextMenus.onClicked.addListener(function(info, tab) {
+  if (info.menuItemId == "popup-1") {
+    browser.browserAction.setPopup({popup: "/popup/popup1.html"})
+  } else if (info.menuItemId == "popup-2") {
+    browser.browserAction.setPopup({popup: "/popup/popup2.html"})
+  }
+});
+ +

{{WebExtExamples}}

+ +
Acknowledgements + +

This API is based on Chromium's chrome.browserAction API. This documentation is derived from browser_action.json in the Chromium code.

+ +

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

+
+ + diff --git a/files/de/mozilla/add-ons/webextensions/api/commands/index.html b/files/de/mozilla/add-ons/webextensions/api/commands/index.html new file mode 100644 index 0000000000..af45cea002 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/commands/index.html @@ -0,0 +1,83 @@ +--- +title: commands +slug: Mozilla/Add-ons/WebExtensions/API/commands +translation_of: Mozilla/Add-ons/WebExtensions/API/commands +--- +
{{AddonSidebar}}
+ +

Verwenden Sie die Ausführungsbefehle der Benutzer, die Sie mit Hilfe des Schlüssels commands der manifest.json registriert haben.

+ +

Typen

+ +
+
{{WebExtAPIRef("commands.Command")}}
+
Objekt, das einen Befehl repräsentiert. Es enthält die für den Befehl im Schlüssel commands der manifest.json festgelegten Informationen.
+
+ +

Funktionen

+ +
+
{{WebExtAPIRef("commands.getAll")}}
+
+

Stellt alle registrierten Befehle für diese Erweiterung zur Verfügung.

+
+
{{WebExtAPIRef("commands.reset")}}
+
+

Angegebene Befehlsbeschreibung und das Tastaturkürzel auf die im Manifest-Schlüssel angegebenen Werte zurücksetzen.

+
+
{{WebExtAPIRef("commands.update")}}
+
+

Beschreibung oder Tastenkürzel des angegebenen Befehls ändern.

+
+
+ +

Ereignisse

+ +
+
{{WebExtAPIRef("commands.onCommand")}}
+
+
Wird ausgelöst, wenn ein Befehl mit Hilfe seines zugewiesenen Tastenkürzels ausgeführt wird.
+
+
+ +

Browserkompatibilität

+ +

{{Compat("webextensions.api.commands")}} {{WebExtExamples("h2")}}

+ +
Danksagungen + +

Diese API basiert auf der API chrome.commands von Chromium.

+ +

Die Kompatibilitätsdaten von Microsoft Edge werden von der Microsoft Corporation bereitgestellt und stehen hier unter der Lizenz Creative Commons Attribution 3.0 United States.

+
+ + diff --git a/files/de/mozilla/add-ons/webextensions/api/downloads/index.html b/files/de/mozilla/add-ons/webextensions/api/downloads/index.html new file mode 100644 index 0000000000..7363cde811 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/downloads/index.html @@ -0,0 +1,123 @@ +--- +title: downloads +slug: Mozilla/Add-ons/WebExtensions/API/downloads +translation_of: Mozilla/Add-ons/WebExtensions/API/downloads +--- +
+ +

Enables extensions to interact with the browser's download manager. You can use this API module to download files, cancel, pause, resume downloads, and show downloaded files in the file manager.

+ +

To use this API you need to have the "downloads" API permission specified in your manifest.json file.

+ +

Types

+ +
+
{{WebExtAPIRef("downloads.FilenameConflictAction")}}
+
Defines options for what to do if the name of a downloaded file conflicts with an existing file.
+
{{WebExtAPIRef("downloads.InterruptReason")}}
+
Defines a set of possible reasons why a download was interrupted.
+
{{WebExtAPIRef("downloads.DangerType")}}
+
Defines a set of common warnings of possible dangers associated with downloadable files.
+
{{WebExtAPIRef("downloads.State")}}
+
Defines different states that a current download can be in.
+
{{WebExtAPIRef("downloads.DownloadItem")}}
+
Represents a downloaded file.
+
{{WebExtAPIRef("downloads.StringDelta")}}
+
Represents the difference between two strings.
+
{{WebExtAPIRef("downloads.DoubleDelta")}}
+
Represents the difference between two doubles.
+
{{WebExtAPIRef("downloads.BooleanDelta")}}
+
Represents the difference between two booleans.
+
{{WebExtAPIRef("downloads.DownloadTime")}}
+
Represents the time a download took to complete.
+
{{WebExtAPIRef("downloads.DownloadQuery")}}
+
Defines a set of parameters that can be used to search the downloads manager for a specific set of downloads.
+
+ +

Functions

+ +
+
{{WebExtAPIRef("downloads.download()")}}
+
Downloads a file, given its URL and other optional preferences.
+
{{WebExtAPIRef("downloads.search()")}}
+
Queries the {{WebExtAPIRef("downloads.DownloadItem", "DownloadItems")}} available in the browser's downloads manager, and returns those that match the specified search criteria.
+
{{WebExtAPIRef("downloads.pause()")}}
+
Pauses a download.
+
{{WebExtAPIRef("downloads.resume()")}}
+
Resumes a paused download.
+
{{WebExtAPIRef("downloads.cancel()")}}
+
Cancels a download.
+
{{WebExtAPIRef("downloads.getFileIcon()")}}
+
Retrieves an icon for the specified download.
+
{{WebExtAPIRef("downloads.open()")}}
+
Opens the downloaded file with its associated application.
+
{{WebExtAPIRef("downloads.show()")}}
+
Opens the platform's file manager application to show the downloaded file in its containing folder.
+
{{WebExtAPIRef("downloads.showDefaultFolder()")}}
+
Opens the platform's file manager application to show the default downloads folder.
+
{{WebExtAPIRef("downloads.erase()")}}
+
Erases matching {{WebExtAPIRef("downloads.DownloadItem", "DownloadItems")}} from the browser's download history, without deleting the downloaded files from disk.
+
{{WebExtAPIRef("downloads.removeFile()")}}
+
Removes a downloaded file from disk, but not from the browser's download history.
+
{{WebExtAPIRef("downloads.acceptDanger()")}}
+
Prompts the user to accept or cancel a dangerous download.
+
{{WebExtAPIRef("downloads.drag()")}}
+
Initiates dragging the downloaded file to another application.
+
{{WebExtAPIRef("downloads.setShelfEnabled()")}}
+
Enables or disables the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it.
+
+ +

Events

+ +
+
{{WebExtAPIRef("downloads.onCreated")}}
+
Fires with the {{WebExtAPIRef("downloads.DownloadItem", "DownloadItem")}} object when a download begins.
+
{{WebExtAPIRef("downloads.onErased")}}
+
Fires with the downloadId when a download is erased from history.
+
{{WebExtAPIRef("downloads.onChanged")}}
+
When any of a {{WebExtAPIRef("downloads.DownloadItem", "DownloadItem")}}'s properties except bytesReceived changes, this event fires with the downloadId and an object containing the properties that changed.
+
+ +

Browser compatibility

+ +

{{Compat("webextensions.api.downloads")}}

+ +

{{WebExtExamples("h2")}}

+ +
Acknowledgements + +

This API is based on Chromium's chrome.downloads API.

+ +

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

+
+ + diff --git a/files/de/mozilla/add-ons/webextensions/api/index.html b/files/de/mozilla/add-ons/webextensions/api/index.html new file mode 100644 index 0000000000..1a500cdc0c --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/index.html @@ -0,0 +1,51 @@ +--- +title: JavaScript APIs +slug: Mozilla/Add-ons/WebExtensions/API +tags: + - NeedsTranslation + - TopicStub + - WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/API +--- +
{{AddonSidebar}}
+ +
+

JavaScript APIs for WebExtensions can be used inside the extension's background scripts and in any other documents bundled with the extension, including browser action or page action popups, sidebars, options pages, or new tab pages. A few of these APIs can also be accessed by an extension's content scripts (see the list in the content script guide).

+ +

To use the more powerful APIs you need to request permission in your extension's manifest.json.

+ +

You can access the APIs using the browser namespace:

+ +
function logTabs(tabs) {
+  console.log(tabs);
+}
+
+browser.tabs.query({currentWindow: true}, logTabs);
+
+ +
+

Many of the APIs are asynchronous, returning a Promise:

+ +
function logCookie(c) {
+  console.log(c);
+}
+
+function logError(e) {
+  console.error(e);
+}
+
+var setCookie = browser.cookies.set(
+  {url: "https://developer.mozilla.org/"}
+);
+setCookie.then(logCookie, logError);
+
+ +
+

Note that this is different from Google Chrome's extension system, which uses the chrome namespace instead of browser, and which uses callbacks instead of promises for asynchronous functions. As a porting aid, the Firefox implementation of WebExtensions APIs supports chrome and callbacks as well as browser and promises. Mozilla has also written a polyfill which enables code that uses browser and promises to work unchanged in Chrome: https://github.com/mozilla/webextension-polyfill.

+ +

Microsoft Edge uses the browser namespace, but doesn't yet support promise-based asynchronous APIs. In Edge, for the time being, asynchronous APIs must use callbacks.

+ +

Not all browsers support all the APIs: for the details, see Browser support for JavaScript APIs.

+
+ +
{{SubpagesWithSummaries}}
diff --git a/files/de/mozilla/add-ons/webextensions/api/lesezeich/index.html b/files/de/mozilla/add-ons/webextensions/api/lesezeich/index.html new file mode 100644 index 0000000000..7c43bda2af --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/api/lesezeich/index.html @@ -0,0 +1,121 @@ +--- +title: Lesezeichen +slug: Mozilla/Add-ons/WebExtensions/API/Lesezeich. +translation_of: Mozilla/Add-ons/WebExtensions/API/bookmarks +--- +
{{AddonSidebar}}
+ +

Die WebExtensions {{WebExtAPIRef("bookmarks")}} API erlaubt es einer Erweiterung mit dem Lesezeichensystem des Browsers interagieren und dieses zu manipulieren. Sie können die API verwenden, um für Seiten Lesezeichen zu setzen, vorhandene Lesezeichen abzurufen und Lesezeichen zu bearbeiten, zu entfernen und zu organisieren.

+ +

Um diese API zu verwenden, muss die Erweiterung die Berechtigung "Lesezeichen" in der manifest.json Datei besitzen.

+ +

Types

+ +
+
{{WebExtAPIRef("bookmarks.BookmarkTreeNodeUnmodifiable")}}
+
Ein {{jsxref("String")}} enum, das angibt, warum ein Lesezeichen oder ein Ordner unmodifizierbar ist.
+
{{WebExtAPIRef("bookmarks.BookmarkTreeNode")}}
+
Stellt ein Lesezeichen oder einen Ordner im Lesezeichenbaum dar.
+
{{WebExtAPIRef("bookmarks.CreateDetails")}}
+
Enthält Informationen, die bei der Erstellung eines neuen Lesezeichens an die {{WebExtAPIRef("bookmarks.create()")}} Funktion übergeben werden.
+
+ +

Functions

+ +
+
{{WebExtAPIRef("bookmarks.create()")}}
+
Erstellt ein Lesezeichen oder Ordner.
+
{{WebExtAPIRef("bookmarks.get()")}}
+
Ruft eine oder mehrere {{WebExtAPIRef("bookmarks.BookmarkTreeNode", "BookmarkTreeNode")}} ab und übergibt eine Lesezeichen-ID oder ein Array von Lesezeichen ID.
+
{{WebExtAPIRef("bookmarks.getChildren()")}}
+
Ruft die Kinder des angegebenen {{WebExtAPIRef("bookmarks.BookmarkTreeNode", "BookmarkTreeNode")}} ab.
+
{{WebExtAPIRef("bookmarks.getRecent()")}}
+
Ruft eine angeforderte Anzahl von zuletzt hinzugefügten Lesezeichen ab.
+
{{WebExtAPIRef("bookmarks.getSubTree()")}}
+
Ruft einen Teil des Lesezeichenbaums ab und beginnt am angegebenen Knoten.
+
{{WebExtAPIRef("bookmarks.getTree()")}}
+
Ruft den gesamten Lesezeichenbaum in ein Array von {{WebExtAPIRef("bookmarks.BookmarkTreeNode", "BookmarkTreeNode")}} Objekte auf.
+
{{WebExtAPIRef("bookmarks.move()")}}
+
Moves the specified {{WebExtAPIRef("bookmarks.BookmarkTreeNode", "BookmarkTreeNode")}} to a new location in the bookmark tree.
+
{{WebExtAPIRef("bookmarks.remove()")}}
+
Removes a bookmark or an empty bookmark folder, given the node's ID.
+
{{WebExtAPIRef("bookmarks.removeTree()")}}
+
Recursively removes a bookmark folder; that is, given the ID of a folder node, removes that node and all its descendants.
+
{{WebExtAPIRef("bookmarks.search()")}}
+
Searches for {{WebExtAPIRef("bookmarks.BookmarkTreeNode", "BookmarkTreeNode")}}s matching a specified set of criteria.
+
{{WebExtAPIRef("bookmarks.update()")}}
+
Updates the title and/or URL of a bookmark, or the name of a bookmark folder, given the bookmark's ID.
+
+ +

Events

+ +
+
{{WebExtAPIRef("bookmarks.onCreated")}}
+
Fired when a bookmark or folder is created.
+
{{WebExtAPIRef("bookmarks.onRemoved")}}
+
Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
+
{{WebExtAPIRef("bookmarks.onChanged")}}
+
Fired when a bookmark or folder changes. Currently, only title and url changes trigger this.
+
{{WebExtAPIRef("bookmarks.onMoved")}}
+
Fired when a bookmark or folder is moved to a different parent folder or to a new offset within its folder.
+
{{WebExtAPIRef("bookmarks.onChildrenReordered")}}
+
Fired when the user has sorted the children of a folder in the browser's UI. This is not called as a result of a {{WebExtAPIRef("bookmarks.move", "move()")}}.
+
{{WebExtAPIRef("bookmarks.onImportBegan")}}
+
Fired when a bookmark import session is begun. Expensive observers should ignore {{WebExtAPIRef("bookmarks.onCreated")}} updates until {{WebExtAPIRef("bookmarks.onImportEnded")}} is fired. Observers should still handle other notifications immediately.
+
{{WebExtAPIRef("bookmarks.onImportEnded")}}
+
Fired when a bookmark import session has finished.
+
+ +

Browser compatibility

+ +

{{Compat("webextensions.api.bookmarks")}}

+ + + +

Edge incompatibilities

+ +

Promises are not supported in Edge. Use callbacks instead.

+ +

{{WebExtExamples("h2")}}

+ +
Acknowledgements + +

This API is based on Chromium's chrome.bookmarks API. This documentation is derived from bookmarks.json in the Chromium code.

+ +

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

+
+ + diff --git a/files/de/mozilla/add-ons/webextensions/arbeiten_mit_taps_api/index.html b/files/de/mozilla/add-ons/webextensions/arbeiten_mit_taps_api/index.html new file mode 100644 index 0000000000..39498fa606 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/arbeiten_mit_taps_api/index.html @@ -0,0 +1,608 @@ +--- +title: Arbeiten mit Taps API +slug: Mozilla/Add-ons/WebExtensions/Arbeiten_mit_Taps_API +tags: + - tabs +translation_of: Mozilla/Add-ons/WebExtensions/Working_with_the_Tabs_API +--- +

{{AddonSidebar}}

+ +

Tabs lassen einen Benutzer mehrere Webseiten in seinem Browserfenster öffnen und wechseln dann zwischen diesen Webseiten. Mit der Tabs API können Sie mit diesen Tabs arbeiten und diese manipulieren, um Programme zu erstellen, die Nutzern neue Möglichkeiten bieten, mit Tabs zu arbeiten oder die Funktionen Ihrer Erweiterung zu liefern.

+ +

In diesem "how-to"-Artikel schauen wir uns an:

+ + + +

Wir schließen dann mit Blick auf einige andere, andere Funktionen, die von der API angeboten werden.

+ +
+

Hinweis: Es gibt einige Tab-API-Funktionen, die an anderer Stelle abgedeckt sind. Dies sind die Methoden, die Sie verwenden können, um den Inhalt der Registerkarten mit Skripten zu manipulieren  ({{WebExtAPIRef("tabs.connect")}},  {{WebExtAPIRef("tabs.sendMessage")}} und  {{WebExtAPIRef("tabs.executeScript")}}). Wenn Sie mehr Informationen über diese Methoden wünschen, lesen Sie die Artikelinhaltskripte Concepts und die Anleitung ändern Sieeine Webseite.

+
+ +

Berechtigungen und die Tabs API

+ +

Für die meisten Tabs API-Funktionen benötigen Sie keine Berechtigungen; Es gibt jedoch einige Ausnahmen:

+ + + +

Im Folgenden können Sie in der manifest.json-Datei Ihrer Erweiterung die Erlaubnis "Tabs " beantragen :

+ +
"permissions": [
+  "<all_urls>",
+  "tabs"
+],
+ +

Diese Anfrage gibt Ihnen die Nutzung aller Tabs API-Funktion auf allen Websites, die Ihr Nutzer besucht. Es gibt auch einen alternativen Ansatz für die Anforderung von Berechtigungen zur Verwendung von {{WebExtAPIRef("tabs.executeScript")}} or {{WebExtAPIRef("tabs.insertCSS")}}, bei dem Sie keine Host-Erlaubnis benötigen, in Form von "activeTab". Diese Erlaubnis bietet die gleichen Rechte wie "Tabs" mit< all _ urls >,aber mit zwei Einschränkungen:

+ + + +

Der Vorteil dieses Ansatzes ist, dass der Benutzer keine Berechtigung erhält, die besagt, dass Ihre Erweiterung "Zugriff auf Ihre Daten für alle Websites" kann. Das liegt daran , dass < all _ urls > Erlaubnis einer Erweiterung die Möglichkeit gibt, Skripte in jedem Tab auszuführen, zu jeder Zeit, die sie mag, während "activeTab" darauf beschränkt ist, der Erweiterung zu erlauben, eine vom Benutzer angeforderte Aktion in der Aktuelle Registerkarte.

+ +

Mehr über Tabs und ihre Eigenschaften entdecken

+ +

Es wird Gelegenheiten geben, in denen Sie eine Liste aller Tabs in allen Browser-Fenstern erhalten wollen. Zu anderen Zeiten möchten Sie vielleicht eine Untergruppe von Tabs finden, die bestimmten Kriterien entsprechen, wie zum Beispiel solchen, die von einem bestimmten Tab geöffnet werden oder Seiten aus einer bestimmten Domain anzeigen. Und wenn Sie Ihre Liste der Tabs haben, werden Sie wahrscheinlich mehr über ihre Eigenschaften wissen wollen.

+ +

Hier kommt die {{WebExtAPIRef("tabs.query")}} in den Fall. Wird allein verwendet, um alle Tabs zu erhalten oder das queryInfo-Objekt zu nehmen —, um Abfragekriterien anzugeben, wie zum Beispiel, ob die Registerkarte im aktuellen Fenster aktiv ist, oder eines oder mehrere von 17 Kriterien —  {{WebExtAPIRef("tabs.query")}} gibt ein Array von  {{WebExtAPIRef("tabs.Tab")}} Objekte, die Informationen über die Registerkarten enthalten.

+ +

Wenn Sie nur Informationen über den aktuellen Reiter wünschen, können Sie eine {{WebExtAPIRef("tabs.Tab")}} erhalten. Objekt für diese Registerkarte mit {{WebExtAPIRef("tabs.getCurrent")}}. Wenn Sie eine Tab-ID haben, können Sie die  {{WebExtAPIRef("tabs.Tab")}} Objekt mit {{WebExtAPIRef("tabs.get")}}.

+ +
+

notiz:

+ + +
+ +

Wie man mit dem Beispiel geht

+ +

Um zu sehen, wie  {{WebExtAPIRef("tabs.query")}} und  {{WebExtAPIRef("tabs.Tab")}} werden verwendet, lassen Sie uns durch, wie  das Tabs-Tabs-Tabs Beispiel fügt die Liste von" Schalter auf Tabs "zu seiner Toolbar-Taste Popup.

+ +

+ +

manifest.json

+ +

Hier ist das manifest.json:

+ +
{
+  "browser_action": {
+    "browser_style": true,
+    "default_title": "Tabs, tabs, tabs",
+    "default_popup": "tabs.html"
+  },
+  "description": "A list of methods you can perform on a tab.",
+  "homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/tabs-tabs-tabs",
+  "manifest_version": 2,
+  "name": "Tabs, tabs, tabs",
+  "permissions": [
+    "tabs"
+  ],
+  "version": "1.0"
+}
+ +
+

Hinweis:

+ + +
+ +

Tabs.html

+ +

Tabs.html definiert den Inhalt des Popups der Erweiterung:

+ +
<!DOCTYPE html>
+
+<html>
+
+ <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="tabs.css"/>
+ </head>
+
+<body>
+
+ <div class="panel">
+    <div class="panel-section panel-section-header">
+     <div class="text-section-header">Tabs-tabs-tabs</div>
+    </div>
+
+    <a href="#" id="tabs-move-beginning">Move active tab to the beginning of the window</a><br>
+
+
+…
+
+Define the other menu items
+…
+
+    <div class="switch-tabs">
+
+     <p>Switch to tab</p>
+
+     <div id="tabs-list"></div>
+
+    </div>
+ </div>
+
+ <script src="tabs.js"></script>
+
+</body>
+
+</html>
+ +

Hier ist eine Zusammenfassung der oben genannten tut:

+ +
    +
  1. Die Menüpunkte werden deklariert.
  2. +
  3. Ein leerer Div mit der ID-Tabs-Liste wird deklariert, um die Liste der Tabs zu enthalten.
  4. +
  5. Tabs.js heißt.
  6. +
+ +

Tabs.js

+ +

In tabs.jswerdenwir sehen, wie die Liste der Tabs aufgebaut und zum Popup hinzugefügt wird.  

+ +

Das Popup schaffen

+ +

Zunächst wird ein Event-Handler hinzugefügt, um ListTabs () auszuführen , wenn tabs.html geladen wird:

+ +
document.addEventListener ("DOMContentLoaded", hört Tabs);
+ +

Das erste, was listTabs () tut, ist getCurrentWindowTabs ()zu nennen. Hier wird ein {{WebExtAPIRef("tabs.query")}} verwendet, um eine  {{WebExtAPIRef("tabs.Tab")}} zu erhalten. Objekt für die Tabs im aktuellen Fenster:

+ +
function getCurrentWindowTabs() {
+  return browser.tabs.query({currentWindow: true});
+}
+ +

Jetzt ist listTabs() bereit , den Inhalt für das Popup zu erstellen.

+ +

Zunächst:

+ +
    +
  1. Schnappen Sie sich die tabs-list div.
  2. +
  3. Erstellen Sie ein Dokumentenfragment (in das die Liste eingebaut wird).
  4. +
  5. Setzen Sie Zähler.
  6. +
  7. Klären Sie den Inhalt der Tabs-Liste div.
  8. +
+ +
function listTabs() {
+ getCurrentWindowTabs().then((tabs) => {
+    let tabsList = document.getElementById('tabs-list');
+    let currentTabs = document.createDocumentFragment();
+    let limit = 5;
+    let counter = 0;
+
+    tabsList.textContent = '';
+ +

Als nächstes werden wir die Links für jeden Tab erstellen:

+ +
    +
  1. Schleifen Sie sich durch die ersten 5 Elemente aus der   {{WebExtAPIRef("tabs.Tab")}} Objekt.
  2. +
  3. Fügen Sie für jeden Artikel einen Hyperlink zum Dokumentenfragment hinzu. +
      +
    • Das Etikett des Links — das heißt, sein Text — wird mit dem Titel des Tab gesetzt (oder mit der ID, wenn er keinen Titel hat).
    • +
    • Die Adresse des Links wird mit der Personalausweis des Tabs gesetzt.
    • +
    +
  4. +
+ +
 for (let tab of tabs) {
+     if (!tab.active && counter <= limit) {
+        let tabLink = document.createElement('a');
+
+        tabLink.textContent = tab.title || tab.id;
+
+       tabLink.setAttribute('href', tab.id);
+        tabLink.classList.add('switch-tabs');
+        currentTabs.appendChild(tabLink);
+     }
+
+     counter += 1;
+
+    }
+ +

Schließlich wird das Dokumentenfragment auf die Tabs-Liste div geschrieben:

+ +
  tabsList.appendChild(currentTabs);
+  });
+}
+ +

Arbeiten mit dem aktiven Reiter

+ +

Ein weiteres verwandtes Beispielmerkmal ist die Info-Option "Alert active tab", die alle Registerkarten [{WebExtAPIRef ("-Register) ablegt. Tab ")} Objekteigenschaften für die aktive Registerkarte in einen Alarm:

+ +
 else if (e.target.id === "tabs-alertinfo") {
+   callOnActiveTab((tab) => {
+     let props = "";
+     for (let item in tab) {
+       props += `${ item } = ${ tab[item] } \n`;
+     }
+     alert(props);
+   });
+ }
+ +

Wobei callOnActiveTab() das aktive Tab-Objekt findet, indem man sich durch die Registerkarten {{WebExtAPIRef("tabs.Tab")}} schlodert. Tab ")} Objekte, die nach dem Gegenstand mit aktivem Satz suchen:

+ +
document.addEventListener("click", function(e) {
+ function callOnActiveTab(callback) {
+   getCurrentWindowTabs().then((tabs) => {
+     for (var tab of tabs) {
+       if (tab.active) {
+         callback(tab, tabs);
+       }
+     }
+   });
+ }
+}
+ +

Tabs erstellen, duplizieren, verschieben, aktualisieren, neu laden und entfernen

+ +

Nachdem Sie Informationen über die Registerkarten gesammelt haben, werden Sie höchstwahrscheinlich etwas mit ihnen machen wollen — entweder den Benutzern Funktionen für die Manipulation und Verwaltung von Registern bieten oder Funktionen in Ihrer Erweiterung implementieren.

+ +

Folgende Funktionen stehen zur Verfügung:

+ + + +
+

notiz:

+ +

Diese Funktionen erfordern alle die ID (oder IDs) der Registerkarte, die sie manipulieren:

+ + + +

Während die folgenden Funktionen auf dem aktiven Tab (sofern keine Tab-ID zur Verfügung gestellt wird) wirken:

+ + +
+ +

Wie man mit dem Beispiel geht

+ +

Das Beispiel Tabs-Tabs übt all diese Funktionen aus, bis hin zur Aktualisierung der URL eines Tabs. Die Art und Weise, in der diese APIs verwendet werden, ist ähnlich, so dass wir uns eine der am meisten involvierten Implementierungen ansehen werden, die des "Move active tab to the beginning of the the. Option "Option der Fensterliste.

+ +

Aber zunächst ist hier eine Demonstration des Features in Aktion:

+ +

{{EmbedYouTube("-lJRzTIvhxo")}}

+ +

manifest.json

+ +

Keine der Funktionen benötigt eine Betriebsgenehmigung, so dass es keine Funktionen in der manifest.json-Datei gibt, die hervorgehoben werden müssen.

+ +

Tabs.html

+ +

Tabs.html definiert das "Menü", das im Popup angezeigt wird, das die Option "Aktive Registerkarte zum Anfang der Fensterliste verschieben" enthält, mit einer Reihe von <a> Tags, die von einem visuellen Separator gruppiert sind. Jeder Menüpunkt erhält eine ID, die in tabs.js verwendet wird, um festzustellen, welcher Menüpunkt angefordert wird.

+ +
  <a href="#" id="tabs-move-beginning">Move active tab to the beginning of the window</a><br>
+    <a href="#" id="tabs-move-end">Move active tab to the end of the window</a><br>
+
+    <div class="panel-section-separator"></div>
+
+
+    <a href="#" id="tabs-duplicate">Duplicate active tab</a><br>
+
+    <a href="#" id="tabs-reload">Reload active tab</a><br>
+    <a href="#" id="tabs-alertinfo">Alert active tab info</a><br>
+ +

Tabs.js

+ +

Um das in tabs.html definierte "Menü" zu implementieren, enthält tabs.js einen Hörer für Klicks in tabs.html:

+ +
document.addEventListener("click", function(e) {
+ function callOnActiveTab(callback) {
+
+   getCurrentWindowTabs().then((tabs) => {
+     for (var tab of tabs) {
+       if (tab.active) {
+         callback(tab, tabs);
+       }
+     }
+   });
+}
+}
+ +

Eine Reihe von ifAnweisungen dann schauen, um die ID des Artikels geklickt.

+ +

Dieser Code-Snippet ist für die Option "Aktive Registerkarte zum Anfang der Fensterliste verschieben":

+ +
 if (e.target.id === "tabs-move-beginning") {
+   callOnActiveTab((tab, tabs) => {
+     var index = 0;
+     if (!tab.pinned) {
+       index = firstUnpinnedTab(tabs);
+     }
+     console.log(`moving ${tab.id} to ${index}`)
+     browser.tabs.move([tab.id], {index});
+   });
+ }
+ +

Es ist erwähnenswert, die Verwendung von console.log (). Auf diese Weise können Sie Informationen an die Debugger-Konsole ausgeben , was bei der Lösung von Problemen, die während der Entwicklung gefunden wurden, nützlich sein kann.

+ +

+ +

Der Bewegungscode ruft zunächst callOnActiveTab () an , der wiederum getCurrentWindowTabs () anruft, um eine {{WebExtAPIRef("tabs.Tab")}} Objekt, das die Registerkarten des aktiven Fensters enthält. Es schleift sich dann durch das Objekt, um das aktive Tab-Objekt zu finden und zurückzugeben:

+ +
function callOnActiveTab(callback) {
+   getCurrentWindowTabs().then((tabs) => {
+     for (var tab of tabs) {
+       if (tab.active) {
+         callback(tab, tabs);
+       }
+     }
+   });
+ }
+ +

Gepinnte Tabs

+ +

Eine Besonderheit von Registern ist, dass  der Benutzer Tabs in ein Fenster einfügen kann. Gepinnte Tabs werden am Anfang der Tab-Liste platziert und können nicht verschoben werden. Das bedeutet, dass die früheste Position, in die sich ein Tab bewegen kann, die erste Position nach einem gefiederten Tabs ist. Also , firstUnpinnedTab () wird aufgerufen, um die Position des ersten ungepasten Tab zu finden, indem man durch das Tabs-Objekt Looping:

+ +
function firstUnpinnedTab(tabs) {
+ for (var tab of tabs) {
+   if (!tab.pinned) {
+     return tab.index;
+   }
+ }
+}
+ +

Wir haben jetzt alles, was zum Verschieben des Tab notwendig ist: Das aktive Tab-Objekt, von dem wir die Reiter-ID erhalten können und die Position, in die der Reiter verschoben werden soll. So können wir den Schritt umsetzen:

+ +
browser.tabs.move ([tab.id], {index});
+ +

Die restlichen Funktionen zum Duplizieren, Laden, Erstellen und Entfernen von Tabs werden ähnlich implementiert.

+ +

Manipulationen eines Tab

+ +

Die nächste Reihe von Funktionen ermöglicht es Ihnen, die Zoomstufe in einem Tab zu erhalten  ({{WebExtAPIRef("tabs.getZoom")}}) und zu setzen ({{WebExtAPIRef("tabs.setZoom")}}) . Sie können auch die Zoom-Einstellungen abrufen ({{WebExtAPIRef("tabs.getZoomSettings")}}) , aber zum Zeitpunkt des Schreibens war die Möglichkeit, die Einstellungen zu setzen ({{WebExtAPIRef("tabs.setZoomSettings")}}) , war in Firefox nicht verfügbar.

+ +

Der Zoomwert kann zwischen 30% und 300% liegen (dargestellt als Dezimalzahl 0,3 bis 3).

+ +

In Firefox sind die Standard-Zoom-Einstellungen:

+ + + +

Wie man mit dem Beispiel geht

+ +

Das  Beispiel der Tabs-Tabs-Tabs enthält drei Vorführungen der Zoom-Funktion: Zoomen, Zoomen und Zoom zurücksetzen. Hier ist das Feature in Aktion:

+ +

{{EmbedYouTube("RFr3oYBCg28")}}

+ +

Schauen wir uns an, wie der Zoom-In umgesetzt wird.

+ +

manifest.json

+ +

Keine der Zoom-Funktionen benötigt Berechtigungen, so dass es keine Funktionen in der manifest.json-Datei gibt, die hervorgehoben werden müssen.

+ +

Tabs.html

+ +

Wir haben bereits darüber diskutiert, wie der tabs.html die Optionen für diese Erweiterung definiert, nichts Neues oder Einzigartiges wird getan, um die Zoom-Optionen zur Verfügung zu stellen.

+ +

Tabs.js

+ +

Tabs.js beginnt mit der Definition mehrerer Konstanten, die im Zoom-Code verwendet werden:

+ +
const ZOOM_INCREMENT = 0.2;
+const MAX_ZOOM = 3;
+const MIN_ZOOM = 0.3;
+const DEFAULT_ZOOM = 1;
+ +

Es verwendet dann den gleichen Hörer, den wir zuvor besprochen haben, so dass es auf Klicks in tabs.html wirken kann.

+ +

Für den Zoom in der Funktion läuft das:

+ +
else if (e.target.id === "tabs-add-zoom") {
+   callOnActiveTab((tab) => {
+     var gettingZoom = browser.tabs.getZoom(tab.id);
+     gettingZoom.then((zoomFactor) => {
+       //the maximum zoomFactor is 3, it can't go higher
+       if (zoomFactor >= MAX_ZOOM) {
+         alert("Tab zoom factor is already at max!");
+       } else {
+         var newZoomFactor = zoomFactor + ZOOM_INCREMENT;
+         //if the newZoomFactor is set to higher than the max accepted
+         //it won't change, and will never alert that it's at maximum
+         newZoomFactor = newZoomFactor > MAX_ZOOM ? MAX_ZOOM : newZoomFactor;
+         browser.tabs.setZoom(tab.id, newZoomFactor);
+       }
+     });
+   });
+ }
+ +

Dieser Code verwendet callOnActiveTab () , um die Details des aktiven Tab zu erhalten, dann wird {{WebExtAPIRef("tabs.getZoom")}} den aktuellen Zoom-Faktor der Registerkarte erhalten. Der aktuelle Zoom wird mit dem definierten Maximum (MAX _ ZOOM)und einem Alarm verglichen, der ausgegeben wird, wenn sich der Tab bereits im Maximalzoom befindet. Andernfalls wird der Zoom-Level erhöht, aber auf den maximalen Zoom beschränkt, dann wird der Zoom mit {{WebExtAPIRef("tabs.getZoom")}}. gesetzt .

+ +

Manipulationen eines Tabs CSS

+ +

Eine weitere wichtige Fähigkeit, die die Tabs API bietet, ist die Möglichkeit, die CSS innerhalb eines Tab zu manipulieren — neue CSS zu einem Tab hinzufügen ({{WebExtAPIRef ("tabu Die [[Datei]] der [[Datei]] der [[Datei]] der [[Datei]] der [[Datei]] ist (" tabs.removeCSS ")).

+ +

Dies kann zum Beispiel nützlich sein, wenn Sie bestimmte Seitenelemente markieren oder das Standardlayout der Seite ändern wollen.

+ +

Wie man mit dem Beispiel geht

+ +

Das Apply-css-Beispiel nutzt diese Funktionen, um der Webseite im aktiven Tab einen roten Rand hinzuzufügen. Hier ist das Feature in Aktion:

+ +

{{EmbedYouTube ("bcK-GT2Dyhs")}

+ +

Gehen wir durch, wie es aufgebaut ist.

+ +

manifest.json

+ +

Um die CSS-Funktionen nutzen zu können, benötigen Sie entweder:

+ + + +

Letzteres ist das nützlichste, da es einer Erweiterung erlaubt,  {{WebExtAPIRef("tabs.insertCSS")}} und  {{WebExtAPIRef("tabs.removeCSS")}} in der aktiven Registerkarte zu verwenden, wenn sie von der Browser-oder Seitenaktion, dem Kontextmenü oder einem Shortcut der Erweiterung ausgeführt wird.

+ +
{
+  "description": "Adds a page action to toggle applying CSS to pages.",
+
+ "manifest_version": 2,
+ "name": "apply-css",
+ "version": "1.0",
+ "homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/apply-css",
+
+ "background": {
+
+    "scripts": ["background.js"]
+ },
+
+ "page_action": {
+
+    "default_icon": "icons/off.svg",
+    "browser_style": true
+ },
+
+ "permissions": [
+    "activeTab",
+    "tabs"
+ ]
+
+}
+ +

Sie werden darauf hinweisen, dass zusätzlich zu "activeTab" die Erlaubnis " Tabs"angefordert wird. Diese zusätzliche Erlaubnis ist erforderlich, um das Skript der Erweiterung in die Lage zu versetzen, auf die URL des Registers zuzugreifen, deren Bedeutung wir gleich sehen werden.

+ +

Die anderen Hauptmerkmale in der manifest.json-Datei sind die Definition von:

+ + + +

Background.js

+ +

Beim Start setzt background.js einige Konstanten, um die zu bewendenden CSS zu definieren, Titel für die "Seitenaktion", und eine Liste von Protokollen, in denen die Erweiterung funktioniert:

+ +
const CSS = "body { border: 20px solid red; }";
+const TITLE_APPLY = "Apply CSS";
+const TITLE_REMOVE = "Remove CSS";
+const APPLICABLE_PROTOCOLS = ["http:", "https:"];
+ +

Wenn die Erweiterung zum ersten Mal geladen wird, verwendet sie {{WebExtAPIRef("tabs.query")}}, um eine Liste aller Tabs im aktuellen Browserfenster zu erhalten. Es schleit sich dann durch die Tabs, die InitializePageAction()rufen.

+ +
var gettingAllTabs = browser.tabs.query({});
+
+gettingAllTabs.then((tabs) => {
+ for (let tab of tabs) {
+   initializePageAction(tab);
+ }
+});
+ +

InitializePageAction verwendet protokolIsApplicable () , um festzustellen, ob die URL der aktiven Registerkarte eine ist, auf die die CSS angewendet werden kann:

+ +
function protocolIsApplicable(url) {
+ var anchor =  document.createElement('a');
+ anchor.href = url;
+ return APPLICABLE_PROTOCOLS.includes(anchor.protocol);
+}
+ +

Wenn das Beispiel dann auf der Registerkarte wirken kann, setzt initializePageAction () das PageAction-Symbol und den Titel des Tab, um die "Off"-Versionen zu verwenden, bevor die PageAction-Version sichtbar gemacht wird:

+ +
function initializePageAction(tab) {
+
+ if (protocolIsApplicable(tab.url)) {
+   browser.pageAction.setIcon({tabId: tab.id, path: "icons/off.svg"});
+   browser.pageAction.setTitle({tabId: tab.id, title: TITLE_APPLY});
+   browser.pageAction.show(tab.id);
+ }
+}
+ +

Als Nächstes wartet ein Zuhörer auf der pageAction.onClicked darauf, dass das PageAction-Symbol angeklickt wird  , und ruft toggleCSS an , wenn es ist.

+ +
browser.pageAction.onClicked.addListener (toggleCSS);
+ +

ToggleCSS () erhält den Titel der PageAction und nimmt dann die beschriebene Aktion auf:

+ + + +
function toggleCSS(tab) {
+
+
+ function gotTitle(title) {
+
+    if (title === TITLE_APPLY) {
+     browser.pageAction.setIcon({tabId: tab.id, path: "icons/on.svg"});
+     browser.pageAction.setTitle({tabId: tab.id, title: TITLE_REMOVE});
+     browser.tabs.insertCSS({code: CSS});
+    } else {
+     browser.pageAction.setIcon({tabId: tab.id, path: "icons/off.svg"});
+     browser.pageAction.setTitle({tabId: tab.id, title: TITLE_APPLY});
+     browser.tabs.removeCSS({code: CSS});
+    }
+ }
+
+ var gettingTitle = browser.pageAction.getTitle({tabId: tab.id});
+
+ gettingTitle.then(gotTitle);
+}
+ +

Um sicherzustellen, dass die PageAction nach jedem Update auf den Tab gültig ist, ruft ein Zuhörer auf  {{WebExtAPIRef("tabs.onUpdated")}} jedes Mal, wenn der Tab aktualisiert wird, auf initializePageAction () , um zu überprüfen, ob der Reiter immer noch ein Protokoll, auf das das CSS angewendet werden kann.

+ +
browser.tabs.onUpdated.addListener((id, changeInfo, tab) => {
+ initializePageAction(tab);
+});
+ +

Einige weitere interessante Fähigkeiten

+ +

Es gibt noch ein paar andere Tabs API-Funktionen, die nicht in einen der früheren Abschnitte passen:

+ + + +

Weitere Informationen

+ +

Wenn Sie mehr über die Tabs API erfahren möchten, schauen Sie sich an:

+ + + +

 

diff --git a/files/de/mozilla/add-ons/webextensions/beispiele/index.html b/files/de/mozilla/add-ons/webextensions/beispiele/index.html new file mode 100644 index 0000000000..627dbe559d --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/beispiele/index.html @@ -0,0 +1,22 @@ +--- +title: Beispiele für Erweiterungen +slug: Mozilla/Add-ons/WebExtensions/Beispiele +tags: + - WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/Examples +--- +
{{AddonSidebar}}
+ +

Um zu veranschaulichen, wie Erweiterungen entwickelt werden, gibt es von uns ein Repository mit einfachen Beispielerweiterungen unter https://github.com/mdn/webextensions-examples. Dieser Artikel beschreibt die WebExtension-APIs, die in diesem Repository verwendet werden.

+ +

Diese Beispiele funktionieren in Firefox Nightly: Die meisten funktionieren in früheren Versionen von Firefox, aber überprüfen Sie zur Sicherheit den Schlüssel strict_min_version in der Datei manifest.json der Erweiterung.
+
+ Wenn Sie diese Beispiele ausprobieren möchten, haben Sie drei Möglichkeiten:
+
+ 1.  Klonen Sie das Repository, und laden Sie die Erweiterung direkt aus dem Quellverzeichnis mit der Funktion "Load Temporary Add-on". Die Erweiterung bleibt solange geladen, bis Sie Firefox neu starten.

+ 2. Klonen Sie das Repository und verwenden Sie dann das web-ext Befehlszeilentool, um Firefox mit der installierten Erweiterung auszuführen.
+ 3. Klonen Sie das Repository und gehen Sie dann zum Build-Verzeichnis. Dieses enthält "Build"- und "Signed"-Versionen aller Beispiele; Sie können sie also einfach in Firefox öffnen (mit Datei / Datei öffnen) und sie dauerhaft installieren, genau wie eine Erweiterung, die Sie von addons.mozilla.org installieren würden.
+
+ Wenn Sie einen Beitrag zum Repository leisten möchten, senden Sie uns ein Pull-Request!

+ +

{{WebExtAllExamples}}

diff --git a/files/de/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html b/files/de/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html new file mode 100644 index 0000000000..1dffe19399 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/browser_support_for_javascript_apis/index.html @@ -0,0 +1,15 @@ +--- +title: Browser support for JavaScript APIs +slug: Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs +translation_of: Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs +--- +
{{AddonSidebar}}
+ +
{{WebExtAllCompatTables}}
+ + + +
Acknowledgements + +

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

+
diff --git a/files/de/mozilla/add-ons/webextensions/deine_erste_weberweiterung/index.html b/files/de/mozilla/add-ons/webextensions/deine_erste_weberweiterung/index.html new file mode 100644 index 0000000000..b48b805b98 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/deine_erste_weberweiterung/index.html @@ -0,0 +1,155 @@ +--- +title: Deine erste Erweiterung +slug: Mozilla/Add-ons/WebExtensions/Deine_erste_WebErweiterung +tags: + - Anleitung + - Erweiterung + - Weberweiterung +translation_of: Mozilla/Add-ons/WebExtensions/Your_first_WebExtension +--- +
{{AddonSidebar}}
+ +

In diesem Artikel wird die Erstellung einer Erweiterung (Extension) für Firefox komplett beschrieben. Diese Erweiterung soll einen roten Rand zu jeder Seite, die von "mozilla.org" oder einer Subdomain geladen wurde, hinzufügen.

+ +

Der Quellcode für dieses Beispiel ist auf GitHub auffindbar: https://github.com/mdn/webextensions-examples/tree/master/borderify.

+ +

Als Erstes benötigst du Firefox Version 45 oder neuer.

+ +

Schreiben der Erweiterung

+ +

Erstelle ein neues Verzeichnis und navigiere zu diesem:

+ +
mkdir borderify
+cd borderify
+ +

manifest.json

+ +

Jetzt erstelle eine Datei namens "manifest.json" direkt in dem "borderify" -Verzeichnis mit dem folgenden Inhalt:

+ +
{
+
+  "manifest_version": 2,
+  "name": "Borderify",
+  "version": "1.0",
+
+  "description": "Adds a red border to all webpages matching mozilla.org.",
+
+  "icons": {
+    "48": "icons/border-48.png"
+  },
+
+  "content_scripts": [
+    {
+      "matches": ["*://*.mozilla.org/*"],
+      "js": ["borderify.js"]
+    }
+  ]
+
+}
+ + + +

Der interessanteste Key hier ist  content_scripts, welcher Firefox auffordert, ein Skript in allen Webseiten zu laden, deren URLs einem spezifischen Muster zuzuordnen sind. In diesem Fall fragen wir Firefox nach dem Skript namens "borderify.js", um es in allen HTTP oder HTTPS Seiten von "mozilla.org" oder einer Subdomain zu laden.

+ + + +
+

In manchen Situation musst eine ID für deine Erweiterung festlegen. Wenn du eine Add-on ID festlegen musst, schreibe den  applications key in manifest.json und setze die gecko.id-Eigenschaft:

+ +
"applications": {
+  "gecko": {
+    "id": "borderify@example.com"
+  }
+}
+
+ +

icons/border-48.png

+ +

Die Erweiterung sollte ein Icon haben. Dieses wird neben dem Erweiterungseintrag in dem Add-ons manager angezeigt. Unsere manifest.json gibt den Ort des Icons unter "icons/border-48.png" an.

+ +

Erstelle das "icons" Verzeichnis direkt in dem "borderify" Verzeichnis. Speichere dort ein Icon namens "border-48.png".  Du kannst dazu das von unserem Beispiel benutzen, welches von der Google Material Design Iconsammlung stammt und unter den Richtlinien der Creative Commons Attribution-ShareAlike Lizenz steht.

+ +

Wenn du dich entscheidest ein eigenes Icon zu verwenden, dann sollte dieses 48x48 Pixel groß sein. Du kannst ebenfalls ein 96x96 Pixel großes Icon für hochauflösende Bildschirme, übergeben, welches dann als die 96 Property des icons-Objekts in der manifest.json festgelegt wird:

+ +
"icons": {
+  "48": "icons/border-48.png",
+  "96": "icons/border-96.png"
+}
+ +

Alternativ kannst du auch eine SVG-Datei übergeben, welche dann automatisch korrekt skaliert wird.
+ (Beachte: Wenn du SVG verwendest und dein Symbol Text enthält, kannst du das Werkzeug "convert to path" deines SVG-Editors verwenden, um den Text zu verflachen, so dass er mit einer einheitlichen Größe/Position skaliert wird.

+ + + +

borderify.js

+ +

Schließlich erstelle eine Datei namens "borderify.js" direkt in dem "borderify"-Verzeichnis mit diesem Inhalt:

+ +
document.body.style.border = "5px solid red";
+ +

Dieses Skript wird in Seiten geladen, welche mit dem Muster des  content_scripts-Keys in der manifest.json Datei übereinstimmen. Das Skript hat direkten Zugriff auf das Dokument, genauso wie die Skripte, die von der Seite selbst geladen werden.

+ + + +

Probiere es aus:

+ +

Als Erstes stelle sicher, dass du die richtigen Dateien an den richtigen Orten hast:

+ +
borderify/
+    icons/
+        border-48.png
+    borderify.js
+    manifest.json
+ +

Installiere nun das Plugin

+ +

Öffne "about:debugging" in Firefox, klicke "Add-on temporär laden" und wähle eine beliebige Datei aus deinem Erweiterungsverzeichnis:

+ +

{{EmbedYouTube("cer9EUKegG4")}}

+ +

Die Erweiterung wird nun ausgeführt und ist solange aktiv, bis du Firefox neustartest.

+ +

Alternativ kannst du Erweiterung auch von der Kommandozeile mit dem web-ext Tool ausführen.

+ +

Teste es nun aus

+ +

Nun besuche eine Seite von "mozilla.org". Du solltest jetzt einen roten Rand um die Seite erkennen:

+ +

{{EmbedYouTube("rxBQl2Z9IBQ")}}

+ +
+

Versuche es allerdings nicht auf addons.mozilla.org! Content Scripts werden zurzeit auf dieser Domain geblockt.

+
+ +

Experimentiere nun ein bisschen. Bearbeite das "content script", um die Farbe des Randes zu ändern oder mache etwas anderes mit dem Seiteninhalt. Speichere das "content script", lade die Erweiterungsdateien in about:debugging neu mit Hilfe des "Neu laden"-Knopfs. Du kannst die Änderungen sofort sehen:

+ +

{{EmbedYouTube("NuajE60jfGY")}}

+ + + +

Verpacken und Veröffentlichen

+ +

Damit andere Personen deine Erweiterung benutzen können musst du deine Erweiterung verpacken und zum Signieren an Mozilla senden. Um mehr darüber zu lernen, siehe  "Deine Erweiterung veröffentlichen".

+ +

Was nun?

+ +

Jetzt hast du eine Vorstellung vom Prozess der WebExtension-Entwicklung für Firefox erhalten. Versuche:

+ + diff --git a/files/de/mozilla/add-ons/webextensions/deine_zweite_erweiterung/index.html b/files/de/mozilla/add-ons/webextensions/deine_zweite_erweiterung/index.html new file mode 100644 index 0000000000..cc002d0b24 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/deine_zweite_erweiterung/index.html @@ -0,0 +1,357 @@ +--- +title: Deine zweite Erweiterung +slug: Mozilla/Add-ons/WebExtensions/Deine_zweite_Erweiterung +translation_of: Mozilla/Add-ons/WebExtensions/Your_second_WebExtension +--- +

{{AddonSidebar}}

+ +

Wenn du den Artikel "Deine erste Erweiterung" gelesen hast, hast du schon eine Vorstellung, wie man eine Erweiterung schreibt. In diesem Artikel werden wir eine komplexere Erweiterung schreiben, die mehr APIs benutzt.

+ +

Die Erweiterung fügt eine neue Schaltfläche zu Firefox hinzu. Wenn der Nutzer diese anklickt, wird ihm ein Popup angezeigt auf dem er ein Tier auswählen kann. Sobald er eines ausgewählt hat, wird der aktulle Inhalt der Website mit dem Bild des ausgewählten Tieres ersetzt.

+ +

Um das zu implementieren werden wir:

+ + + +

Man kann die Struktur der Erweiterung wie folgt darstellen:

+ +

+ +

Es ist eine einfache Erweiterung, aber es zeigt viele der Grundkonzepte der WebExtensions API:

+ + + +

Der komplette Quellcode der Erweiterung ist auf GitHub zu finden.

+ +

Um die Erweiterung zu erstellen, brauchst du mindestens Firefox 45.

+ +

Die Erweiterung schreiben

+ +

Erstelle einen neuen Ordner und öffne ihn:

+ +
mkdir beastify
+cd beastify
+ +

manifest.json

+ +

Erstelle jetzt eine Datei namens "manifest.json" und füge den folgenden Inhalt ein:

+ +
{
+
+  "manifest_version": 2,
+  "name": "Beastify",
+  "version": "1.0",
+
+  "description": "Erstellt eine Schaltfläche in der Toolbar. Klicke auf eine der Schaltflächen, um ein Tier auszuwählen. Der Inhalt des gerade geöffneten Tabs wird dann mit dem Bild des ausgewählten Tieres ersetzt. Nachschlagen: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples#beastify",
+  "homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/beastify",
+  "icons": {
+    "48": "icons/beasts-48.png"
+  },
+
+  "permissions": [
+    "activeTab"
+  ],
+
+  "browser_action": {
+    "default_icon": "icons/beasts-32.png",
+    "default_title": "Beastify",
+    "default_popup": "popup/choose_beast.html"
+  },
+
+  "web_accessible_resources": [
+    "beasts/frog.jpg",
+    "beasts/turtle.jpg",
+    "beasts/snake.jpg"
+  ]
+
+}
+
+ + + +

Beachte, dass alle Pfade relativ zur manifest.json angegeben werden.

+ +

Das Icon

+ +

Die Erweiterung soll ein Icon beinhalten, das neben dem Eintrag der Erweiterung in der Add-ons-Verwaltung angezeigt wird (diese kannst du durch Aufrufen der URL "about:addons" öffnen). In manifest.json haben wir festgelegt, dass wir ein Icon für die Toolbar unter "icons/beasts-48.png" bereitstellen.

+ +

Erstelle das "icons"-Verzeichnis and speichere dort das Icon namens "beasts-48.png".  Du kannst das Icon aus unserem Beispiel verwenden, welches aus dem Aha-Soft’s Free Retina Icon-Set stammt und gemäß seiner Lizenzbestimmungen genutzt wird.

+ +

Wenn du dich entscheidest, ein eigenes Icon zu verwenden, sollte es eine Auflösung von 48x48 Pixeln besitzen. Zusätzlich kannst du ein 96x96 Pixel großes Icon für hochaufgelöste Bildschirme bereitstellen. In diesem Fall wird es unter der Eigenschaft 96 des icons Objekts in manifest.json aufgeführt:

+ +
"icons": {
+  "48": "icons/beasts-48.png",
+  "96": "icons/beasts-96.png"
+}
+ +

Die Toolbar-Schaltfläche

+ +

Die Toolbar-Schaltfläche benötigt ebenfalls ein Icon, das laut unserer manifest.json unter "icons/beasts-32.png" bereitsteht.

+ +

Speichere ein Icon namens "beasts-32.png" im Verzeichnis "icons".Du kannst das Icon aus unserem Beispiel verwenden, welches aus dem IconBeast Lite Icon-Set stammt und gemäß seiner Lizenzbestimmungen genutzt wird.

+ +

Wenn du kein Popup einsetzt, dann wird ein Klick-Event zur Erweiterung gesendet, sobald der Benutzer die Schaltfläche anklickt. Wenn du hingegen ein Popup einsetzt, wird dieses Klick-Event nicht gesendet, sondern das Popup wird geöffnet. Da wir ein Popup verwenden wollen, soll dieses im nächsten Schritt erstellt werden.

+ +

Das Popup

+ +

Mithilfe des Popups soll der Benutzer eines von drei Tieren auswählen können.

+ +

Erstelle ein neues Verzeichnis namens "popup" in der obersten Ebene des Erweiterungsverzeichnisses. Dieses Verzeichnis wird den Code für das Popup enthalten. Das Popup besteht aus drei Dateien:

+ + + +

choose_beast.html

+ +

Die HTML-Datei sieht folgendermaßen aus:

+ +
<!DOCTYPE html>
+
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="choose_beast.css"/>
+  </head>
+
+  <body>
+    <div class="button beast">Frog</div>
+    <div class="button beast">Turtle</div>
+    <div class="button beast">Snake</div>
+    <div class="button clear">Reset</div>
+
+    <script src="choose_beast.js"></script>
+  </body>
+
+</html>
+ +

Es gibt ein Element für jedes Tier. Beachte, dass in dieser Datei auch die CSS- und JavaScript-Dateien verlinkt werden, genau wie auf einer Website.

+ +

choose_beast.css

+ +

Die CSS-Datei legt die Größe des Popups fest, stellt sicher, dass die drei Auswahlmöglichkeiten, den verfügbaren Platz ausfüllen und legt das grundlegende Styling fest:

+ +
html, body {
+  width: 100px;
+}
+
+.button {
+  margin: 3% auto;
+  padding: 4px;
+  text-align: center;
+  font-size: 1.5em;
+  cursor: pointer;
+}
+
+.beast:hover {
+  background-color: #CFF2F2;
+}
+
+.beast {
+ background-color: #E5F2F2;
+}
+
+.clear {
+ background-color: #FBFBC9;
+}
+
+.clear:hover {
+ background-color: #EAEAC9;
+}
+
+ +

choose_beast.js

+ +

In der JavaScript-Datei des Popups empfangen wir Klick-Events. Wenn ein Klick auf eines der Tiere erfolgte, wird das Content Script zum aktiven Tab hinzugefügt. Sobald das Content Script geladen wird, übergeben wir ihm eine Nachricht mit der Auswahl des Tieres:

+ +
/*
+Given the name of a beast, get the URL to the corresponding image.
+*/
+function beastNameToURL(beastName) {
+  switch (beastName) {
+    case "Frog":
+      return browser.extension.getURL("beasts/frog.jpg");
+    case "Snake":
+      return browser.extension.getURL("beasts/snake.jpg");
+    case "Turtle":
+      return browser.extension.getURL("beasts/turtle.jpg");
+  }
+}
+
+/*
+Listen for clicks in the popup.
+
+If the click is on one of the beasts:
+  Inject the "beastify.js" content script in the active tab.
+
+  Then get the active tab and send "beastify.js" a message
+  containing the URL to the chosen beast's image.
+
+If it's on a button which contains class "clear":
+  Reload the page.
+  Close the popup. This is needed, as the content script malfunctions after page reloads.
+*/
+
+document.addEventListener("click", (e) => {
+  if (e.target.classList.contains("beast")) {
+    var chosenBeast = e.target.textContent;
+    var chosenBeastURL = beastNameToURL(chosenBeast);
+
+    browser.tabs.executeScript(null, {
+      file: "/content_scripts/beastify.js"
+    });
+
+    var gettingActiveTab = browser.tabs.query({active: true, currentWindow: true});
+    gettingActiveTab.then((tabs) => {
+      browser.tabs.sendMessage(tabs[0].id, {beastURL: chosenBeastURL});
+    });
+  }
+  else if (e.target.classList.contains("clear")) {
+    browser.tabs.reload();
+    window.close();
+  }
+});
+
+ +

It uses three WebExtensions API functions:

+ + + +

The content script

+ +

Create a new directory, under the extension root, called "content_scripts" and create a new file in it called "beastify.js", with the following contents:

+ +
/*
+beastify():
+* removes every node in the document.body,
+* then inserts the chosen beast
+* then removes itself as a listener
+*/
+function beastify(request, sender, sendResponse) {
+  removeEverything();
+  insertBeast(request.beastURL);
+  browser.runtime.onMessage.removeListener(beastify);
+}
+
+/*
+Remove every node under document.body
+*/
+function removeEverything() {
+  while (document.body.firstChild) {
+    document.body.firstChild.remove();
+  }
+}
+
+/*
+Given a URL to a beast image, create and style an IMG node pointing to
+that image, then insert the node into the document.
+*/
+function insertBeast(beastURL) {
+  var beastImage = document.createElement("img");
+  beastImage.setAttribute("src", beastURL);
+  beastImage.setAttribute("style", "width: 100vw");
+  beastImage.setAttribute("style", "height: 100vh");
+  document.body.appendChild(beastImage);
+}
+
+/*
+Assign beastify() as a listener for messages from the extension.
+*/
+browser.runtime.onMessage.addListener(beastify);
+
+ +

The content script adds a listener to messages from the extension (specifically, from "choose_beast.js" above). In the listener, it:

+ + + +

The beasts

+ +

Finally, we need to include the images of the animals.

+ +

Create a new directory called "beasts", and add the three images in that directory, with the appropriate names. You can get the images from the GitHub repository, or from here:

+ +

+ +

Testing it out

+ +

First, double check that you have the right files in the right places:

+ +
beastify/
+
+    beasts/
+        frog.jpg
+        snake.jpg
+        turtle.jpg
+
+    content_scripts/
+        beastify.js
+
+    icons/
+        beasts-32.png
+        beasts-48.png
+
+    popup/
+        choose_beast.css
+        choose_beast.html
+        choose_beast.js
+
+    manifest.json
+ +

Starting in Firefox 45, you can install extensions temporarily from disk.

+ +

Open "about:debugging" in Firefox, click "Load Temporary Add-on", and select your manifest.json file. You should then see the extension's icon appear in the Firefox toolbar:

+ +

{{EmbedYouTube("sAM78GU4P34")}}

+ +

Open a web page, then click the icon, select a beast, and see the web page change:

+ +

{{EmbedYouTube("YMQXyAQSiE8")}}

+ +

Developing from the command line

+ +

You can automate the temporary installation step by using the web-ext tool. Try this:

+ +
cd beastify
+web-ext run
diff --git a/files/de/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html b/files/de/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html new file mode 100644 index 0000000000..688d48f544 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/extending_the_developer_tools/index.html @@ -0,0 +1,143 @@ +--- +title: Extending the developer tools +slug: Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools +tags: + - Deutsch Guide + - DevTools + - Extentions + - german +translation_of: Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools +--- +
+

Das heißt Folgendes wird nicht unterstützt , sie können Änderungen an der Seite sehen, die von Seitenskripten vorgenommen wurden.Diese Seite beschreibt devtools-APIs, wie sie in Firefox 55 vorhanden sind. Obwohl die APIs auf den Chrome devtools APIs basieren, gibt es noch viele Funktionen, die in Firefox noch nicht implementiert sind und daher hier nicht dokumentiert sind. Informationen zu den derzeit fehlenden Funktionen finden Sie unter Einschränkungen der devtools-APIs.

+
+ + + +

Die devtools-Seite hat kein sichtbares DOM, kann aber JavaScript-Quellen mit <script> -Tags enthalten. Die Quellen müssen mit der Erweiterung selbst gebündelt werden. Die normalen DOM-APIs, auf die über das globale Fensterobjekt zugegriffen werden kann Die gleichen WebExtension-APIs wie in Inhaltsskripten Die devtools-APIs: Devtools inspiziertes Fenster devtools.network devtools.panels Beachten Sie, dass die devtools-Seite keinen Zugriff auf andere Web Extensions-APIs erhält und die Hintergrundseite keinen Zugriff auf die devtools-APIs erhält. Stattdessen müssen die davetool-Seite und die Hintergrundseite definiert werden. Verwenden der Laufzeit-Messeging-APIs. Hier ist ein Beispiel:

+ +
+ +
+ +
+
+

Code im Zielfenster ausführen

+
+
+ +

Derdevtools.inspectedWindow.eval() bereitgestellt in einfacher weisen um den Code auszuführen in den lnspector Fensten 

+ +
+

Arbeiten mit Inhaltsskripten Dies entspricht in etwa der Verwendung von {{WebExtAPIRef ("tabs.executeScript ()")}} zum Einfügen eines Inhaltsskripts, mit einem wichtigen Unterschied nommen wurden.Beachten Sie, dass eine saubere Ansicht des DOM eine Sicherheitsfunktion ist, mit der verhindert werden soll, dass feindliche Seiten Erweiterungen austricksen, indem das Verhalten nativer DOM-Funktionen neu definiert wird.  Das bedeutet, dass Sie mit eval () sehr vorsichtig sein müssen und ein normales Inhaltsskript verwenden sollten, wenn Sie können.

+
+ +

Mit devtools.inspectedWindow.eval () geladene Skripte sehen auch keine von c definierten JavaJavaScript-Variablen

+ +

Arbeiten mit Inhaltsskripten

+ +

devtools document hat keinen direkten Zugrif Beachten Sie, dass eine saubere Ansicht des DOM eine Sicherheitsfunktion ist, mit der verhindert werden soll, dass feindliche Seiten Erweiterungen austricksen, indem das Verhalten nativer DOM-Funktionen neu definiert wird.  Das bedeutet, dass Sie mit eval () sehr vorsichtig sein müssen und ein normales Inhaltsskript verwenden sollten, wenn Sie können.<

+ +

Bei einem Skript muss das devtools5-Dokument eine Nachricht senden, in der es aufgefordert wird, das Skript einzufügen.  Die devtools.inspectedWindow.table gibt die ID der Zielregisterkarte an:

+ +

Wenn Sie Nachrichten zwischen den im Zielfenster ausgeführten Inhaltsskripten und einem devtools-Dokument austauschen müssen, sollten Sie {{WebExtAPIRef ("runtime.connect ()")} und {{WebExtAPIRef ("runtime.onConnect") verwenden  ")}}, um eine Verbindung zwischen der Hintergrundseite und dem devtools-Dokument herzustellen.  Die Hintergrundseite kann dann eine Zuordnung zwischen Registerkarten-IDs und {{WebExtAPIRef ("runtime.Port")}} -Objekten verwalten und diese verwenden, um Nachrichten zwischen den beiden Bereichen weiterzuleiten.

+ +

Diese APIs basieren auf den Chrome devtools-APIs, aber im Vergleich zu Chrome fehlen noch viele Funktionen.  In diesem Abschnitt werden die Funktionen aufgeführt, die ab Firefox 54 noch nicht implementiert sind. Beachten Sie, dass sich die devtools-APIs in der aktiven Entwicklung befinden und wir erwarten, dass die meisten davon in zukünftigen Versionen unterstützt werden.

+ + + +

 

diff --git a/files/de/mozilla/add-ons/webextensions/index.html b/files/de/mozilla/add-ons/webextensions/index.html new file mode 100644 index 0000000000..bb1b68b2de --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/index.html @@ -0,0 +1,86 @@ +--- +title: WebExtensions +slug: Mozilla/Add-ons/WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions +--- +
{{AddonSidebar}}
+ +

WebExtensions sind ein Cross-Browser-System zur Entwicklung von Browser-Add-ons. Das System ist in weiten Teilen kompatibel mit der extension API, welche von Google Chrome und Opera unterstützt wird. Erweiterungen, welche für diese Browser geschrieben wurden, werden in den meisten Fällen mit nur wenigen Anpassungen auch in Firefox oder Microsoft Edge lauffähig sein. Die API ist außerdem vollständig kompatibel mit Multiprozess-Firefox.

+ +

Wir beabsichtigen auch, die APIs zu erweitern, um die Unterstützung für Add-on-Entwickler zu verbessern. Sollten Sie Vorschläge dazu haben, würden wir uns über Ihre Mitteilung freuen. Sie erreichen uns über die englischsprachige Mailingliste für Add-on-Entwickler oder auf #webextensions im IRC.

+ +
+ + +
+

Referenz

+ + + +

JavaScript APIs

+ +
{{ ListSubpages ("/en-US/Add-ons/WebExtensions/API") }}
+ +

Manifest keys

+ +
{{ ListSubpages ("/en-US/Add-ons/WebExtensions/manifest.json") }}
+
+
diff --git a/files/de/mozilla/add-ons/webextensions/manifest.json/commands/index.html b/files/de/mozilla/add-ons/webextensions/manifest.json/commands/index.html new file mode 100644 index 0000000000..6222b35145 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/manifest.json/commands/index.html @@ -0,0 +1,184 @@ +--- +title: commands +slug: Mozilla/Add-ons/WebExtensions/manifest.json/commands +tags: + - Add-ons Erweiterungen WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/manifest.json/commands +--- +
{{AddonSidebar}}
+ + + + + + + + + + + + + + + + +
TypObjekt
ObligatorischNein
Beispiel +
+"commands": {
+  "toggle-feature": {
+    "suggested_key": {
+      "default": "Ctrl+Shift+Y",
+      "linux": "Ctrl+Shift+U"
+    },
+    "description": "Ereignis 'toggle-feature' senden"
+  }
+}
+
+ +

Verwenden Sie dencommands-Schlüssel, um für Ihre Erweiterung eine oder mehrere Tastenkürzel zu definieren.

+ +

Jedes Tastenkürzel wird mit einem Namen, eine Kombination von Tasten und einer Beschreibung definiert. Sobald Sie einige Befehle in der manifest.json definiert haben, können Sie die zugewiesenen Tastenkombinationen mittels der JavaScript-API  {{WebExtAPIRef("commands")}} verwenden.

+ +

Syntax

+ +

Der commands-Schlüsselist ein Objekt, und jedes Tastenkürzel ist eine Eigenschaft von ihm. Der Name der Eigenschaft ist der Name des Tastenkürzels.

+ +

Jedes Tastenkürzel ist selbst ein Objekt, das bis zu zwei Eigenschaften hat:

+ + + +

Die Eigenschaft suggested_key ist selbst ein Objekt, das folgende Eigenschaften haben kann, die alle Zeichenketten sind:

+ + + +

Der Wert jeder Eigenschaft ist das Tastenkürzel für den Befehl auf der angegebenen Plattform, der als Zeichenkette angegeben wird, die die durch ein „+“ voneinander getrennten Tasten enthält. Der Wert für „default“ wird auf allen Plattformen verwendet, die nicht ausdrücklich angegeben sind.

+ +

Beispiel:

+ +
"commands": {
+  "toggle-feature": {
+    "suggested_key": {
+      "default": "Alt+Shift+U",
+      "linux": "Ctrl+Shift+U"
+    },
+    "description": "'toggle-feature'-Ereignis an die Erweiterung senden"
+  },
+  "do-another-thing": {
+    "suggested_key": {
+      "default": "Ctrl+Shift+Y"
+    }
+  }
+}
+ +

Dies definiert zwei Tastenkürzel:

+ + + +

Sie könnten dann den ersten dieser Befehle mit einem Code wie diesen verwenden:

+ +
browser.commands.onCommand.addListener(function(command) {
+  if (command == "toggle-feature") {
+    console.log("toggling the feature!");
+  }
+});
+ +

Besondere Tastenkürzel

+ +

Es gibt drei besondere Tastenkürzel:

+ + + +

Dies definiert zum Beispiel eine Tastenkombination, um auf die Browseraktion der Erweiterung zu klicken:

+ +
"commands": {
+  "_execute_browser_action": {
+    "suggested_key": {
+      "default": "Ctrl+Shift+Y"
+    }
+  }
+}
+ +

Tastenkürzel-Werte

+ +

Es gibt zwei gültige Formate für Tastenkürzel: als Tastenkombination oder als Medien-Taste.

+ +

Tastenkombinationen

+ +
+
Auf Macs wird "Ctrl" als  "Command"-Taste interpretiert, geben Sie also "MacCrtl" an, wenn Sie eigentlich "Ctrl" brauchen.
+
+ +

Tastenkombinationen müssen aus zwei oder mehr Tasten bestehen:

+ + + +

Die Taste wird dann als Zeichenkette angegeben, die den Satz an Tastenwerten enthält, in der oben angegebenen Reihenfolge, getrennt durch "+": zum Beispiel "Ctrl+Shift+Z".

+ +

Wenn eine Tastenkombination bereits vom Browser (zum Beispiel "Ctrl+P") oder durch ein bestehendes Add-on verwendet wird, können Sie sie nicht überschreiben. Sie dürfen sie definieren, aber Ihr Eventhandler wird nicht aufgerufen, wenn der Benutzer sie eingibt.

+ +

Medientasten

+ +

Alternativ kann das Tastenkürzel als eine der folgenden Medientasten angegeben werden:

+ + + +

Beispiel

+ +

Definieren Sie ein einzelnes Tastenkürzel, das nur standardmäßig verwendet wird:

+ +
"commands": {
+  "toggle-feature": {
+    "suggested_key": {
+      "default": "Ctrl+Shift+Y"
+    },
+    "description": "Ereignis'toggle-feature' senden"
+  }
+}
+ +

Definieren Sie zwei Tastenkürzel, eins mit einer plattformspezifischen Tastenkombination:

+ +
"commands": {
+  "toggle-feature": {
+    "suggested_key": {
+      "default": "Alt+Shift+U",
+      "linux": "Ctrl+Shift+U"
+    },
+    "description": "Ereignis 'toggle-feature' senden"
+  },
+  "do-another-thing": {
+    "suggested_key": {
+      "default": "Ctrl+Shift+Y"
+    }
+  }
+}
+ +

Browserkompatibilität

+ + + +

{{Compat("webextensions.manifest.commands")}}

diff --git a/files/de/mozilla/add-ons/webextensions/manifest.json/devtools_page/index.html b/files/de/mozilla/add-ons/webextensions/manifest.json/devtools_page/index.html new file mode 100644 index 0000000000..1b4afb1cfa --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/manifest.json/devtools_page/index.html @@ -0,0 +1,42 @@ +--- +title: devtools_page +slug: Mozilla/Add-ons/WebExtensions/manifest.json/devtools_page +translation_of: Mozilla/Add-ons/WebExtensions/manifest.json/devtools_page +--- +
{{AddonSidebar}}
+ + + + + + + + + + + + + + + + +
TypeString
MandatoryNo
Example +
+"devtools_page": "devtools/my-page.html"
+
+ +

Use this key to enable your extension to extend the browser's built-in devtools.

+ +

This key is defined as a URL to an HTML file. The HTML file must be bundled with the extension, and the URL is relative to the extension's root.

+ +

See Extending the developer tools to learn more.

+ +

Example

+ +
"devtools_page": "devtools/my-page.html"
+ +

Browser compatibility

+ + + +

{{Compat("webextensions.manifest.devtools_page")}}

diff --git a/files/de/mozilla/add-ons/webextensions/manifest.json/index.html b/files/de/mozilla/add-ons/webextensions/manifest.json/index.html new file mode 100644 index 0000000000..10a4fd8597 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/manifest.json/index.html @@ -0,0 +1,105 @@ +--- +title: manifest.json +slug: Mozilla/Add-ons/WebExtensions/manifest.json +tags: + - Add-ons + - Extensions + - NeedsTranslation + - TopicStub + - WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/manifest.json +--- +
{{AddonSidebar}}
+ +

Die Datei manifest.json ist eine JSON-formatierte Datei, und die einzige Datei, die eine Erweiterung, die das WebExtensions API verwendet, unterstützt.

+ +

Durch das Verwenden von manifest.json, legst du Metadaten, wie zum Beispiel Name und Version, für deine Erweiterung fest, und kannst auch einige Aspekte der Funktionalität deiner Erweiterung,wie zum Beispiel Hintergrundskripte, Inhaltsskripte und Browserationen.

+ +

Manifest.json keys sind unten gelistet:

+ +
{{ ListSubpages ("/en-US/Add-ons/WebExtensions/manifest.json") }}
+ +
 
+ +

"manifest_version", "version", und "name" sind die einzigen verpflichtenden Keys. "default_locale" muss vorhanden sein, wenn der "_locales"-Ordner vorhanden ist und darf sonst nicht vorhanden sein. "applications" wird von Google Chrome nicht unterstützt, und ist verpflichtend in Firefox vor Firefox 48 und Firefox für Android.

+ +

Browserkompatiblität

+ +

{{Compat("webextensions.manifest")}}

+ +

Beispiel

+ +

Hier ein kurzes Syntax-Beispiel für manifest.json:

+ +
{
+  "applications": {
+    "gecko": {
+      "id": "addon@example.com",
+      "strict_min_version": "42.0"
+    }
+  },
+
+  "background": {
+    "scripts": ["jquery.js", "my-background.js"],
+    "page": "my-background.html"
+  },
+
+  "browser_action": {
+    "default_icon": {
+      "19": "button/geo-19.png",
+      "38": "button/geo-38.png"
+    },
+    "default_title": "Whereami?",
+    "default_popup": "popup/geo.html"
+  },
+
+  "commands": {
+    "toggle-feature": {
+      "suggested_key": {
+        "default": "Ctrl+Shift+Y",
+        "linux": "Ctrl+Shift+U"
+      },
+      "description": "Send a 'toggle-feature' event"
+    }
+  },
+
+  "content_security_policy": "script-src 'self' https://example.com; object-src 'self'",
+
+  "content_scripts": [
+    {
+      "exclude_matches": ["*://developer.mozilla.org/*"],
+      "matches": ["*://*.mozilla.org/*"],
+      "js": ["borderify.js"]
+    }
+  ],
+
+  "default_locale": "en",
+
+  "description": "...",
+
+  "icons": {
+    "48": "icon.png",
+    "96": "icon@2x.png"
+  },
+
+  "manifest_version": 2,
+
+  "name": "...",
+
+  "page_action": {
+    "default_icon": {
+      "19": "button/geo-19.png",
+      "38": "button/geo-38.png"
+    },
+    "default_title": "Whereami?",
+    "default_popup": "popup/geo.html"
+  },
+
+  "permissions": ["webNavigation"],
+
+  "version": "0.1",
+
+  "web_accessible_resources": ["images/my-image.png"]
+}
+ +

 

diff --git a/files/de/mozilla/add-ons/webextensions/manifest.json/theme/index.html b/files/de/mozilla/add-ons/webextensions/manifest.json/theme/index.html new file mode 100644 index 0000000000..30825db592 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/manifest.json/theme/index.html @@ -0,0 +1,1361 @@ +--- +title: theme +slug: Mozilla/Add-ons/WebExtensions/manifest.json/theme +translation_of: Mozilla/Add-ons/WebExtensions/manifest.json/theme +--- +
{{AddonSidebar}}
+ + + + + + + + + + + + + + + + +
TypeObject
MandatoryNo
Example +
+"theme": {
+  "images": {
+    "theme_frame": "images/sun.jpg"
+  },
+  "colors": {
+    "frame": "#CF723F",
+    "tab_background_text": "#000"
+  }
+}
+
+ +

Use the theme key to define a static theme to apply to Firefox.

+ +
+

Note: If you want to include a theme with an extension, please see the {{WebExtAPIRef("theme")}} API.

+
+ +
+

Note: Since May 2019, themes need to be signed to be installed ({{bug(1545109)}}).  See Signing and distributing your add-on for more details.

+
+ +
+

Theme support in Firefox for Android: A new version of Firefox for Android, based on GeckoView, is under development. A pre-release version is available. The pre-release version does not support themes.

+
+ +

Image formats

+ +

The following image formats are supported in all theme image properties:

+ + + +

Syntax

+ +

The theme key is an object that takes the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
imagesObject +

Optional as of Firefox 60. Mandatory before Firefox 60.

+ +

A JSON object whose properties represent the images to display in various parts of the browser. See images for details on the properties that this object can contain.

+
colorsObject +

Mandatory.

+ +

A JSON object whose properties represent the colors of various parts of the browser. See colors for details on the properties that this object can contain.

+
propertiesObject +

Optional

+ +

This object has two properties that affect how the "additional_backgrounds" images are displayed. See properties for details on the properties that this object can contain.

+ +
    +
  • "additional_backgrounds_alignment": an array of enumeration values defining the alignment of the corresponding "additional_backgrounds": array item.
    + The alignment options include: "bottom", "center", "left", "right", "top", "center bottom", "center center", "center top", "left bottom", "left center", "left top", "right bottom", "right center", and "right top". If not specified, defaults to "right top".
    + Optional
  • +
  • "additional_backgrounds_tiling": an array of enumeration values defining how the corresponding "additional_backgrounds": array item repeats, with support for "no-repeat", "repeat", "repeat-x", and "repeat-y". If not specified, defaults to "no-repeat".
    + Optional
  • +
+
+ +

images

+ +

All URLs are relative to the manifest.json file and cannot reference an external URL.

+ +

Images should be 200 pixels high to ensure they always fill the header space vertically.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
headerURL {{Deprecated_Inline}}String +
+

headerURL has been removed in Firefox 70. You will begin to get warnings in Firefox 65 and later if you load a theme that uses this property. Use theme_frame instead.

+
+ +

The URL of a foreground image to be added to the header area and anchored to the upper right corner of the header area.

+ +

Optional in desktop Firefox from Firefox 60 onwards. One of theme_frame or headerURL had to be specified before Firefox 60. Note also that in Firefox 60 onwards, any {{cssxref("text-shadow")}} applied to the header text is removed if no headerURL is specified (see {{bug(1404688)}}).

+ +

In Firefox for Android, headerURL or theme_frame  must be specified.

+
theme_frameString +

The URL of a foreground image to be added to the header area and anchored to the upper right corner of the header area.

+ +
+

Chrome anchors the image to the top left of the header and if the image doesn’t fill the header area tile the image.

+
+ +

Optional in desktop Firefox 60 onwards. One of theme_frame or headerURL had to be specified before Firefox 60.

+ +

In Firefox for Android, headerURL or theme_frame  must be specified.

+
additional_backgroundsArray of String +
+

The additional_backgrounds property is experimental. It is currently accepted in release versions of Firefox, but its behavior is subject to change. It is not supported in Firefox for Android.

+
+ +

An array of URLs for additional background images to be added to the header area and displayed behind the "theme_frame": image. These images layer the first image in the array on top, the last image in the array at the bottom.

+ +

Optional.

+ +

By default all images are anchored to the upper right corner of the header area, but their alignment and repeat behavior can be controlled by properties of "properties":.

+
+ +

colors

+ +

These properties define the colors used for different parts of the browser. They are all optional (but note that "accentcolor" and "textcolor" were mandatory in Firefox before version 63).  How these properties affect the Firefox UI  is shown here:

+ + + + + + + +
+

Overview of the color properties and how they apply to Firefox UI components

+
+ +
+

Where a component is affected by multiple color properties, the properties are listed in order of precedence.

+
+ +

All these properties can be specified as either a string containing any valid CSS color string (including hexadecimal), or an RGB array, such as "tab_background_text": [ 107 , 99 , 23 ].

+ +
+

In Chrome, colors may only be specified as RGB arrays.

+ +

In Firefox for Android colors can be specified using:

+ + + +

Colors for Firefox for Android themes cannot be specified using color names.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
+

accentcolor {{Deprecated_Inline}}

+
+
+

accentcolor has been removed in Firefox 70. You will begin to get warnings in Firefox 65 and later if you load a theme that uses this property. Use the frame property instead.

+
+ +

The color of the header area background, displayed in the part of the header not covered or visible through the images specified in "headerURL" and "additional_backgrounds".

+ +
See example + +
+"theme": {
+  "colors": {
+     "accentcolor": "red",
+     "tab_background_text": "white"
+  }
+}
+
+ +

+
bookmark_text +

The color of text and icons in the bookmark and find bars. Also, if tab_text isn't defined it sets the color of the active tab text and if icons isn't defined the color of the toolbar icons. Provided as Chrome compatible alias for toolbar_text.

+ +
+

Ensure any color used contrasts well with those used in frame and frame_inactive or toolbar if you're using that property.

+ +

Where icons isn't defined, also ensure good contrast with button_background_active and button_background_hover.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "tab_text": "white",
+    "toolbar": "black",
+    "bookmark_text": "red"
+  }
+}
+
+ +

Example use of the bookmark_text color property

+
button_background_active +

The color of the background of the pressed toolbar buttons.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "button_background_active": "red"
+  }
+}
+
+ +

+
button_background_hover +

The color of the background of the toolbar buttons on hover.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "button_background_hover": "red"
+  }
+}
+
+ +

+
icons +

The color of toolbar icons, excluding those in the find toolbar.

+ +
+

Ensure the color used contrasts well with those used in frameframe_inactive, button_background_active, and button_background_hover.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "icons": "red"
+  }
+}
+
+ +

+
icons_attention +

The color of toolbar icons in attention state such as the starred bookmark icon or finished download icon.

+ +
+

Ensure the color used contrasts well with those used in frameframe_inactive, button_background_active, and button_background_hover.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "icons_attention": "red"
+  }
+}
+
+ +

+
frame +

The color of the header area background, displayed in the part of the header not covered or visible through the images specified in "theme_frame" and "additional_backgrounds".

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "red",
+     "tab_background_text": "white"
+  }
+}
+
+ +

+
frame_inactive +

The color of the header area background when the browser window is inactive, displayed in the part of the header not covered or visible through the images specified in "theme_frame" and "additional_backgrounds".

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "red",
+     "frame_inactive": "gray",
+     "tab_text": "white"
+  }
+}
+
+ +

Example use of the frame_inactive color property

+
ntp_background +

The new tab page background color.

+ +
See example + +
+"theme": {
+  "colors": {
+     "ntp_background": "red",
+     "ntp_text": "white"
+  }
+}
+
+ +

+
ntp_text +

The new tab page text color.

+ +
+

Ensure the color used contrasts well with that used in ntp_background.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "ntp_background": "red",
+     "ntp_text": "white"
+  }
+}
+
+ +

+
popup +

The background color of popups (such as the url bar dropdown and the arrow panels).

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "popup": "red"
+  }
+}
+
+ +

+
popup_border +

The border color of popups.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "popup": "black",
+     "popup_text": "white",
+     "popup_border": "red"
+  }
+}
+
+ +

+
popup_highlight +

The background color of items highlighted using the keyboard inside popups (such as the selected url bar dropdown item).

+ +
+

It's recommended to define popup_highlight_text to override the browser default text color on various platforms.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "popup_highlight": "red",
+     "popup_highlight_text": "white"
+  }
+}
+
+ +

+
popup_highlight_text +

The text color of items highlighted inside popups.

+ +
+

Ensure the color used contrasts well with that used in popup_highlight.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "popup_highlight": "black",
+     "popup_highlight_text": "red"
+  }
+}
+
+ +

+
popup_text +

The text color of popups.

+ +
+

Ensure the color used contrasts well with that used in popup.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "popup": "black",
+     "popup_text": "red"
+  }
+}
+
+ +

+
sidebar +

The background color of the sidebar.

+ +
See example + +
+"theme": {
+  "colors": {
+     "sidebar": "red",
+     "sidebar_highlight": "white",
+     "sidebar_highlight_text": "green",
+     "sidebar_text": "white"
+  }
+}
+
+ +

+
sidebar_border +

The border and splitter color of the browser sidebar

+ +
See example + +
+"theme": {
+  "colors": {
+     "sidebar_border": "red"
+  }
+}
+
+ +

+
sidebar_highlight +

The background color of highlighted rows in built-in sidebars

+ +
See example + +
+"theme": {
+  "colors": {
+     "sidebar_highlight": "red",
+     "sidebar_highlight_text": "white"
+  }
+}
+
+ +

+
sidebar_highlight_text +

The text color of highlighted rows in sidebars.

+ +
+

Ensure the color used contrasts well with that used in sidebar_highlight.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "sidebar_highlight": "pink",
+    "sidebar_highlight_text": "red",
+  }
+}
+
+ +

+
sidebar_text +

The text color of sidebars.

+ +
+

Ensure the color used contrasts well with that used in sidebar.

+
+ +
See example + +
+"theme": {
+  "colors": {
+     "sidebar": "red",
+     "sidebar_highlight": "white",
+     "sidebar_highlight_text": "green",
+     "sidebar_text": "white"
+  }
+}
+
+ +

+
tab_background_separator +

The color of the vertical separator of the background tabs.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "tab_background_separator": "red"
+  }
+}
+
+ +

A closeup of browser tabs to highlight the separator.

+
tab_background_text +

The color of the text displayed in the inactive page tabs. If tab_text or bookmark_text isn't specified, applies to the active tab text.

+ +
+

Ensure the color used contrasts well with those used in tab_selected or frame and  frame_inactive.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "white",
+    "tab_background_text": "red"
+  }
+}
+
+ +

+
tab_line +

The color of the selected tab line.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "tab_line": "red"
+  }
+}
+
+ +

+
tab_loading +

The color of the tab loading indicator and the tab loading burst.

+ +
See example + +
+"theme": {
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "tab_loading": "red"
+  }
+}
+
+ +

+
tab_selected +

The background color of the selected tab. When not in use selected tab color is set by frame and the frame_inactive.

+ +
See example + +
+"theme": {
+  "images": {
+  "theme_frame": "weta.png"
+},
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "tab_selected": "red"
+  }
+}
+
+ +

+
tab_text +

From Firefox 59, it represents the text color for the selected tab. If tab_line isn't specified, it also defines the color of the selected tab line.

+ +
+

Ensure the color used contrasts well with those used in tab_selected or frame and  frame_inactive.

+
+ +

From Firefox 55 to 58, it is incorrectly implemented as alias for "textcolor"

+ +
See example + +
+"theme": {
+  "images": {
+  "theme_frame": "weta.png"
+},
+  "colors": {
+     "frame": "black",
+     "tab_background_text": "white",
+     "tab_selected": "white",
+     "tab_text": "red"
+  }
+}
+
+ +

+
textcolor {{Deprecated_Inline}} +
+

textcolor has been removed in Firefox 70. You will begin to get warnings in Firefox 65 and later if you load a theme that uses this property. Use tab_background_text instead.

+
+ +

The color of the text displayed in the header area.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "white",
+    "textcolor": "red"
+  }
+}
+
+ +

+
toolbar +

The background color for the navigation bar, the bookmarks bar, and the selected tab.

+ +

This also sets the background color of the "Find" bar.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "red",
+    "tab_background_text": "white"
+  }
+}
+
+ +

+
toolbar_bottom_separator +

The color of the line separating the bottom of the toolbar from the region below.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "toolbar_bottom_separator": "red"
+  }
+}
+
+ +

+
toolbar_field +

The background color for fields in the toolbar, such as the URL bar.

+ +

This also sets the background color of the Find in page field.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "red"
+  }
+}
+
+ +

+
toolbar_field_border +

The border color for fields in the toolbar.

+ +

This also sets the border color of the Find in page field.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "black",
+    "toolbar_field_text": "white",
+    "toolbar_field_border": "red"
+  }
+}
+
+ +

+
toolbar_field_border_focus +

The focused border color for fields in the toolbar.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "black",
+    "toolbar_field_text": "white",
+    "toolbar_field_border_focus": "red"
+  }
+}
+
+ +

+
toolbar_field_focus +

The focused background color for fields in the toolbar, such as the URL bar.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "black",
+    "toolbar_field_text": "white",
+    "toolbar_field_focus": "red"
+  }
+}
+
+ +

+
toolbar_field_highlightThe background color used to indicate the current selection of text in the URL bar (and the search bar, if it's configured to be separate). +
See example +
+"theme": {
+  "colors": {
+    "toolbar_field": "rgba(255, 255, 255, 0.91)",
+    "toolbar_field_text": "rgb(0, 100, 0)",
+    "toolbar_field_highlight": "rgb(180, 240, 180, 0.9)",
+    "toolbar_field_highlight_text": "rgb(0, 80, 0)"
+  }
+}
+
+ +

Example showing customized text and highlight colors in the URL bar

+ +

Here, the toolbar_field_highlight field specifies that the highlight color is a light green, while the text is set to a dark-to-medium green using toolbar_field_highlight_text.

+
toolbar_field_highlight_text +

The color used to draw text that's currently selected in the URL bar (and the search bar, if it's configured to be separate box).

+ +
+

Ensure the color used contrasts well with those used in toolbar_field_highlight.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "toolbar_field": "rgba(255, 255, 255, 0.91)",
+    "toolbar_field_text": "rgb(0, 100, 0)",
+    "toolbar_field_highlight": "rgb(180, 240, 180, 0.9)",
+    "toolbar_field_highlight_text": "rgb(0, 80, 0)"
+  }
+}
+
+ +

Example showing customized text and highlight colors in the URL bar

+ +

Here, the toolbar_field_highlight_text field is used to set the text color to a dark medium-dark green, while the highlight color is  a light green.

+
toolbar_field_separator +

The color of separators inside the URL bar. In Firefox 58 this was implemented as toolbar_vertical_separator.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field_separator": "red"
+  }
+}
+
+ +

+ +

In this screenshot, "toolbar_vertical_separator" is the white vertical line in the URL bar dividing the Reader Mode icon from the other icons.

+
toolbar_field_text +

The color of text in fields in the toolbar, such as the URL bar. This also sets the color of text in the Find in page field.

+ +
+

Ensure the color used contrasts well with those used in toolbar_field.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "black",
+    "toolbar_field_text": "red"
+  }
+}
+
+ +

+
toolbar_field_text_focus +

The color of text in focused fields in the toolbar, such as the URL bar.

+ +
+

Ensure the color used contrasts well with those used in toolbar_field_focus.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "toolbar": "black",
+    "tab_background_text": "white",
+    "toolbar_field": "black",
+    "toolbar_field_text": "white",
+    "toolbar_field_text_focus": "red"
+  }
+}
+
+ +

+
toolbar_text +

The color of toolbar text. This also sets the color of  text in the "Find" bar.

+ +
+

For compatibility with Chrome, use the alias bookmark_text.

+
+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "toolbar": "black",
+    "toolbar_text": "red"
+  }
+}
+
+ +

+
toolbar_top_separator +

The color of the line separating the top of the toolbar from the region above.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "toolbar": "black",
+    "toolbar_top_separator": "red"
+  }
+}
+
+ +

+
toolbar_vertical_separator +

The color of the separator next to the application menu icon. In Firefox 58, it corresponds to the color of separators inside the URL bar.

+ +
See example + +
+"theme": {
+  "colors": {
+    "frame": "black",
+    "tab_background_text": "white",
+    "toolbar": "black",
+    "toolbar_vertical_separator": "red"
+  }
+}
+
+ +

+
+ +

Aliases

+ +

Additionally, this key accepts various properties that are aliases for one of the properties above. These are provided for compatibility with Chrome. If an alias is given, and the non-alias version is also given, then the value will be taken from the non-alias version.

+ +
+

Beginning Firefox 70, the following properties are removed: accentcolor and textcolor. Use frame and tab_background_text instead. Using these values in themes loaded into Firefox 65 or later will raise warnings.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameAlias for
bookmark_texttoolbar_text
frameaccentcolor {{Deprecated_Inline}}
frame_inactiveaccentcolor {{Deprecated_Inline}}
tab_background_texttextcolor {{Deprecated_Inline}}
+ +

properties

+ + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
additional_backgrounds_alignment +

Array of String

+
+

Optional.

+ +

An array of enumeration values defining the alignment of the corresponding "additional_backgrounds": array item.
+ The alignment options include:

+ +
    +
  • "bottom"
  • +
  • "center"
  • +
  • "left"
  • +
  • "right"
  • +
  • "top"
  • +
  • "center bottom"
  • +
  • "center center"
  • +
  • "center top"
  • +
  • "left bottom"
  • +
  • "left center"
  • +
  • "left top"
  • +
  • "right bottom"
  • +
  • "right center"
  • +
  • "right top".
  • +
+ +

If not specified, defaults to "right top".

+
additional_backgrounds_tiling +

Array of String

+
+

Optional.

+ +

An array of enumeration values defining how the corresponding "additional_backgrounds": array item repeats. Options include:

+ +
    +
  • "no-repeat"
  • +
  • "repeat"
  • +
  • "repeat-x"
  • +
  • "repeat-y"
  • +
+ +

If not specified, defaults to "no-repeat".

+
+ +

Examples

+ +

A basic theme must define an image to add to the header, the accent color to use in the header, and the color of text used in the header:

+ +
 "theme": {
+   "images": {
+     "theme_frame": "images/sun.jpg"
+   },
+   "colors": {
+     "frame": "#CF723F",
+     "tab_background_text": "#000"
+   }
+ }
+ +

Multiple images can be used to fill the header. Before Firefox version 60, use a blank or transparent header image to gain control over the placement of each additional image:

+ +
 "theme": {
+   "images": {
+     "additional_backgrounds": [ "images/left.png" , "images/middle.png", "images/right.png"]
+   },
+   "properties": {
+     "additional_backgrounds_alignment": [ "left top" , "top", "right top"]
+   },
+   "colors": {
+     "frame": "blue",
+     "tab_background_text": "#ffffff"
+   }
+ }
+ +

You can also fill the header with a repeated image, or images, in this case a single image anchored in the middle top of the header and repeated across the rest of the header:

+ +
 "theme": {
+   "images": {
+     "additional_backgrounds": [ "images/logo.png"]
+   },
+   "properties": {
+     "additional_backgrounds_alignment": [ "top" ],
+     "additional_backgrounds_tiling": [ "repeat"  ]
+   },
+   "colors": {
+     "frame": "green",
+     "tab_background_text": "#000"
+   }
+ }
+ +

The following example uses most of the different values for theme.colors:

+ +
  "theme": {
+    "images": {
+      "theme_frame": "weta.png"
+    },
+
+    "colors": {
+       "frame": "darkgreen",
+       "tab_background_text": "white",
+       "toolbar": "blue",
+       "bookmark_text": "cyan",
+       "toolbar_field": "orange",
+       "toolbar_field_border": "white",
+       "toolbar_field_text": "green",
+       "toolbar_top_separator": "red",
+       "toolbar_bottom_separator": "white",
+       "toolbar_vertical_separator": "white"
+    }
+  }
+ +

It will give you a browser that looks like this:

+ +

+ +

In this screenshot, "toolbar_vertical_separator" is the white vertical line in the URL bar dividing the Reader Mode icon from the other icons.

+ +

Browser compatibility

+ + + +

{{Compat("webextensions.manifest.theme")}}

+ +

Colors

+ +

{{Compat("webextensions.manifest.theme.colors", 10)}}

+ +

Images

+ +

{{Compat("webextensions.manifest.theme.images", 10)}}

+ +

Properties

+ +

{{Compat("webextensions.manifest.theme.properties", 10)}}

+ +

Chrome compatibility

+ +

In Chrome:

+ + diff --git a/files/de/mozilla/add-ons/webextensions/match_patterns/index.html b/files/de/mozilla/add-ons/webextensions/match_patterns/index.html new file mode 100644 index 0000000000..6c4694c922 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/match_patterns/index.html @@ -0,0 +1,430 @@ +--- +title: Match patterns in extension manifests +slug: Mozilla/Add-ons/WebExtensions/Match_patterns +translation_of: Mozilla/Add-ons/WebExtensions/Match_patterns +--- +
{{AddonSidebar}}
+ +

Match patterns are a way to specify groups of URLs: a match pattern matches a specific set of URLs. They are used in WebExtensions APIs in a few places, most notably to specify which documents to load content scripts into, and to specify which URLs to add webRequest listeners to.

+ +

APIs that use match patterns usually accept a list of match patterns, and will perform the appropriate action if the URL matches any of the patterns. See, for example, the content_scripts key in manifest.json.

+ +

Match pattern structure

+ +
+

Note: Some browsers don’t support certain schemes.
+ Check the Browser compatibility table for details.

+
+ +

All match patterns are specified as strings. Apart from the special <all_urls> pattern, match patterns consist of three parts: scheme, host, and path. The scheme and host are separated by ://.

+ +
<scheme>://<host><path>
+ +

scheme

+ +

The scheme component may take one of two forms:

+ + + + + + + + + + + + + + + + + + +
FormMatches
*Only "http" and "https" and in some browsers also "ws" and "wss".
One of http, https, ws, wss, ftp, ftps, data or file.Only the given scheme.
+ +

host

+ +

The host component may take one of three forms:

+ + + + + + + + + + + + + + + + + + + + + + +
FormMatches
*Any host.
*. followed by part of the hostname.The given host and any of its subdomains.
A complete hostname, without wildcards.Only the given host.
+ +

host must not include a port number.

+ +

host is optional only if the scheme is "file".

+ +

Note that the wildcard may only appear at the start.

+ +

path

+ +

The path component must begin with a /.

+ +

After that, it may subsequently contain any combination of the * wildcard and any of the characters that are allowed in URL paths or query strings. Unlike host, the path component may contain the * wildcard in the middle or at the end, and the * wildcard may appear more than once.

+ +

The value for the path matches against the string which is the URL path plus the URL query string. This includes the ? between the two, if the query string is present in the URL. For example, if you want to match URLs on any domain where the URL path ends with foo.bar, then you need to use an array of Match Patterns like ['*://*/*foo.bar', '*://*/*foo.bar?*']. The ?* is needed, rather than just bar*, in order to anchor the ending * as applying to the URL query string and not some portion of the URL path.

+ +

Neither the URL fragment identifier, nor the # which precedes it, are considered as part of the path.

+ +
+

Note: The path pattern string should not include a port number. Adding a port, as in: "http://localhost:1234/*" causes the match pattern to be ignored. However, "http://localhost:1234" will match with "http://localhost/*"

+
+ +

<all_urls>

+ +

The special value <all_urls> matches all URLs under any of the supported schemes: that is "http", "https", "ws", "wss", "ftp", "data", and "file".

+ +

Examples

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PatternExample matchesExample non-matches
+

<all_urls>

+ +

Match all URLs.

+
+

http://example.org/

+ +

https://a.org/some/path/

+ +

ws://sockets.somewhere.org/

+ +

wss://ws.example.com/stuff/

+ +

ftp://files.somewhere.org/

+ +

ftps://files.somewhere.org/

+
+

resource://a/b/c/
+ (unsupported scheme)

+
+

*://*/*

+ +

Match all HTTP, HTTPS and WebSocket URLs.

+
+

http://example.org/

+ +

https://a.org/some/path/

+ +

ws://sockets.somewhere.org/

+ +

wss://ws.example.com/stuff/

+
+

ftp://ftp.example.org/
+ (unmatched scheme)

+ +

ftps://ftp.example.org/
+ (unmatched scheme)

+ +

file:///a/
+ (unmatched scheme)

+
+

*://*.mozilla.org/*

+ +

Match all HTTP, HTTPS and WebSocket URLs that are hosted at "mozilla.org" or one of its subdomains.

+
+

http://mozilla.org/

+ +

https://mozilla.org/

+ +

http://a.mozilla.org/

+ +

http://a.b.mozilla.org/

+ +

https://b.mozilla.org/path/

+ +

ws://ws.mozilla.org/

+ +

wss://secure.mozilla.org/something

+
+

ftp://mozilla.org/
+ (unmatched scheme)

+ +

http://mozilla.com/
+ (unmatched host)

+ +

http://firefox.org/
+ (unmatched host)

+
+

*://mozilla.org/

+ +

Match all HTTP, HTTPS and WebSocket URLs that are hosted at exactly "mozilla.org/".

+
+

http://mozilla.org/

+ +

https://mozilla.org/

+ +

ws://mozilla.org/

+ +

wss://mozilla.org/

+
+

ftp://mozilla.org/
+ (unmatched scheme)

+ +

http://a.mozilla.org/
+ (unmatched host)

+ +

http://mozilla.org/a
+ (unmatched path)

+
+

ftp://mozilla.org/

+ +

Match only "ftp://mozilla.org/".

+
ftp://mozilla.org +

http://mozilla.org/
+ (unmatched scheme)

+ +

ftp://sub.mozilla.org/
+ (unmatched host)

+ +

ftp://mozilla.org/path
+ (unmatched path)

+
+

https://*/path

+ +

Match HTTPS URLs on any host, whose path is "path".

+
+

https://mozilla.org/path

+ +

https://a.mozilla.org/path

+ +

https://something.com/path

+
+

http://mozilla.org/path
+ (unmatched scheme)

+ +

https://mozilla.org/path/
+ (unmatched path)

+ +

https://mozilla.org/a
+ (unmatched path)

+ +

https://mozilla.org/
+ (unmatched path)

+ +

https://mozilla.org/path?foo=1
+ (unmatched path due to URL query string)

+
+

https://*/path/

+ +

Match HTTPS URLs on any host, whose path is "path/" and which has no URL query string.

+
+

https://mozilla.org/path/

+ +

https://a.mozilla.org/path/

+ +

https://something.com/path/

+
+

http://mozilla.org/path/
+ (unmatched scheme)

+ +

https://mozilla.org/path
+ (unmatched path)

+ +

https://mozilla.org/a
+ (unmatched path)

+ +

https://mozilla.org/
+ (unmatched path)

+ +

https://mozilla.org/path/?foo=1
+ (unmatched path due to URL query string)

+
+

https://mozilla.org/*

+ +

Match HTTPS URLs only at "mozilla.org", with any URL path and URL query string.

+
+

https://mozilla.org/

+ +

https://mozilla.org/path

+ +

https://mozilla.org/another

+ +

https://mozilla.org/path/to/doc

+ +

https://mozilla.org/path/to/doc?foo=1

+
+

http://mozilla.org/path
+ (unmatched scheme)

+ +

https://mozilla.com/path
+ (unmatched host)

+
+

https://mozilla.org/a/b/c/

+ +

Match only this URL, or this URL with any URL fragment.

+
+

https://mozilla.org/a/b/c/

+ +

https://mozilla.org/a/b/c/#section1

+
Anything else.
+

https://mozilla.org/*/b/*/

+ +

Match HTTPS URLs hosted on "mozilla.org", whose path contains a component "b" somewhere in the middle. Will match URLs with query strings, if the string ends in a /.

+
+

https://mozilla.org/a/b/c/

+ +

https://mozilla.org/d/b/f/

+ +

https://mozilla.org/a/b/c/d/

+ +

https://mozilla.org/a/b/c/d/#section1

+ +

https://mozilla.org/a/b/c/d/?foo=/

+ +

https://mozilla.org/a?foo=21314&bar=/b/&extra=c/

+
+

https://mozilla.org/b/*/
+ (unmatched path)

+ +

https://mozilla.org/a/b/
+ (unmatched path)

+ +

https://mozilla.org/a/b/c/d/?foo=bar
+ (unmatched path due to URL query string)

+
+

file:///blah/*

+ +

Match any FILE URL whose path begins with "blah".

+
+

file:///blah/

+ +

file:///blah/bleh

+
file:///bleh/
+ (unmatched path)
+ +

Invalid match patterns

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Invalid patternReason
resource://path/Unsupported scheme.
https://mozilla.orgNo path.
https://mozilla.*.org/"*" in host must be at the start.
https://*zilla.org/"*" in host must be the only character or be followed by ".".
http*://mozilla.org/"*" in scheme must be the only character.
https://mozilla.org:80/Host must not include a port number.
*://*Empty path: this should be "*://*/*".
file://*Empty path: this should be "file:///*".
+ +

Browser compatibility

+ +

scheme

+ + + +

{{Compat("webextensions.match_patterns.scheme",10)}}

diff --git a/files/de/mozilla/add-ons/webextensions/what_are_webextensions/index.html b/files/de/mozilla/add-ons/webextensions/what_are_webextensions/index.html new file mode 100644 index 0000000000..85498e8b30 --- /dev/null +++ b/files/de/mozilla/add-ons/webextensions/what_are_webextensions/index.html @@ -0,0 +1,24 @@ +--- +title: Was sind WebExtensions? +slug: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions +tags: + - WebExtensions +translation_of: Mozilla/Add-ons/WebExtensions/What_are_WebExtensions +--- +
{{AddonSidebar}}
+ +

WebExtensions erweitern und modifizieren die Funktionen eines Web-Browsers. Sie werden unter Verwendung von Standard-Webtechnologien - JavaScript, HTML und CSS - sowie zusätzlichen speziell dafür vorgesehenen JavaScript APIs erstellt. Unter anderem können mit so einer Erweiterung neue Funktionen zum Browser hinzufügt, das Erscheinungsbild oder der Inhalt bestimmter Webseiten verändert werden.

+ +

Erweiterungen für Firefox werden mit Hilfe von WebExtensions APIs erstellt, einem Cross-Browser-System zum Entwickeln von Browsererweiterungen. Zum größten Teil ist die API kompatibel mit der extension API für Google Chrome und Opera. Erweiterungen, die für diese Browser erstellt wurden, laufen in den meisten Fällen mit wenigen Änderungen in Firefox oder Microsoft Edge. Die API ist ebenfalls vollständig mit Multiprozess-Firefox kompatibel.

+ +

Vor WebExtensions gab es drei unterschiedliche Möglichkeiten, Erweiterungen für Firefox zu erstellen: XUL/XPCOM overlays, bootstrapped extensions und das Add-on SDK. Seit Ende November 2017 sind WebExtensions APIs die einzige Möglichkeit, Firefox-Erweiterungen zu entwickeln, die vorherigen Systeme gelten als veraltet.

+ +

Wir sind stets bemüht, die API ständig zu erweitern, um den Anforderungen der Add-on-Entwickler gerecht zu werden. Sollten Sie Anregungen dazu haben, würden wir uns über Ihre Mitteilung auf der englischsprachigen Mailingliste für Add-on-Entwickler oder auf #webextensions im IRC freuen.

+ +

Nächste Schritte?

+ + diff --git "a/files/de/mozilla/add-ons/\303\274berliegende_erweiterungen/index.html" "b/files/de/mozilla/add-ons/\303\274berliegende_erweiterungen/index.html" new file mode 100644 index 0000000000..0214de4021 --- /dev/null +++ "b/files/de/mozilla/add-ons/\303\274berliegende_erweiterungen/index.html" @@ -0,0 +1,54 @@ +--- +title: Legacy-Erweiterungen +slug: Mozilla/Add-ons/überliegende_Erweiterungen +tags: + - Add-ons + - Erweiterungen +translation_of: Archive/Add-ons/Overlay_Extensions +--- +

Diese Seite enthält Links zu der Dokumentation für die approach für Entwickeln von Erweiterungen für Gecko-basierte Applikationen welche benutzen:

+ + + +

Priorität zu Firefox 4, und der Gecko-2- Engine welche es ermöglicht, dies war die einzige Möglichkeit Erweiterungen zu entwickeln. Diese Methode wurde sehr übertroffen von Neustartlosen Erweiterungen, und der Add-on SDK, welche an ihrer Spitze gebaut ist. Die privilegierten JavaScript APIs, welche hier beschrieben wurden, können in diesen neueren Typen von Add-ons immer noch benutzt werden.

+ +

XUL-Schule

+ +

XUL-Schule ist ein verständliches Addonentwicklungstutorial, fokussierend auf die Entwicklung von Firefoxerweiterungen, aber ist meistens übertragbar auf andere Gecko-basierte Applikationen.

+ +

Mehr Ressourcen

+ +
+
+
+
Setting up your environment
+
Setting up the application for extension development.
+
XUL
+
Tutorials and reference for the user interface language used by XUL extensions.
+
Code snippets
+
Sample code for many of the things you'll want to do.
+
Installing extensions
+
How to install an extension by copying the extension files into the application's install directory.
+
Firefox add-ons developer guide
+
A guide to developing overlay extensions.
+
+
+ +
+
+
JavaScript code modules
+
JavaScript modules available to extension developers.
+
Extension preferences
+
How to specify the preferences for your extension that will appear in the Add-ons Manager.
+
Extension packaging
+
How extensions are packaged and installed.
+
Binary Firefox extensions
+
Creating binary extensions for Firefox.
+
+
+
+ +

 

diff --git a/files/de/mozilla/chrome_registration/index.html b/files/de/mozilla/chrome_registration/index.html new file mode 100644 index 0000000000..44fb60e26f --- /dev/null +++ b/files/de/mozilla/chrome_registration/index.html @@ -0,0 +1,48 @@ +--- +title: Chrome registration +slug: Mozilla/Chrome_Registration +translation_of: Mozilla/Chrome_Registration +--- +

Was ist chrome?

+ +

Chrome ist eine Gruppe von Benutzeroberflächenelementen des Anwendungsfensters, die sich außerhalb des Inhaltsbereichs des Fensters befinden. Symbolleisten, Menüleisten, Fortschrittsleisten und Fenstertitelleisten sind Beispiele für Elemente, die normalerweise zum Chrom gehören.

+ +

Mozilla sucht und liest die root-Datei chrome.manifest nach Erweiterungen und Designs.

+ +
+

Note: With {{Gecko("1.9.2")}} and older, Mozilla reads chrome/*.manifest files from applications. Starting with {{Gecko("2.0")}}, the root chrome.manifest is the only manifest used; you can add manifest commands to that file to load secondary manifests.

+
+ +

Chrome Anbieter

+ +

Ein Anbieter von Chrom für einen bestimmten Fenstertyp (z. B. für das Browserfenster) wird als Chromanbieter bezeichnet. Die Anbieter arbeiten zusammen, um einen vollständigen Chromsatz für ein bestimmtes Fenster bereitzustellen, von den Bildern auf den Symbolleistenschaltflächen bis zu den Dateien, die den Text, den Inhalt und das Erscheinungsbild des Fensters selbst beschreiben.
+
+ Es gibt drei grundlegende Arten von Chromanbietern:
+
+ Inhalt
+     
Die Hauptquelldatei für eine Fensterbeschreibung stammt vom Inhaltsanbieter und kann von jedem Dateityp sein, der in Mozilla angezeigt werden kann. Normalerweise handelt es sich um eine XUL-Datei, da XUL zur Beschreibung des Inhalts von Fenstern und Dialogen gedacht ist. Die JavaScript-Dateien, die die Benutzeroberfläche definieren, sind auch in den Inhaltspaketen sowie in den meisten {{Glossary ("XBL")}} - Bindungsdateien enthalten.

+ +

Gebietsschema
+     
Lokalisierbare Anwendungen speichern alle lokalisierten Informationen in Gebietsschemaanbietern. Dadurch können Übersetzer ein anderes Chrome-Paket zum Übersetzen einer Anwendung einstecken, ohne den Rest des Quellcodes zu ändern. Die zwei Haupttypen von lokalisierbaren Dateien sind {{Glossary ("DTD")}} - Dateien und Java-Eigenschaftendateien.

+ +

Skin
+     
Ein Skin-Anbieter ist dafür verantwortlich, einen vollständigen Satz von Dateien bereitzustellen, der das optische Erscheinungsbild des Chroms beschreibt. Normalerweise stellt ein Skin-Provider Dateien und Bilder {{Glossary ("CSS")}} bereit.

+ +

 

+ +
+

Hinweis: Aus Skin-Paketen geladene Skripts ( einschließlich der in XBL gefundenen) werden nicht ausgeführt.

+
+ +

 

diff --git a/files/de/mozilla/creating_a_spell_check_dictionary_add-on/index.html b/files/de/mozilla/creating_a_spell_check_dictionary_add-on/index.html new file mode 100644 index 0000000000..6fea30e835 --- /dev/null +++ b/files/de/mozilla/creating_a_spell_check_dictionary_add-on/index.html @@ -0,0 +1,105 @@ +--- +title: >- + Auf dieser Seite wird beschrieben, wie Sie ein Wörterbuch für die + Rechtschreibprüfung von Hunspell als Firefox-Add-On +slug: Mozilla/Creating_a_spell_check_dictionary_add-on +tags: + - Deutsch + - German Translation + - Lesen Sie die Tagging-Anleitung. + - Übersetzung +translation_of: Mozilla/Creating_a_spell_check_dictionary_add-on +--- +
+

This paDieserge describes how to package a Hunspell spell check dictionary as a Firefox add-on, or how to update your existing add-on, so that it can be installed, uninstalled and updated without a restart.

+
+ +

Parts neededdictionary add-on, you first need two things:

+ + + +

If you are creating a new dictionary, as opposed to updating an existing one, please make sure that there is not already a dictionary available for your locale. If there already is one, try contacting the author to get it updated, or contact AMO editors if the author does not respond.

+ +

Packaging

+ +

A Firefox add-on is a ZIP file renamed to use an .xpi file extension instead of the normal .zip file extension. To create a dictionary add-on, simply create a ZIP file which contains the following files and folders:

+ +

my-dictionary.xpi

+ + + +

The .dic and .aff files must be placed in a subfolder named dictionaries within the ZIP file. Both files must have the locale code as their file name. You also have to add a file named install.rdf to the root of the ZIP file. This file contains information about your add-on such as name and version number (see below). In addition to these required files, you may add optional files, for example to give your add-on an icon or to describe the license of the dictionary.

+ +

Here is an example of the install.rdf file. You can create and edit it with a plain text editor such as Notepad.

+ +

<?xml version="1.0"?>
+ <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+   <Description about="urn:mozilla:install-manifest">
+     <em:id>locale-code@dictionaries.addons.mozilla.org</em:id>
+     <em:version>version number</em:version>
+     <em:type>64</em:type>
+     <em:unpack>true</em:unpack>
+     <em:name>Name</em:name>
+     <!--
+       Other install.rdf metadata such as em:localized, em:description, em:creator,
+       em:developer, em:translator, em:contributor or em:homepageURL
+     -->

+
+     <!-- Firefox -->
+     <em:targetApplication>
+       <Description>
+         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+         <em:minVersion>18.0a1</em:minVersion>
+         <em:maxVersion>46.0</em:maxVersion>
+       </Description>
+     </em:targetApplication>
+
+     <!-- Thunderbird -->
+     <em:targetApplication>
+       <Description>
+         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+         <em:minVersion>18.0a1</em:minVersion>
+         <em:maxVersion>22.0</em:maxVersion>
+       </Description>
+     </em:targetApplication>
+
+     <!-- SeaMonkey -->
+     <em:targetApplication>
+       <Description>
+         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+         <em:minVersion>2.15a1</em:minVersion>
+         <em:maxVersion>2.49</em:maxVersion>
+       </Description>
+     </em:targetApplication>
+   </Description>
+ </RDF>

+ +

There are some rules about how you should adapt the install.rdf file:

+ + + +

Once you have added these files to your ZIP file and renamed the file to have the .xpi extension, you can install your add-on in Firefox and test it. After a successful test, you can upload your add-on to addons.mozilla.org and ask for it to be included in the Dictionaries & Language Packs page.

+ +

Reference

+ + diff --git a/files/de/mozilla/css/index.html b/files/de/mozilla/css/index.html new file mode 100644 index 0000000000..52ff0c90d6 --- /dev/null +++ b/files/de/mozilla/css/index.html @@ -0,0 +1,11 @@ +--- +title: Mozilla internal-only CSS +slug: Mozilla/CSS +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Gecko/Chrome/CSS +--- +

This set of pages details CSS features that are only available internally in the Firefox browser — i.e. only inside the US stylesheet.

+ +

{{SubpagesWithSummaries}}

diff --git a/files/de/mozilla/developer_guide/firefox_erfolgreich_erstellt/index.html b/files/de/mozilla/developer_guide/firefox_erfolgreich_erstellt/index.html new file mode 100644 index 0000000000..1734710732 --- /dev/null +++ b/files/de/mozilla/developer_guide/firefox_erfolgreich_erstellt/index.html @@ -0,0 +1,14 @@ +--- +title: 'So, Du hast Firefox erfolgreich erstellt' +slug: Mozilla/Developer_guide/firefox_erfolgreich_erstellt +translation_of: Mozilla/Developer_guide/So_you_just_built_Firefox +--- +

Ein Link zu dieser Seite wird nach dem erfolgreichen Erstellen von Firefox angezeigt. Diese Seite sollte nützliche nächste Schritte enthalten, wie Links wie man Test laufen lassen kann, Build packen kann, etc. Der Inhalt hier sollte kurz gehalten werden, genauere Informationen sollten in den verlinkten Seiten hinzugefügt werden. Die Zielgruppe sind Besucher, die gerade Firefox zum ersten mal gebaut haben.

+ +

Ein paar interessante Links:

+ +

Tests laufen lassen

+ +

Debuggen

+ +

Fehler melden

diff --git a/files/de/mozilla/developer_guide/index.html b/files/de/mozilla/developer_guide/index.html new file mode 100644 index 0000000000..82603e44bc --- /dev/null +++ b/files/de/mozilla/developer_guide/index.html @@ -0,0 +1,108 @@ +--- +title: Entwicklerhandbuch +slug: Mozilla/Developer_guide +tags: + - Entwicklerhandbuch +translation_of: Mozilla/Developer_guide +--- +

Egal, ob Sie ein alter Hase sind oder gerade erst anfangen, von dieser Seite aus finden Sie Artikel, die Ihnen während der Entwicklung von Mozilla Hilfestellung bieten können.

+

Zum ersten Mal hier?

+
+
+ Getting Started (auf Englisch)
+
+ Eine Schritt-für-Schritt-Anleitung für Anfänger darüber, wie man sich an Mozilla beteiligen kann.
+
+
+
+

Dokumentation

+
+
+ Mit dem Mozilla-Quellcode arbeiten
+
+ Ein Überblick über den Code, wie man den Code bekommt und der Code-Stilführer.
+
+ Build-Anweisungen
+
+ Wie man Firefox, Thunderbird, SeaMonkey, oder andere Mozilla-Applikationen kompiliert.
+
+ Überblick über den Entwicklungsprozess
+
+ Ein Überblick über den kompletten Entwicklungsprozess von Mozilla
+
+ Automatisiertes Testen
+
+ Wie man Mozillas automatisierte Tests ausführt und wie neue Tests hinzugefügt werden können.
+
+ Wie Sie Ihren Patch einreichen können
+
+ Wenn Sie Ihren Patch geschrieben haben, muss dieser im Tree eingereicht werden. Dieser Artikel erklärt den Review-Prozess und wie Sie es schaffen, dass Ihr Patch angenommen wird.
+
+ Mozilla-Module und "Eigentum" an Modulen
+
+ Dieser Artikel enthält Informationen über Mozillas Module, was die Rolle eines Modul-Eigentümers ist und wie Modul-Eigentümer ausgewählt werden.
+
+ Arbeit an der Firefox-Benutzeroberfläche
+
+ Wie man in die Entwicklung der Firefox Benutzerschnittstelle und Front-End-Software beteiligt werden kann.
+
+ Codeschnipsel
+
+ Nützliche Code-Beispiele für weit gestreute Anwendungsgebiete.
+
+ Mozilla Entwicklungsstrategien
+
+ Tipps wie man das meiste aus seiner Arbeit am Mozilla Projekt herausholen kann.
+
+ Debugging
+
+ Hilfsreiche Tipps und Anleitungen für das Debugging von Mozilla Code.
+
+ Die Mozilla Plattform
+
+ Informationen über die Arbeit mit der Mozilla Plattform.
+
+ Interface Kompatibilität
+
+ Hinweise zu Änderungen an skriptbaren und binären APIs in Mozilla
+
+
+
+

Tools

+
+
+ Bugzilla
+
+ Die Bugzilla-Datenbank wird verwendet, um Fehler in Mozilla-Produkten aufzuzeichnen.
+
+ MXR
+
+ Durchsuchen des Mozilla-Quellcodes im Web.
+
+ Bonsai
+
+ Mit dem Bonsai Tool lässt sich heraus finden, wer wann welche Datei verändert hat.
+
+ Mercurial
+
+ Das Versions-Kontrollsystem, das Mozillas Quellcode verwaltet.
+
+ Tinderbox
+
+ Tinderbox zeigt den Status des Trees (ob aktuell erfolgreich kompliliert werden kann oder nicht). Überprüfen Sie den Status bevor Sie Code einreichen, um sicher zu gehen, dass Sie nicht an einem arbeiten Tree arbeiten.
+
+ Crash tracking
+
+ Informationen über die Socorro und Talkback Crash Report Systeme.
+
+ Performance Aufzeichnung
+
+ Siehe Performance Informationen für Mozilla Projekte.
+
+ Entwicklerforen
+
+ Eine Themen-spezifische Liste von Forendiskussionen, in denen Sie sich über die Entwicklung von Mozilla austauschen können.
+
+
+
+

{{ languages( { "en": "en/Developer_Guide", "zh-cn": "Cn/Developer_Guide", "ja": "ja/Developer_Guide" } ) }}

diff --git a/files/de/mozilla/developer_guide/quelltexte/index.html b/files/de/mozilla/developer_guide/quelltexte/index.html new file mode 100644 index 0000000000..b5cc6c79bb --- /dev/null +++ b/files/de/mozilla/developer_guide/quelltexte/index.html @@ -0,0 +1,46 @@ +--- +title: Mit Mozilla Quellcode arbeiten +slug: Mozilla/Developer_guide/Quelltexte +translation_of: Mozilla/Developer_guide/Source_Code +--- +

Die unten aufgeführten Artikel helfen Ihnen dabei mit dem Mozilla Quelltext umgehen zu können, zu lernen wie man durch den Code navigiert und wie Änderungen in Projekte einfließen können.

+ + + + + + + + + + + +
+

Dokumentation

+
+
+
Code aus der Mercurial Repository erhalten
+
Falls Sie vorhaben sich am Mozilla Projekt zu beteiligen, bietet es sich an den Quelltext über die Mercurial Repository zu erhalten. Lesen Sie hier wie Sie das am Besten machen.
+
Mozilla Quelltexte herunterladen
+
Wenn Sie den Quelltext für eine bestimmte Version eines Mozilla Produkts suchen, können Sie ein Archiv herunterladen.
+
Mozilla Quelltexte online durchsuchen
+
Lernen Sie wie man MXR, Mozillas online Code-Suchwerkzeug, bedient.  Das ist kein guter Weg um Code herunterzuladen, aber um ihn zu durchsuchen.
+
Mozilla Verzeichnisstrukturen für Quelltexte
+
Lernen Sie mehr über die unterschiedlichen Verzeichnisse in Mozillas Verzeichnisstrukturen und finden Sie schnell das, was Sie suchen.
+
Anfänger Bugs
+
Wenn Sie neu dabei sind und an etwas arbeiten möchten, schauen Sie sich mal diese Bugs an.
+
+
+
+
Mozilla Coding Style
+
Dieser Code Style Guide liefert Information über das korrekte Format der Quelltexte, damit Reviewers Sie nicht direkt verspotten, wenn Sie Ihren Code einreichen.
+
Try Servers
+
Mozilla Produkte werden auf mindestens drei Plattformen kompiliert. Wenn Sie nicht Zugang zu allen haben, können Sie diese Testserver nutzen, um zu überprüfen, ob Ihr Patch auf allen Plattformen funktioniert.
+
Einen Patch erstellen
+
Sobald Sie den Mozilla Code verändert haben und sicher sind, dass alles funktioniert, erstellen Sie einen Patch und reichen diesen zur Überprüfung ein.
+
Commit Zugang zum Quelltext erhalten
+
Sind Sie bereit den wenigen Committers beizutreten? Finden Sie heraus, wie Sie Check-in Zugang zum Mozilla Code erhalten.
+
Ältere Mozilla Codes über CVS erhalten
+
Ältere Versionen des Mozilla Quelltexts und auch Versionen von NSS und NSPR werden in einer CVS Repository aufbewahrt. Lernen Sie hier mehr darüber.
+
+
diff --git a/files/de/mozilla/firefox/developer_edition/index.html b/files/de/mozilla/firefox/developer_edition/index.html new file mode 100644 index 0000000000..41bacac01d --- /dev/null +++ b/files/de/mozilla/firefox/developer_edition/index.html @@ -0,0 +1,57 @@ +--- +title: Developer Edition +slug: Mozilla/Firefox/Developer_Edition +translation_of: Mozilla/Firefox/Developer_Edition +--- +
{{FirefoxSidebar}}

+ +

Eine Version von Firefox, maßgeschneidert für Webentwickler.

+ +

Firefox Developer Edition herunterladen

+ +
+
+
+

Die neuesten Firefox-Features

+ +

Firefox Developer Edition ersetzt den Aurora-Kanal im Firefox Release-Prozess. Wie bei Aurora werden Features alle sechs Wochen in die Developer Edition einfließen, nachdem sie in den Nightly-Builds stabilisiert wurden.

+ +

Indem Sie die Developer Edition nutzen, erhalten Sie Zugriff auf Tools und Plattform-Features mindestens 12 Wochen, bevor sie den Firefox Release-Kanal erreichen.

+ +

Finden Sie heraus, was neu in der Developer Edition ist.

+
+ +
+

Experimentelle Entwickler-Tools

+ +

Wir binden experimentelle Tools ein, die noch nicht für eine allgemeine Veröffentlichung bereit sind.

+ +

Zum Beispiel enthält die Developer Edition den Firefox Tools-Adapter, mit dem Sie die Firefox Tools für Webentwickler mit anderen Browsern verbinden können, wie Chrome auf Android und Safari auf iOS.

+
+
+ +
+
+

Ein unabhängiges Profil

+ +

Firefox Developer Edition benutzt ein eigenes Profil, unabhängig von anderen Firefox-Versionen auf Ihrem Gerät. Das bedeutet, dass Sie die Developer Edition leicht neben Ihrer Release- oder Beta-Version von Firefox verwenden können.

+
+ +
+

Für Webentwickler eingestellt

+ +

Wir haben die Standard-Einstellungswerte für Webentwickler zugeschnitten. Zum Beispiel sind Chrome- und Remote-Debugging standardmäßig aktiviert.

+
+
+ +
+
+

Ein eigenständiges Theme

+ +

Dies beinhaltet schnelleren Zugriff auf die Entwicklertools.

+
+ +
 
+
+ +

 

diff --git "a/files/de/mozilla/firefox/developer_edition/zur\303\274ckkehren/index.html" "b/files/de/mozilla/firefox/developer_edition/zur\303\274ckkehren/index.html" new file mode 100644 index 0000000000..7e5b838c6c --- /dev/null +++ "b/files/de/mozilla/firefox/developer_edition/zur\303\274ckkehren/index.html" @@ -0,0 +1,25 @@ +--- +title: Zurückkehren +slug: Mozilla/Firefox/Developer_Edition/Zurückkehren +translation_of: Mozilla/Firefox/Developer_Edition/Reverting +--- +
{{FirefoxSidebar}}

Vom Developer Edition Theme zurück wechseln

+ +


+ Wenn Sie die Developer Edition nutzen wollen, aber das 'Australis'-Aussehen von Firefox und Firefox Beta bevorzugen, können Sie auf das normale Firefox Design umschalten: Öffnen Sie dazu lediglich das "Anpassen"-Feld und klicken sie die Schaltfläche "Use Firefox Developer Edition Theme" an.

+ +

{{EmbedYouTube("OvJwofTjsNg")}}

+ +

Bitte beachten Sie, dass das Developer Edition Design noch nicht mit minimalistischen Designs kompatibel ist. Wenn Sie also ein minimalistisches Theme verwenden wollen, so werden Sie zum Australis-Design zurück wechseln müssen.

+ +

Zurückkehren zu Firefox Aurora

+ +


+ Wenn Sie alle vor-Beta Funktionen in Firefox Developer Edition nutzen wollen, aber keine der anderen Änderungen, dann können Sie zu einer Art Firefox Aurora zurückkehren. Das ist ein Prozess in zwei Schritten, es ist wichtig, dass Sie die Reihenfolge der Anweisungen befolgen:

+ +
    +
  1. Öffnen Sie die Einstellungen der Developer Edition und entfernen Sie den Haken bei "Allow Firefox Developer Edition and Firefox to run at the same time". Sie werden aufgefordert, den Browser neu zu starten.
  2. +
  3. Nach dem Neustart können Sie vom Developer Edition Design zurückkehren, indem Sie das "Anpassen"-Feld öffnen und die Schaltfläche "Use Firefox Developer Edition Theme" anklicken.
  4. +
+ +

{{EmbedYouTube("0Ofq-vlw8Qw")}}

diff --git a/files/de/mozilla/firefox/headless-mode/index.html b/files/de/mozilla/firefox/headless-mode/index.html new file mode 100644 index 0000000000..a2c3c424ee --- /dev/null +++ b/files/de/mozilla/firefox/headless-mode/index.html @@ -0,0 +1,237 @@ +--- +title: Headless mode +slug: Mozilla/Firefox/Headless-Mode +tags: + - Automaisierung + - Firefox + - Flag + - Flagge + - Headless Modus + - Kopflos + - Mozilla + - QA + - Testautomatisierung + - Testen + - headless + - headless mode + - node.js +translation_of: Mozilla/Firefox/Headless_mode +--- +
{{FirefoxSidebar}}
+ +

Der Headless-Mode ist eine sehr nützliche Weise auf dem der Firefox betrieben werden kann —  dabei funktioniert Firefox normal, nur dass die Oberfläche nicht sichtbar ist. Das erscheint nicht besonder sinnvoll, wenn man im Web surfen möchte, aber es ist sehr nützlich für automatisierte Tests. Dieser Artikel gibt dir alle Infos, die du brauchst um Firefox im Headless-Mode laufen zu lassen.

+ +

Den Headless-Mode verwenden

+ +

Dieser Bereich bietet eine grunsätzliche Anleitung wie man den Headless-Mode verwendet.

+ +

Grundsätzliche Verwendung

+ +

Auf der Komandozeile kannst du Firefox im Headless-Mode starten indem du das -headless Flag anhängst. Zum Beispiel:

+ +
/path/to/firefox -headless
+ +

Screenshots aufnehmen

+ +

Seit Firefox 57 ermöglicht es das -screenshot Flag auf Webseiten im Headless-Mode Screenshots aufzunehmen. Grundsätzlich sieht das dann so aus:

+ +
/path/to/firefox -headless -screenshot https://developer.mozilla.org/
+ +

Das erzeugt einen Screenshot in voller Höhe von https://developer.mozilla.com in das aktuelle Verzeichnis mit dem Dateinamen screenshot.png, mit einer Viewport-Breite von 800px.

+ +

Beachte, dass du -headless  weg lassen kannst, wenn du -screenshot angibst— es ist implizit enthalten.

+ +
/path/to/firefox -screenshot https://developer.mozilla.org/
+ +

Um die Default-Werte, die oben angegeben sind, zu überschreiben,kannst du folgende Flags/Features verwenden:

+ + + +

Zum Beispiel erzeugt der folgende Befehl einen Screenshot von https://developer.mozilla.com im aktuellen Verzeichnis mit Dateinamen test.jpg, mit einer Breite von 800px und einer Höhe von 1000px:

+ +
/path/to/firefox -screenshot test.jpg https://developer.mozilla.org/ --window-size=480,1000
+ +

Browser support

+ +

Headless Firefox works on Fx55+ on Linux, and 56+ on Windows/Mac.

+ +

Automated testing with headless mode

+ +

The most useful way to use headless Firefox is to run automated tests with it, meaning that you can make your testing process much more efficient.

+ +

Selenium in Node.js

+ +

Here we'll create a Selenium test using Node.js and the selenium-webdriver package. For this guide we'll assume that you already have basic familiarity with Selenium, Webdriver, and Node, and that you already have a testing environment set up. If you don't, work through our Setting up Selenium in Node guide first, then come back.

+ +

First, of all, make sure you've got Node installed on your system, and the selenium-webdriver package installed, then create a new file called selenium-test.js and follow the steps below to populate it with test code.

+ +
+

Note: Alternatively, you could clone our headless-examples repo; this also includes a package file so you can just use npm install to install necessary dependencies.

+
+ +
    +
  1. +

    Let's add some code. Inside this file, start by importing the main selenium-webdriver module, and the firefox submodule:

    + +
    var webdriver = require('selenium-webdriver'),
    +    By = webdriver.By,
    +    until = webdriver.until;
    +
    +var firefox = require('selenium-webdriver/firefox');
    +
  2. +
  3. +

    Next, we will create a new binary object representing Firefox Nightly, and add the -headless argument to it so that it will be run in headless mode:

    + +
    var binary = new firefox.Binary(firefox.Channel.NIGHTLY);
    +binary.addArguments("-headless");
    +
  4. +
  5. +

    Now let's create a new driver instance for Firefox, and use setFirefoxOptions() to include an options object that specifies that we want to run the test using the binary we created above (this step will be unnecessary on Linux, and after headless mode lands in the release channel on Windows/Mac, but it is still useful if you want to test a Nightly-specific feature):

    + +
    var driver = new webdriver.Builder()
    +    .forBrowser('firefox')
    +    .setFirefoxOptions(new firefox.Options().setBinary(binary))
    +    .build();
    +
  6. +
  7. +

    Finally, add the following code, which performs a simple test on the Google search homepage:

    + +
    driver.get('https://www.google.com');
    +driver.findElement(By.name('q')).sendKeys('webdriver');
    +
    +driver.sleep(1000).then(function() {
    +  driver.findElement(By.name('q')).sendKeys(webdriver.Key.TAB);
    +});
    +
    +driver.findElement(By.name('btnK')).click();
    +
    +driver.sleep(2000).then(function() {
    +  driver.getTitle().then(function(title) {
    +    if(title === 'webdriver - Google Search') {
    +      console.log('Test passed');
    +    } else {
    +      console.log('Test failed');
    +    }
    +  });
    +});
    +
    +driver.quit();
    +
  8. +
  9. +

    Finally, run your test with following command:

    + +
    node selenium-test
    +
  10. +
+ +

That's it! After a few seconds, you should see the message "Test passed" returned in the console.

+ +

Headless Firefox in Node.js with selenium-webdriver by Myk Melez contains additional useful tips and tricks for running Node.js Selenium tests with headless mode.

+ +

Selenium in Java

+ +
+

Note: Thanks a lot to nicholasdipiazza for writing these instructions!

+
+ +

This guide assumes that you already have Geckodriver on your machine, as explained in our Setting up Selenium in Node guide, and that you have an IDE set up that supports Gradle projects.

+ +
    +
  1. +

    Download our headlessfirefox-gradle.zip archive (see the source here), extract it, and import the headlessfirefox folder into your IDE as a gradle project.

    +
  2. +
  3. +

    Edit the build.gradle file to set selenium to a later version if needed. At the time of writing, we used 3.5.3.

    + +
    group 'com.mozilla'
    +version '1.0'
    +
    +apply plugin: 'java'
    +
    +sourceCompatibility = 1.8
    +
    +repositories {
    +   mavenCentral()
    +}
    +
    +dependencies {
    +   compile('org.seleniumhq.selenium:selenium-api:3.5.3')
    +   compile('org.seleniumhq.selenium:selenium-remote-driver:3.5.3')
    +   compile('org.seleniumhq.selenium:selenium-server:3.5.3')
    +
    +   testCompile group: 'junit', name: 'junit', version: '4.12'
    +}
    +
  4. +
  5. +

    Edit the webdriver.gecko.driver property in the HeadlessFirefoxSeleniumExample.java file to equal the path where you installed geckodriver (see line 15 below).

    + +
    package com.mozilla.example;
    +
    +import org.openqa.selenium.By;
    +import org.openqa.selenium.WebElement;
    +import org.openqa.selenium.firefox.FirefoxBinary;
    +import org.openqa.selenium.firefox.FirefoxDriver;
    +import org.openqa.selenium.firefox.FirefoxOptions;
    +
    +import java.util.concurrent.TimeUnit;
    +
    +public class HeadlessFirefoxSeleniumExample {
    + public static void main(String [] args) {
    +   FirefoxBinary firefoxBinary = new FirefoxBinary();
    +   firefoxBinary.addCommandLineOptions("--headless");
    +   System.setProperty("webdriver.gecko.driver", "/opt/geckodriver");
    +   FirefoxOptions firefoxOptions = new FirefoxOptions();
    +   firefoxOptions.setBinary(firefoxBinary);
    +   FirefoxDriver driver = new FirefoxDriver(firefoxOptions);
    +   try {
    +     driver.get("http://www.google.com");
    +     driver.manage().timeouts().implicitlyWait(4,
    +         TimeUnit.SECONDS);
    +     WebElement queryBox = driver.findElement(By.name("q"));
    +     queryBox.sendKeys("headless firefox");
    +     WebElement searchBtn = driver.findElement(By.name("btnK"));
    +     searchBtn.click();
    +     WebElement iresDiv = driver.findElement(By.id("ires"));
    +     iresDiv.findElements(By.tagName("a")).get(0).click();
    +     System.out.println(driver.getPageSource());
    +   } finally {
    +     driver.quit();
    +   }
    + }
    +}
    +
  6. +
  7. +

    Run the java class and you should see the HTML content of this page printed in your console/terminal.

    +
  8. +
+ +

Other testing solutions

+ + + +

In addition, you will be able to use headless Firefox to run automated tests written in most other popular testing apps, as long as they allow you to set environment variables.

+ +

Troubleshooting and further help

+ +

If you are having trouble getting headless mode to work, then do not worry — we are here to help. This section is designed to be added to as more questions arise and answers are found.

+ + + +

If you want to ask the engineers a question, the best place to go is the #headless channel on Mozilla IRC. If you are pretty sure you've found a bug, file it on Mozilla Bugzilla.

+ +

See also

+ + diff --git a/files/de/mozilla/firefox/index.html b/files/de/mozilla/firefox/index.html new file mode 100644 index 0000000000..57b51632bf --- /dev/null +++ b/files/de/mozilla/firefox/index.html @@ -0,0 +1,60 @@ +--- +title: Firefox +slug: Mozilla/Firefox +tags: + - Firefox + - Mozilla +translation_of: Mozilla/Firefox +--- +
{{FirefoxSidebar}}
+ +

Firefox ist Mozillas beliebter Webbrowser, der für viele Betriebssysteme verfügbar ist, insbesondere Windows, OS X, Linux auf dem Desktop und mobilen Endgeräten mit Android. Durch seine umfassende Kompatibilität, den aktuellsten Web-Technologien und mächtigen Entwicklerwerkzeugen ist Firefox eine großartige Wahl für Webentwickler wie Anwender.

+ +

Firefox ist ein Open-Source-Projekt. Der größte Teil des Quellcodes wird von unserer riesigen Gemeinschaft aus Freiwilligen hinzugefügt. Hier lernen Sie wie Sie zum Firefox-Projekt beitragen können und dazu finden Sie Links zu Informationen über die Entwicklung von Firefix-Add-ons, wie man die Entwickler-Werkzeuge benutzt und andere Aufgaben.

+ +
+

Lernen Sie, wie man Add-ons für Firefox erstellt, wie man Firefox selbst entwickelt und wie die Kernelemente von Firefox und seine Unterprojekte funktionieren.

+
+ + + +

Firefox Entwicklungskanäle

+ +

Firefox ist verfügbar in vier Kanälen.

+ +

Firefox Nightly

+ +

Jede Nacht arbeiten wir von der Mozilla Zentrale an Firefox mit dem neuesten Code. Diese Builds sind für alle Firefox Entwickler und für diejenigen die die neuesten innovativen Features ausprobieren wollen, während sie noch entwickelt werden.

+ +

Firefox Nightly herunterladen

+ +

Firefox Developer Edition

+ +

Diese Version von Firefox ist speziell für Entwickler gedacht. Alle sechs Wochen werden die stabilsten Features von Firefox Nightly in der Firefox Developer Edition veröffentlicht. Wir veröffentlichen auch ein paar Features die nur für Entwickler in diesem Kanal verfügbar sein werden.

+ +

Mehr zur Developer Edition von Firefox erfahren.

+ +

Firefox für Entwickler herunterladen

+ +

Firefox Beta

+ +

Nach sechs Wochen in der Firefox Developer Edition, werden die stabilsten Features in die neue Firefox Beta-Version übertragen. Firefox Beta ist für Firefoxenthusiasten, die gerne die neusten Features von der nächsten Firefox-Version vorab testen möchten.

+ +

Firefox Beta herunterladen

+ +

Firefox

+ +

Nachdem die Features der Firefox Beta-Version nocheinmal sechs Wochen lange stabilisiert wurden, wird eine neue Firefox-Version für die Hunderte von Millionen Nutzer in Form einer neuen Version veröffentlicht.

+ +

Firefox herunterladen

diff --git a/files/de/mozilla/firefox/multiprocess_firefox/index.html b/files/de/mozilla/firefox/multiprocess_firefox/index.html new file mode 100644 index 0000000000..b21a7228c1 --- /dev/null +++ b/files/de/mozilla/firefox/multiprocess_firefox/index.html @@ -0,0 +1,80 @@ +--- +title: Multiprozess-Firefox +slug: Mozilla/Firefox/Multiprocess_Firefox +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Firefox/Multiprocess_Firefox +--- +
{{FirefoxSidebar}}

In den aktuellen Desktop-Versionen des Firefox läuft der gesamte Browser in einem einzigen Betriebssystem-Prozess. Insbesondere läuft der JavaScript-Code, welcher die Browser-Benutzeroberfläche (auch "chrome code" bekannt) ausführt, im selben Prozess wie der Code von Webseiten (auch  "Content" oder "Web Content" genannt).

+ +

Zukünftige Versionen von Firefox werden die Browser-Benutzeroberfläche in einem vom Web Content separaten Prozess ausführen. In der ersten Iteration dieser Architektur werden alle Browser-Tabs im selben Prozess laufen, getrennt vom Prozess, in dem die Browser-Benutzeroberfläche ausgeführt wird. In zukünftigen Iterationen wollen wir mehr als einen Prozess verwenden, um die Inhalte von Webseiten darzustellen. Das Projekt, welches den Multiprozess-Firefox abliefern soll, nennt sich Electrolysis (manchmal abgekürzt als e10s).

+ +

Normale Webseiten bleiben vom Multiprozess-Firefox unberührt. Die Menschen, die an Firefox selbst arbeiten sowie die Add-On-Entwickler werden von der Änderung nur beeinflusst sein, wenn ihr Code auf der Fähigkeit basiert, direkt auf Web Content zuzugreifen.

+ +

Anstatt direkt auf Content zuzugreifen, muss das chrome JavaScript den message manager nutzen, um auf Content zuzugreifen. Um den Übergang zu erleichtern, haben wir Cross Process Object Wrappers implementiert und einige Kompabilitäts-Shims für Add-On-Entwickler zur Verfügung gestellt. Falls du ein Add-On-Entwickler bist und dich fragst, ob du davon betroffen bist, siehe auch den Guide zur Arbeit mit dem Multiprozess-Firefox.

+ +

Multiprozess-Firefox ist momentan in der Developer Edition standardmäßig aktiviert.

+ +
+
+
+
+
Technische Übersicht
+
Ein sehr abstrakter Überbllick über die Implementierung des Multiprozess-Firefox.
+
Web Content Kompatibilitätsanleitung
+
Leitlinien und details zu potentiellen Web-Seiten-Kompatibilitätsproblemen, die durch den Übergang entstehen könnten. Tip: Es gibt nicht sehr viele!
+
Glossar
+
Ein Nachschlagewerk für den Jargon, der in Multiprozess-Firefox benutzt wird.
+
Message manager
+
Vollständiger Guide zu den Objekten, die für die Kommunikation zwischen Chrome (Benutzeroberfläche) und Content (Webseiten Code) benutzt werden.
+
SDK basierte Add-ons
+
Wie Add-ons, die mit dem Add-on SDK entwickelt wurden, migriert werden können.
+
Welche URIs laden wo
+
Eine schnelle Einführung darüber, welche URIs (chrome:, about:, file:, resource:), in welchem prozess laden.
+
+
+ +
+
+
Motivation
+
Die Gründe, wieso wir den Multiprozess-Firefox implementieren: Performanz, Sicherheit und Stabilität.
+
Add-on migrations Anleitung
+
Wenn du ein Add-on-Entwickler bist, finde heraus, ob du betroffen bist und wie du deinen Code aktuallisieren kannst.
+
Cross Process Object Wrappers
+
Cross Process Object Wrappers sind eine Migrationshilfe, die Chrome Code synchronen zugriff auf Content erlaubt.
+
Debugging von Content-Prozessen
+
Wie Code, der im Content-Prozess läuft (einschließlich Frame- und Prozessskripte), debugt werden kann.
+
Tab auswahl in Multiprozess-Firefox
+
Wie Tab-Wechsel funktioniert in Multiprozess-Firefox.
+
+
+
+ +
+
+
+
+
Einschränkungen von Chrome-Skripten
+
Praktiken, die in Chrome-Code nicht mehr funktionieren und wie man dies behebt.
+
+
+ +
+
+
Einschränkungen von Frame-Skripten
+
Praktiken, die innerhalb von Frame-Skripten nicht funktionieren werden und was stattdessen zutun ist.
+
+
+
+ +
+

Kontaktiere uns

+ +

Finde mehr über das Projekt heraus, mach mit oder frag uns etwas.

+ + diff --git a/files/de/mozilla/firefox/multiprocess_firefox/technical_overview/index.html b/files/de/mozilla/firefox/multiprocess_firefox/technical_overview/index.html new file mode 100644 index 0000000000..f0de7c5457 --- /dev/null +++ b/files/de/mozilla/firefox/multiprocess_firefox/technical_overview/index.html @@ -0,0 +1,164 @@ +--- +title: Technical overview +slug: Mozilla/Firefox/Multiprocess_Firefox/Technical_overview +translation_of: Mozilla/Firefox/Multiprocess_Firefox/Technical_overview +--- +
{{FirefoxSidebar}}
+

Diese Seite ist ein bearbeiteter Auszug aus Bill McCloskey's Blogbeitrag Multiprozess Firefox:(engl) http://billmccloskey.wordpress.com/2013/12/05/multiprocess-firefox/

+
+ +

Auf einer sehr hohen Ebene arbeitet Multiprozess Firefox wie folgt. Der Prozess, der beginnt, wenn Firefox startet wird übergeordneter Prozess genannt. Zunächst arbeitet dieses Verfahren ähnlich wie Einzelprozess. Es wird ein Firefox Fenster geöffnet, das alle wichtigen Elemente der Benutzeroberfläche für Firefox enthält ( browser.xul). Firefox hat eine flexibles GUI-Toolkit namens XUL, das GUI-Elemente deklarativ beschreibt, ähnlich wie bei Web-Content. Genau wie Web-Inhalte, hat das Firefox-UI ein Fenster-Objekt, das eine Dokumenteigenschaft hat, und dieses Dokument enthält alle XML-Elemente aus der browser.xul. Alle Firefox Menüs, Symbolleisten, Seitenleisten und Tabs sind XML-Elemente in diesem Dokument. Jedes Register enthält ein <browser> -Element um Web-Inhalte anzuzeigen.
+
+ Die erste Stelle, an der Multiprozess Firefox von Single-Prozess Firefox abweicht ist, dass jedes <browser> Element ein remote = "true" -Attribut besitzt. Wenn ein solches Browser Element in das Dokument eingefügt wird, wird ein neuer Inhaltsprozess gestartet. Dieser Prozess wird als ein untergeordneter Prozess bezeichnet. Ein IPC-Kanal erstellt, der die Eltern-Kind-Prozesse verknüpft. Anfangs zeigt das Kind about: blank, aber die Eltern können dem Kind einen Befehl senden, um an anderer Stelle zu navigieren.

+ +

Zeichnen

+ +

Somehow, displayed web content needs to get from the child process to the parent and then to the screen. Multiprocess Firefox depends on a new Firefox feature called off main thread compositing (OMTC). In brief, each Firefox window is broken into a series of layers, somewhat similar to layers in Photoshop. Each time Firefox draws, these layers are submitted to a compositor thread that clips and translates the layers and combines them together into a single image that is then drawn.

+ +

Layers are structured as a tree. The root layer of the tree is responsible for the entire Firefox window. This layer contains other layers, some of which are responsible for drawing the menus and tabs. One subtree displays all the web content. Web content itself may be broken into multiple layers, but they’re all rooted at a single “content” layer.

+ +

In multiprocess Firefox, the content layer subtree is actually a shim. Most of the time, it contains a placeholder node that simply keeps a reference to the IPC link with the child process. The content process retains the actual layer tree for web content. It builds and draws to this layer tree. When it’s done, it sends the structure of its layer tree to the parent process via IPC. Backing buffers are shared with the parent either through shared memory or GPU memory. References to this memory are sent as part of the layer tree. When the parent receives the layer tree, it removes its placeholder content node and replaces it with the actual tree from content. Then it composites and draws as normal. When it’s done, it puts the placeholder back.

+ +

The basic architecture of how OMTC works with multiple processes has existed for some time, since it is needed for Firefox OS. However, Matt Woodrow and David Anderson have done a lot of work to get everything working properly on Windows, Mac, and Linux. One of the big challenges for multiprocess Firefox will be getting OMTC enabled on all platforms. Right now, only Macs use it by default.

+ +

User input

+ +

Events in Firefox work the same way as they do on the web. Namely, there is a DOM tree for the entire window, and events are threaded through this tree in capture and bubbling phases. Imagine that the user clicks on a button on a web page. In single-process Firefox, the root DOM node of the Firefox window gets the first chance to process the event. Then, nodes lower down in the DOM tree get a chance. The event handling proceeds down through to the XUL <browser> element. At this point, nodes in the web page’s DOM tree are given a chance to handle the event, all the way down to the button. The bubble phase follows, running in the opposite order, all the way back up to the root node of the Firefox window.

+ +

With multiple processes, event handling works the same way until the <browser> element is hit. At that point, if the event hasn’t been handled yet, it gets sent to the child process by IPC, where handling starts at the root of the content DOM tree. The parent process then waits to run its bubbling phase until the content process has finished handling the event.

+ +

Inter-process communication

+ +

All IPC happens using the Chromium IPC libraries. Each child process has its own separate IPC link with the parent. Children cannot communicate directly with each other. To prevent deadlocks and to ensure responsiveness, the parent process is not allowed to sit around waiting for messages from the child. However, the child is allowed to block on messages from the parent.

+ +

Rather than directly sending packets of data over IPC as one might expect, we use code generation to make the process much nicer. The IPC protocol is defined in IPDL, which sort of stands for “inter-* protocol definition language”. A typical IPDL file is PNecko.ipdl. It defines a set messages and their parameters. Parameters are serialized and included in the message. To send a message M, C++ code just needs to call the method SendM. To receive the message, it implements the method RecvM.

+ +

IPDL is used in all the low-level C++ parts of Gecko where IPC is required. In many cases, IPC is just used to forward actions from the child to the parent. This is a common pattern in Gecko:

+ +
void AddHistoryEntry(param) {
+  if (XRE_GetProcessType() == GeckoProcessType_Content) {
+    // If we're in the child, ask the parent to do this for us.
+    SendAddHistoryEntry(param);
+    return;
+  }
+
+  // Actually add the history entry...
+}
+
+bool RecvAddHistoryEntry(param) {
+  // Got a message from the child. Do the work for it.
+  AddHistoryEntry(param);
+  return true;
+}
+
+ +

When AddHistoryEntry is called in the child, we detect that we’re inside the child process and send an IPC message to the parent. When the parent receives that message, it calls AddHistoryEntry on its side.

+ +

For a more realistic illustration, consider the Places database, which stores visited URLs for populating the awesome bar. Whenever the user visits a URL in the content process, we call this code. Notice the content process check followed by the SendVisitURI call and an immediate return. The message is received here; this code just calls VisitURI in the parent.

+ +

The code for IndexedDB, the places database, and HTTP connections all runs in the parent process, and they all use roughly the same proxying mechanism in the child.

+ +

Frame scripts

+ +

IPDL takes care of passing messages in C++, but much of Firefox is actually written in JavaScript. Instead of using IPDL directly, JavaScript code relies on the message manager to communicate between processes. To use the message manager in JS, you need to get hold of a message manager object. There is a global message manager, message managers for each Firefox window, and message managers for each <browser> element. A message manager can be used to load JS code into the child process and to exchange messages with it.

+ +

As a simple example, imagine that we want to be informed every time a load event triggers in web content. We’re not interested in any particular browser or window, so we use the global message manager. The basic process is as follows:

+ +
// Get the global message manager.
+let mm = Cc["@mozilla.org/globalmessagemanager;1"].
+         getService(Ci.nsIMessageListenerManager);
+
+// Wait for load event.
+mm.addMessageListener("GotLoadEvent", function (msg) {
+  dump("Received load event: " + msg.data.url + "\n");
+});
+
+// Load code into the child process to listen for the event.
+mm.loadFrameScript("chrome://content/content-script.js", true);
+
+ +

For this to work, we also need to have a file content-script.js:

+ +
// Listen for the load event.
+addEventListener("load", function (e) {
+  // Inform the parent process.
+  let docURL = content.document.documentURI;
+  sendAsyncMessage("GotLoadEvent", {url: docURL});
+}, false);
+
+ +

This file is called a frame script. When the loadFrameScript function call runs, the code for the script is run once for each <browser> element. This includes both remote browsers and regular ones. If we had used a per-window message manager, the code would only be run for the browser elements in that window. Any time a new browser element is added, the script is run automatically (this is the purpose of the true parameter to loadFrameScript). Since the script is run once per browser, it can access the browser’s window object and docshell via the content and docShell globals.

+ +

The great thing about frame scripts is that they work in both single-process and multiprocess Firefox. To learn more about the message manager, see the message manager guide.

+ +

Cross-process APIs

+ +

There are a lot of APIs in Firefox that cross between the parent and child processes. An example is the webNavigation property of XUL <browser> elements. The webNavigation property is an object that provides methods like loadURI, goBack, and goForward. These methods are called in the parent process, but the actions need to happen in the child. First I’ll cover how these methods work in single-process Firefox, and then I’ll describe how we adapted them for multiple processes.

+ +

The webNavigation property is defined using the XML Binding Language (XBL). XBL is a declarative language for customizing how XML elements work. Its syntax is a combination of XML and JavaScript. Firefox uses XBL extensively to customize XUL elements like <browser> and <tabbrowser>. The <browser> customizations reside in browser.xml. Here is how browser.webNavigation is defined:

+ +
<field name="_webNavigation">null</field>
+
+<property name="webNavigation" readonly="true">
+   <getter>
+   <![CDATA[
+     if (!this._webNavigation)
+       this._webNavigation = this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);
+     return this._webNavigation;
+   ]]>
+   </getter>
+</property>
+
+ +

This code is invoked whenever JavaScript code in Firefox accesses browser.webNavigation, where browser is some <browser> element. It checks if the result has already been cached in the browser._webNavigation field. If it hasn’t been cached, then it fetches the navigation object based off the browser’s docshell. The docshell is a Firefox-specific object that encapsulates a lot of functionality for loading new pages, navigating back and forth, and saving page history. In multiprocess Firefox, the docshell lives in the child process. Since the webNavigation accessor runs in the parent process, this.docShell above will just return null. As a consequence, this code will fail completely.

+ +

One way to fix this problem would be to create a fake docshell in C++ that could be returned. It would operate by sending IPDL messages to the real docshell in the child to get work done. We may eventually take this route in the future. We decided to do the message passing in JavaScript instead, since it’s easier and faster to prototype things there. Rather than change every docshell-using accessor to test if we’re using multiprocess browsing, we decided to create a new XBL binding that applies only to remote <browser> elements. It is called remote-browser.xml, and it extends the existing browser.xml binding.

+ +

The remote-browser.xml binding returns a JavaScript shim object whenever anyone uses browser.webNavigation or other similar objects. The shim object is implemented in its own JavaScript module. It uses the message manager to send messages like "WebNavigation:LoadURI" to a content script loaded by remote-browser.xml. The content script performs the actual action.

+ +

The shims we provide emulate their real counterparts imperfectly. They offer enough functionality to make Firefox work, but add-ons that use them may find them insufficient. I’ll discuss strategies for making add-ons work in more detail later.

+ +

Cross-process object wrappers

+ +

The message manager API does not allow the parent process to call sendSyncMessage; that is, the parent is not allowed to wait for a response from the child. It’s detrimental for the parent to wait on the child, since we don’t want the browser UI to be unresponsive because of slow content. However, converting Firefox code to be asynchronous (i.e., to use sendAsyncMessage instead) can sometimes be onerous. As an expedient, we’ve introduced a new primitive that allows code in the parent process to access objects in the child process synchronously.

+ +

These objects are called cross-process object wrappers, frequently abbreviated to CPOWs. They’re created using the message manager. Consider this example content script:

+ +
addEventListener("load", function (e) {
+  let doc = content.document;
+  sendAsyncMessage("GotLoadEvent", {}, {document: doc});
+}, false);
+
+ +

In this code, we want to be able to send a reference to the document to the parent process. We can’t use the second parameter to sendAsyncMessage to do this: that argument is converted to JSON before it is sent up. The optional third parameter allows us to send object references. Each property of this argument becomes accessible in the parent process as a CPOW. Here’s what the parent code might look like:

+ +
let mm = Cc["@mozilla.org/globalmessagemanager;1"].
+         getService(Ci.nsIMessageListenerManager);
+
+mm.addMessageListener("GotLoadEvent", function (msg) {
+  let uri = msg.objects.document.documentURI;
+  dump("Received load event: " + uri + "\n");
+});
+mm.loadFrameScript("chrome://content/content-script.js", true);
+
+ +

It’s important to realize that we’re send object references. The msg.objects.document object is only a wrapper. The access to its documentURI property sends a synchronous message down to the child asking for the value. The dump statement only happens after a reply has come back from the child.

+ +

Because every property access sends a message, CPOWs can be slow to use. There is no caching, so 1,000 accesses to the same property will send 1,000 messages.

+ +

Another problem with CPOWs is that they violate some assumptions people might have about message ordering. Consider this code:

+ +
mm.addMessageListener("GotLoadEvent", function (msg) {
+  mm.sendAsyncMessage("ChangeDocumentURI", {newURI: "hello.com"});
+  let uri = msg.objects.document.documentURI;
+  dump("Received load event: " + uri + "\n");
+});
+
+ +

This code sends a message asking the child to change the current document URI. Then it accesses the current document URI via a CPOW. You might expect the value of uri to come back as "hello.com". But it might not. In order to avoid deadlocks, CPOW messages can bypass normal messages and be processed first. It’s possible that the request for the documentURI property will be processed before the "ChangeDocumentURI" message, in which case uri will have some other value.

+ +

For this reason, it’s best not to mix CPOWs with normal message manager messages. It’s also a bad idea to use CPOWs for anything security-related, since you may not get results that are consistent with surrounding code that might use the message manager.

+ +

Despite these problems, we’ve found CPOWs to be useful for converting certain parts of Firefox to be multiprocess-compatible. It’s best to use them in cases where users are less likely to notice poor responsiveness. As an example, we use CPOWs to implement the context menu that pops up when users right-click on content elements. Whether this code is asynchronous or synchronous, the menu cannot be displayed until content has responded with data about the element that has been clicked. The user is unlikely to notice if, for example, tab animations don’t run while waiting for the menu to pop up. Their only concern is for the menu to come up as quickly as possible, which is entirely gated on the response time of the content process. For this reason, we chose to use CPOWs, since they’re easier than converting the code to be asynchronous.

+ +

It’s possible that CPOWs will be phased out in the future. Asynchronous messaging using the message manager gives a user experience that is at least as good as, and often strictly better than, CPOWs. We strongly recommend that people use the message manager over CPOWs when possible. Nevertheless, CPOWs are sometimes useful.

diff --git a/files/de/mozilla/firefox/multiprocess_firefox/web_content_compatibility/index.html b/files/de/mozilla/firefox/multiprocess_firefox/web_content_compatibility/index.html new file mode 100644 index 0000000000..1a25906f9e --- /dev/null +++ b/files/de/mozilla/firefox/multiprocess_firefox/web_content_compatibility/index.html @@ -0,0 +1,32 @@ +--- +title: Web content compatibility +slug: Mozilla/Firefox/Multiprocess_Firefox/Web_content_compatibility +tags: + - Electrolysis + - Firefox + - Guide + - Multiprocess + - e10s +translation_of: Mozilla/Firefox/Multiprocess_Firefox/Web_content_compatibility +--- +
{{FirefoxSidebar}}

While the introduction of multi-process capabilities to Firefox should be seamless and invisible to Web content, there are some exceptions and subtle changes from past behavior. This article discusses the known differences you may encounter.

+ +

Events

+ +

Here you'll find information about events whose behaviors have changed due to multiprocess Firefox's implementation.

+ +

No bubbling of events from <option> to <select>

+ +

Historically, Firefox has allowed keyboard and mouse events to bubble up from the <option> element to the parent {{HTMLElement("select")}} element. This doesn't happen in Chrome, however, although this behavior is inconsistent across many browsers. For better Web compatibility (and for technical reasons), when Firefox is in multi-process mode and the <select> element is displayed as a drop-down list. This behavior is unchanged if the <select> is presented inline and it has either the multiple attribute defined or a size attribute set to more than 1.

+ +

Rather than watching <option> elements for events, you should watch for {event("change")}} events on {{HTMLElement("select")}}. See {{bug(1090602)}} for details.

+ +

See also

+ + diff --git a/files/de/mozilla/firefox/nutzung_in_unternehmen/index.html b/files/de/mozilla/firefox/nutzung_in_unternehmen/index.html new file mode 100644 index 0000000000..bb01035bad --- /dev/null +++ b/files/de/mozilla/firefox/nutzung_in_unternehmen/index.html @@ -0,0 +1,142 @@ +--- +title: Firefox in einem Unternehmen nutzen +slug: Mozilla/Firefox/Nutzung_in_Unternehmen +tags: + - Administratoren + - Anleitung + - Bereitstellung + - Firefox + - Unternehmen +translation_of: Mozilla/Firefox/Enterprise_deployment_before_60 +--- +
{{FirefoxSidebar}}
+ +

Diese Seite versucht zu dokumentieren, wie Mozilla Firefox für Windows und Mac in einem Unternehmen genutzt werden kann. Falls Sie Fragen haben, kontaktieren Sie bitte enterprise@mozilla.org.

+ +

Die richtige Variante

+ +

RR (Rapid Release)

+ +

Mozilla veröffentlicht alle sechs Wochen (und, je nach Bedarf, weitere Sicherheitsupdates dazwischen) neue Versionen mit höheren Versionsnummern, neuen Features und Fehlerbehebungen. Am Tag, an dem ein großes Update veröffentlicht wird, wird Mozilla in den meisten Fällen (Ausnahme, siehe unten) die Veröffentlichung von Fehlerbehebungen für die vorherige Version einstellen.

+ +

Die geplanten Veröffentlichungen finden Sie in der Spalte "release date" in der  Future branch dates tabelle in der Mozilla wiki (Englisch).

+ +

ESR (Extended Support Release)

+ +

Jede siebte veröffentlichte Hauptversion von Firefox ist ein Extended Support Release. Diese Versionen werden für 54 Wochen (neun der sechswöchigen Veröffentlichungszyklen) sehr stark auf Probleme hin überprüft. Es überlappen sich 12 Wochen (zwei Veröffentlichungszyklen)  zwischen zwei aufeinanderfolgenden ESR-Veröffentlichungen, in denen beide ESR-Versionen gleichzeitig überprüft werden.

+ +

Die ESR-Veröffentlichungen waren bisher die Versionen 10, 17, 24, und 31. 

+ +

Viele Unternehmen und Organisationen mit zentral organisierten Netzwerksystemen bevorzugen die ESR-Version von Firefox, weil sie dann nicht alle 6 Wochen sondern nur noch alle 42 Wochen die Kompatibilität prüfen müssen. Desweiteren haben sie 12 Wochen mehr Zeit (der Überlappungszeitraum zwischen zwei ESR-Veröffentlichungen) eine Lösung für Probleme zu finden (zusätzlich zu den 6 Wochen die sie bekommen indem sie die Betaversion testen), falls Probleme auftreten.

+ +

Nehmen Sie zur Kenntnis, dass unerwünschte Nebeneffekte auftreten können wenn Sie von einer RR-Version zu einer früheren ESR-Version wechseln, wie zum Beispiel von Version 26-RR zurück zu Version 24.2-ESR, selbst wenn sie am gleichen Tag veröffentlicht wurden. Der Grund dafür ist, dass oft neue Features in die RR-Versionen eingebaut werden, auch wenn sie noch unvollendet und deshalb deaktiviert sind. Schlussendlich entscheidet Mozilla die Features in einer bestimmten Version zu aktivieren. Wenn Sie dann auf eine vorherige, ältere Version wechseln, behalten alle Nutzer ihre letzten Einstellungen in ihren Profilordnern. So bleibt die Option nun angestellt, obwohl das Feature noch nicht komplett fehlerfrei läuft. Wenn Sie also von RR auf ESR wechsel wollen, sollten Sie auf eine neue ESR-Version warten.

+ +

Installation

+ +
    +
  1. Den kompletten, weiterverteilbaren Installer bekommen Sie von  http://www.mozilla.org/firefox/all/ (RR) oder https://www.mozilla.org/firefox/organizations/all.html (ESR).
  2. +
  3. Installieren Sie ihre Version, in dem Sie die Softwareverteilungsmethode ihrer Wahl nutzen. Die Kommand-Zeile für eine stille Installation ist -ms
  4. +
  5. Optional können Sie eine INI-Datei spezifizieren, um beispielsweise die Nutzung von Tastenkürzeln und die Installation vom MaintenanceService zu verhindern. Nutzen Sie dafür Installer Command Line Arguments.
  6. +
+ +

Konfiguration

+ +
    +
  1. Finden Sie den Firefox Programmverzeichnis in dem Firefox' ausführende Datei liegt. In Windows7x64 ist er meist C:\Program Files (x86)\Mozilla Firefox; in OSX 10.8 zumeist /Applications/Firefox.app/Contents/MacOS. Unterordner die unten genannt werden sind abhängig von diesem Pfad. 
  2. +
  3. Erstellen Sie eine Javascript Datei in defaults/pref (für gewöhlich, autoconfig.js - andere Dateinamen funktionieren gleicherweise, doch um beste Resultate zu erzielen sollte es am Anfang des Alphabets stehen.) Der Inhalt dieser Datei zeigt Firefox, wo die konfigurierende Datei zu finden ist (siehe auch Customizing Firefox default preference files/). +

    Die zwei Zeilen die Sie brauchen sind:

    + +
    pref("general.config.obscure_value", 0);
    +pref("general.config.filename", "mozilla.cfg");
    +
  4. +
  5. Erstellen Sie eine .cfg Datei (für gewöhlich, mozilla.cfg — es kann wirklich jeder Name sein; es muss nur zu dem passen, was in  general.config.filename zuvor spezifiziert wurde) im Programmverzeichnis. Überspringen Sie die erste Zeile oder kommentieren Sie sie aus und fangen Sie an ihre Einstellungen vorzunehmen. Um herauszufinden welche Einstellungen Sie nutzen müssen, nutzen Sie about:config in einer Kopie von Firefox, die Sie korrekt eingestellt haben und suchen Sie alle Einstellungen die vom Nutzer eingestellt sind, oder sehen Sie sich das folgende Beispiel an. Jede Einstellung die in about:config auftaucht (und noch einige andere) können mit eine der folgenden Funktionen eingestellt werden: +
    +
    pref
    +
    nimmt eine Einstellung vor, als hätte der Benutzer sie eingestellt, jedes Mal wenn der Browser gestartet wird. Nutzer können zwar Änderungen an den Einstellungen vornehmen, jedoch werden diese beim nächsten Start überschrieben. Wenn Sie auf diese Weise Einstellungen vornehmen, wird die Einstellung in about:config als "vom Benutzer eingestellt" angezeigt.
    +
    defaultPref
    +
    wird gebraucht um die Standardeinstellung zu ändern, jedoch kann jeder Nutzer die Einstellungen ändern. Die Einstellungen werden zwischen Sitzungen gespeichert. Sollten alle Werte auf ihren Ursprung zurückgesetzt werden, werden die so geänderten Einstellungen auf den von Ihnen gesetzten Wert geändert. Taucht in about:config als "standard" auf.
    +
    lockPref
    +
    wird genutzt um Einstellungen zu blockieren, sodass sie nicht mehr vom Nutzer umgestellt werden können, weder über die Einstellungen, noch über about:config. Das Fenster mit den Einstellungen wird sich ändern um dies zu reflektieren, indem es nicht verstellbare Optionen weglässt oder grau färbt.Taucht in about:config auf als "blockiert". Manche Einstellungen benötigen lockPref um geändert zu werden, wie beispielsweise app.update.enabled. Es funktioniert nicht, wenn es nur mit pref geändert wird.
    +
    clearPref
    +
    kann benutzt werden um einige Einstellungen auszublenden. Dies kann nützlich sein, um einige Funktionen zu deaktivieren, die darauf basieren Versionsnummern zu vergleichen.
    +
    +
  6. +
+ +

Sehen Sie sich auch Firefox' autoconfig-Dateien ändern und Firefox' autoconfig-Dateien ändern (Fortführung) an, um mehr zu erfahren. Für tiefergehende Einstellungen, wie beispielsweise das Ausschalten bestimmter Elemente der graphischen Benutzeroberfläche, können Sie die CCK2-Extension nutzen.

+ +

Beispiel für eine config-Datei

+ +

Ihnen mag der Bezug auf "komplexe Einstellungen" auffallen, die in einer anderen Art und Weise eingestellt werden müssen; seit FF31 scheinen alle Einstellungen auf normalem Wege änderbar zu sein, ähnlich wie im folgenden Beispiel.  Für genauere Informationen zu individuellen Einstellungen, durchsuchen Sie die Wissensdatenbank.

+ +
// Deaktiviert den Updater
+lockPref("app.update.enabled", false);
+// Stellt sicher dass er tatsächlich abgestellt ist
+lockPref("app.update.auto", false);
+lockPref("app.update.mode", 0);
+lockPref("app.update.service.enabled", false);
+
+// Deaktiviert die Kompatbilitätsprüfung der Add-ons
+clearPref("extensions.lastAppVersion");
+
+// Deaktiviert 'Kenne deine Rechte' beim ersten Start
+pref("browser.rights.3.shown", true);
+
+// Versteckt 'Was ist neu?' beim ersten Start nach jedem Update
+pref("browser.startup.homepage_override.mstone","ignore");
+
+// Stellt eine Standard-Homepage ein - Nutzer können sie ändern
+defaultPref("browser.startup.homepage", "http://home.example.com");
+
+// Deaktiviert den internen PDF-Viewer
+pref("pdfjs.disabled", true);
+
+// Deaktiviert den Flash zu JavaScript Converter
+pref("shumway.disabled", true);
+
+// Verhindert die Frage nach der Installation des Flash Plugins
+pref("plugins.notifyMissingFlash", false);
+
+//Deaktiviert das 'plugin checking'
+lockPref("plugins.hide_infobar_for_outdated_plugin", true);
+clearPref("plugins.update.url");
+
+// Deaktiviert den 'health reporter'
+lockPref("datareporting.healthreport.service.enabled", false);
+
+// Disable all data upload (Telemetry and FHR)
+lockPref("datareporting.policy.dataSubmissionEnabled", false);
+
+// Deaktiviert den 'crash reporter'
+lockPref("toolkit.crashreporter.enabled", false);
+Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false; 
+
+ +

Packaging Extensions

+ +
    +
  1. Installieren Sie die Erweiterung auf einem Rechner zu Testzwecken. Sehen Sie in about:support unter Extensions nach um die GUID zu fnden. 
  2. +
  3. Sehen Sie im Profilverzeichnis (z.B.: %APPDATA%\Mozilla\Firefox\Profiles auf Win7; um diesen zu finden, klicken Sie auf Ordner anzeigen in about:support), dann unter "extensions" nach dem Add-On dass Sie suchen. Beachten Sie dass es entweder eine einzelne .xpi Datei (wie eine zip Datei) oder extrahiert zu einem Ordner mit mehreren Dateien.
  4. +
  5. Entscheiden Sie wie Sie sie nutzen wollen. Die einfachste Methode ist, die .xpi Datei oder den Ordner in Programmverzeichnis/distribution/extensions zu legen, jedoch funktioniert dies nur für Profile die Installiert wurden nachdem die Erweiterung installiert wurde. Außerdem, wenn Sie Firefox manuell updaten indem Sie das Programm erneut installieren, wird dieser Programmverzeichnis gelöscht. Vergewissern SIe sich dann, ob Sie die Erweiterung ebenfalls manuell erneut installiert haben. Sehen Sie sich auch Integrating add-ons into Firefox/ (Englisch) an, um alternative Methoden zu lernen.
  6. +
+ +

Beachten Sie auch: Add-on scopes redux/ (Englisch)

+ +

Änderungen mit der Zeit

+ +

Änderungen in der Verzeichnisstruktur

+ +

Die Verzeichnisstruktur des Programmpfades wurde zweimal geändert. Sollten Sie einer Anleitung für eine Firefox-Version vor Version 21 folgen, dann müssen Sie vermutlich diese Änderungen beachten:

+ + + +

Die Einstellungen preferences general.config.filename und general.config.obscure_value zur AutoConfiguration können immer noch in defaults/pref vorgenommen werden, jedoch sollte der Dateiname mit dem Buchstaben 'a' beginnen, wie zum Beispiel autoconfig.js.

+ +

Sollte es in defaults/pref in einer zuünftigen Version von Firefox nicht mehr funktionieren, probieren Sie browser/defaults/preferences als den wahrscheinlichsten Platz für die Datei.

+ +

Änderungen in ESR 24.x mit Adobe PDF Files

+ +

Firefox RR 19.x änderte den Standard-Viewer für Adobe PDF Dateien zu dem internen PDF Viewer. Diese Änderung betrifft nun die ESR Versionen seit 24.x, und wird (auf Windows) angewandt, wenn von 17.x auf eine höhere Version geupgradet wird, selbst wenn ein externer Viewer bereits eingestellt wurde. Der Name des Dateitypes wurde von Adobe Acrobat Document zu Portable Document Format (PDF) geändert, was die Lokalisierung durch die Tools-, Options- oder Applications-Tabs erschwert. Um dies abzustellen, ändern Sie pdfjs.disabled zu true wie auch im oben genannten Beispiel.

diff --git a/files/de/mozilla/firefox/privacy/index.html b/files/de/mozilla/firefox/privacy/index.html new file mode 100644 index 0000000000..c6a9e69b09 --- /dev/null +++ b/files/de/mozilla/firefox/privacy/index.html @@ -0,0 +1,9 @@ +--- +title: Privacy +slug: Mozilla/Firefox/Privacy +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Firefox/Privacy +--- +
{{FirefoxSidebar}}

{{ ListSubpages () }}

diff --git a/files/de/mozilla/firefox/privacy/tracking_protection/index.html b/files/de/mozilla/firefox/privacy/tracking_protection/index.html new file mode 100644 index 0000000000..7ebf5f19da --- /dev/null +++ b/files/de/mozilla/firefox/privacy/tracking_protection/index.html @@ -0,0 +1,88 @@ +--- +title: Verfolgungsschutz +slug: Mozilla/Firefox/Privacy/Tracking_Protection +tags: + - Privacy + - Privat + - Private browsing + - Privates Surfen + - blocking + - tracker + - tracking +translation_of: Mozilla/Firefox/Privacy/Tracking_Protection +--- +
{{FirefoxSidebar}}
+ +

Was ist Verfolgungsschutz?

+ +

Beginnend mit Version 42 beinhalten Firefox Desktop und Firefox für Android einen eingebauten Schutz gegen Verfolgung. In privaten Browserfenstern (Tabs, in Firefox für Android) wird Firefox Inhalte, die von Domains geladen werden, die Nutzer über Seiten verfolgen, blockieren.

+ +

Einige dieser blockierten Inhalte sind Teil des Seitenlayouts, weswegen Nutzer Probleme mit diesem haben können. Ist das Seitenraster so angepasst, dass andere Elemente die Lücken der blockierten Inhalte füllen, merken Nutzer keinen Unterschied.

+ +

Wenn Firefox Inhalte blockiert, wird die folgende Nachricht ausgegeben:

+ +
Die Ressource auf "https://some/url" wurde blockiert, weil das Blockieren von Seitenelementen aktiviert ist.
+ +
+

Die Ausgaben auf der Konsole in Firefox für Android können über den Remote Debugger angezeigt werden.

+
+ +

Das Firefox Benutzerinterface zeigt Nutzern an wenn Inhalte blockiert wurden und ermöglicht es ihnen diese für die Dauer der Sitzung zu entblocken. Nutzer können sich auch entscheiden, den Trackingschutz auch dauerthaft abzuschalten.

+ +

Wie entscheidet Firefox was blockiert wird?

+ +

Inhalte werden auf Basis der Domain blockiert, von der sie geladen werden.

+ +

Firefox kommt mit einer Liste von Seiten, die Nutzer über Seiten hinweg verfolgen. Wenn der Verfolgungschutz aktiv ist, wird Firefox Inhalte von Seiten auf dieser Liste blockieren

+ +

Seiten die User tracken sind hauptsächlich externe Werbe- und Analyseseiten

+ +

Was bedeutet das für deine Webseite?

+ +

Zuerst einmal bedeutet das offensichtlich, dass wenn der Trackingschutz aktiviert ist:

+ + + +

Weniger offensichtlich, falls Teile deiner Seite davon abhänging sind, dass Tracker geladen werden, werden diese Teile nicht funktionieren, wenn der Trackingschutz aktiv is. Beinhaltet deine Seite beispielsweise einen Callback, der ausgeführt wird, wenn Inhalte von einer Trackingseite geladen wurde, so wird dieser Callback nicht ausgeführt.

+ +

Zum Beispiel solltest du Google Analytics nicht so verwenden:

+ +
<a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a>
+<script>
+function trackLink(url,event) {
+    event.preventDefault();
+    ga('send', 'event', 'outbound', 'click', url, {
+     'transport': 'beacon',
+     'hitCallback': function() {
+       document.location = url;
+     }
+   });
+}
+</script>
+ +

Stattdessen solltest  du den Fall berücksichtigen, dass Google Analytics fehlt, in dem du überprüftst ob das ga Objekt initialisiert wurde.

+ +
<a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a>
+<script>
+function trackLink(url,event) {
+    event.preventDefault();
+    if (window.ga && ga.loaded) {
+         ga('send', 'event', 'outbound', 'click', url, {
+         'transport': 'beacon',
+         'hitCallback': function() { document.location = url; }
+       });
+    } else {
+        document.location = url;
+    }
+}
+</script>
+
+ +

Mehr Informationen zu dieser Technik ist verfügbar auf Google Analytics, Privacy, and Event Tracking.

+ +
+

Sich auf externe Services zu verlassen ist so oder so kein guter Stil: Es bedeutet deine Seite funktioniert nicht, wenn der Service langsam oder nicht verfügbar ist oder der Tracker von einem Addon blockiert wird.

+
diff --git a/files/de/mozilla/firefox/releases/16/index.html b/files/de/mozilla/firefox/releases/16/index.html new file mode 100644 index 0000000000..1f341acc1e --- /dev/null +++ b/files/de/mozilla/firefox/releases/16/index.html @@ -0,0 +1,104 @@ +--- +title: Firefox 16 für Entwickler +slug: Mozilla/Firefox/Releases/16 +tags: + - Firefox + - Firefox 16 +translation_of: Mozilla/Firefox/Releases/16 +--- +
{{FirefoxSidebar}}

Firefox 16 erschien am 9. Oktober 2012. Dieser Artikel listet die hauptsächlichen Änderungen auf, welche nicht nur für Web-Entwickler gedacht sind, aber auch Firefox- , Gecko- und AddOn-Entwickler.

+ +

Möchten Sie helfen Firefox 16 zu dokumentieren? Schauen Sie auf die Liste von Bugs, über die geschrieben werden sollte und schreibe Sie dazu.

+ +

Änderungen für Web-Entwickler

+ +

HTML

+ + + +

CSS

+ + + +

DOM

+ + + +

JavaScript

+ + + +

WebGL

+ +

SVG

+ +

MathML

+ + + +

Network

+ +

Developer tools

+ + + +

Changes for Open Web App developers

+ + + +

Changes for add-on and Mozilla developers

+ +

Interface changes

+ +

{{interface("nsIPrivateDOMEvent")}} has been merged into {{interface("nsIDOMEvent")}}. ({{bug("761613")}})

+ +

New interfaces

+ +

Removed interfaces

+ +

The following interfaces have been removed.

+ +

See also

+ +
{{Firefox_for_developers('15')}}
diff --git a/files/de/mozilla/firefox/releases/27/index.html b/files/de/mozilla/firefox/releases/27/index.html new file mode 100644 index 0000000000..cb671b3b3c --- /dev/null +++ b/files/de/mozilla/firefox/releases/27/index.html @@ -0,0 +1,56 @@ +--- +title: Firefox 27 für Entwickler +slug: Mozilla/Firefox/Releases/27 +tags: + - Firefox +translation_of: Mozilla/Firefox/Releases/27 +--- +
{{FirefoxSidebar}}
Diese Seite ist noch nicht fertig. +
Firefox 27 ist noch keine vollständige Version. Neue Features werden demnächst hinzugefügt.
+
+ +

Möchten Sie helfen Firefox 27 zu dokumentieren? Schauen Sie auf die Liste von Bugs, über die geschrieben werden sollte und schreibe Sie dazu.

+ +

Änderungen für Web-Entwickler

+ +

HTML

+ +

Keine Änderung.

+ +

CSS

+ + + +

JavaScript

+ +

EcmaScript 6 (Harmony) Implementierung wird fortgeführt!

+ + + +

Interfaces/APIs/DOM

+ +

Keine Änderung.

+ +

MathML

+ +

Keine Änderung.

+ +

SVG

+ +

Keine Änderung.

+ +

Veränderungen für AddOn- und Mozilla-Entwickler

+ + + +

Ältere Versionen

+ +

{{Firefox_for_developers('26')}}

diff --git a/files/de/mozilla/firefox/releases/28/index.html b/files/de/mozilla/firefox/releases/28/index.html new file mode 100644 index 0000000000..64f7d7796e --- /dev/null +++ b/files/de/mozilla/firefox/releases/28/index.html @@ -0,0 +1,116 @@ +--- +title: Firefox 28 for developers +slug: Mozilla/Firefox/Releases/28 +translation_of: Mozilla/Firefox/Releases/28 +--- +
{{FirefoxSidebar}}
+ +

Firefox 28 wurde am 18. März 2014 veröffentlicht. Dieser Artikel listet wichtige Änderungen, die sowohl für Webentwickler, als auch für Firefox-, Gecko- und AddOn-Entwickler nützlich sind.

+ +

Änderungen für Web-Entwickler

+ +

Developer Tools

+ + + +

Mehr Einzelheiten in diesem Beitrag.

+ +

CSS

+ + + +

HTML

+ + + +

JavaScript

+ + + +

Interfaces/APIs/DOM

+ + + +

MathML

+ + + +

SVG

+ +

No change.

+ +

Audio/Video

+ + + +

Network

+ + + +

Changes for addon and Mozilla developers

+ + + +

Security

+ + + +

See also

+ + + +

Older versions

+ +

{{Firefox_for_developers('27')}}

diff --git a/files/de/mozilla/firefox/releases/3.6/index.html b/files/de/mozilla/firefox/releases/3.6/index.html new file mode 100644 index 0000000000..dcd0edcee8 --- /dev/null +++ b/files/de/mozilla/firefox/releases/3.6/index.html @@ -0,0 +1,301 @@ +--- +title: Firefox 3.6 for developers +slug: Mozilla/Firefox/Releases/3.6 +translation_of: Mozilla/Firefox/Releases/3.6 +--- +

Firefox 3.6 offers support for new and developing web standards, increased performance, and an overall better experience for web users and developers. This page provides links to articles covering the new capabilities of Firefox 3.6.

+ +

For web site and application developers

+ +

CSS

+ +
+
Using gradients
+
Firefox 3.6 adds support for the proposed -moz-linear-gradient and -moz-radial-gradient properties for background.
+
Multiple backgrounds
+
The background property (as well as background-color, background-image, background-position, background-repeat, and background-attachment) now supports multiple backgrounds. This lets you specify multiple backgrounds that are rendered atop one another in layers.
+
Mozilla-specific media features
+
Media features have been added for Mozilla-specific system metrics, so that media queries can be used to more safely check on the availability of features such as touch support.
+
Scaling background images
+
The background-size property from the CSS 3 Backgrounds and Borders draft is now supported under the name -moz-background-size.
+
WOFF font support
+
@font-face now supports the WOFF downloadable font file format.
+
Pointer events
+
The pointer-events property lets content specify whether or not an element may be the target of mouse pointer events.
+
+ +

Miscellaneous CSS changes

+ + + +

HTML

+ +
+
Using files from web applications
+
Support for the new HTML5 File API has been added to Gecko, making it possible for web applications to access local files selected by the user. This includes support for selecting multiple files using the input type="file" HTML element's new multiple attribute.
+
HTML5 video supports poster frames
+
The poster attribute is now supported for the video element, allowing content to specify a poster frame to be displayed until the video begins to play.
+
Checkboxes and radio buttons support the indeterminate property
+
HTML input elements of types checkbox and radio now support the indeterminate property, which allows a third, "indeterminate" state.
+
Canvas image smoothing can be controlled
+
The new mozImageSmoothingEnabled property can be used to turn on and off image smoothing when scaling in canvas elements.
+
Asynchronous script execution
+
By setting the async attribute on a script element, the script will not block loading or display of the rest of the page. Instead the script executes as soon as it is downloaded.
+
+ +

JavaScript

+ +

Gecko 1.9.2 introduces JavaScript 1.8.2, which adds a number of language features from the ECMAScript 5 standard:

+ + + +
+
+ +

DOM

+ +
+
Web workers can now self-terminate
+
Workers now support the nsIWorkerScope.close() method, which allows them to terminate themselves.
+
Drag and drop now supports files
+
The DataTransfer object provided to drag listeners now includes a list of files that were dragged.
+
Checking to see if an element matches a specified CSS selector
+
The new element.mozMatchesSelector method lets you determine whether or not an element matches a specified CSS selector. See Bug 518003.
+
Detecting device orientation
+
Content can now detect the orientation of the device if it has a supported accelerometer, using the MozOrientation event. Firefox 3.6 supports the accelerometer in Mac laptops.
+
Detecting document width and height changes
+
The new MozScrollAreaChanged event is dispatched whenever the document's scrollWidth and/or scrollHeight properties change.
+
+ +

Miscellaneous DOM changes

+ + + +

XPath

+ +
+
The choose() XPath method is now supported
+
The choose() method is now supported by our implementation of XPath.
+
+ +

For XUL and add-on developers

+ +

If you're an extension developer, you should start by reading Updating extensions for Firefox 3.6, which offers a helpful overview of what changes may affect your extension. Plug-in developers should read Updating plug-ins for Firefox 3.6.

+ +

New features

+ +
+
Detecting device orientation
+
Content can now detect the orientation of the device if it has a supported accelerometer, using the MozOrientation event. Firefox 3.6 supports the accelerometer in Mac laptops.
+
Monitoring HTTP activity
+
You can now monitor HTTP transactions to observe requests and responses in real time.
+
Working with the Windows taskbar
+
It's now possible to customize the appearance of windows in the taskbar in Windows 7 or later. This has been disabled by default in Firefox 3.6.
+
+ +

Places

+ + + +

Storage

+ +
+
Locale-aware collation of data is now supported by the Storage API
+
Gecko 1.9.2 added several new collation methods to provide optimized collation (sorting) of results using locale-aware techniques.
+
Properties on a statement can now be enumerated
+
You can now use a for..in enumeration to enumerate all the properties on a statement.
+
mozIStorageStatement's getParameterIndex changed behavior between 3.5 and 3.6.
+
See Bug 528166 for details.
+
Asynchronously bind multiple sets of parameters and execute a statement.
+
See Bug 490085 for details. Documentation coming soon.
+
+ +

Preferences

+ + + +

Themes

+ +

See Updating themes for Firefox 3.6 for a list of changes related to themes.

+ +
+
Lightweight themes
+
Firefox 3.6 supports lightweight themes; these are easy-to-create themes that simply apply a background to the top (URL bar and button bar) and bottom (status bar) of browser windows. This is an integration of the existing Personas theme architecture into Firefox.
+
+ +

Miscellaneous

+ + + +

For Firefox/Gecko developers

+ +

Certain changes are only really interesting if you work on the internals of Firefox itself.

+ +

Interfaces merged

+ +

The following interfaces have been combined together:

+ + + +

Interfaces removed

+ +

The following interfaces have been removed entirely because they were unused, unimplemented, or obsolete:

+ + + +

Interfaces moved

+ +

The following interfaces have been relocated from their previous IDL files into new ones:

+ + + +

A large number of interfaces have been moved. See Interfaces moved in Firefox 3.6 for a complete list.

+ +

Other interface changes

+ +

The following assorted changes have been made:

+ + + +

Changes in accessibility code

+ + + +

See also

+ +
diff --git a/files/de/mozilla/firefox/releases/34/index.html b/files/de/mozilla/firefox/releases/34/index.html new file mode 100644 index 0000000000..b0fcd927ab --- /dev/null +++ b/files/de/mozilla/firefox/releases/34/index.html @@ -0,0 +1,107 @@ +--- +title: Firefox 34 für Entwickler +slug: Mozilla/Firefox/Releases/34 +tags: + - Firefox + - Releases +translation_of: Mozilla/Firefox/Releases/34 +--- +
{{FirefoxSidebar}}

Möchtest du helfen Firefox 34 zu dokumentieren? Schaue dir die Liste der Bugs an, über die noch geschrieben werden muss.

+ +

Änderungen für Webentwickler

+ +

Entwickler Werkzeuge

+ +

Höhepunkte:

+ + + +

All devtools bugs fixed between Firefox 33 and Firefox 34.

+ +

CSS

+ + + +

HTML

+ +

Keine Veränderungen.

+ +

JavaScript

+ + + +

Interfaces/APIs/DOM

+ + + +

MathML

+ +

Keine Veränderungen.

+ +

SVG

+ +

Keine Veränderungen.

+ +

Audio/Video

+ +

Keine Veränderungen.

+ +

Sicherheit

+ +

Keine Veränderungen.

+ +

Änderungen für Add-on und Mozilla Entwickler

+ +

Keine Veränderungen.

+ +

Ältere Versionen

+ +

{{Firefox_for_developers('33')}}

diff --git a/files/de/mozilla/firefox/releases/47/index.html b/files/de/mozilla/firefox/releases/47/index.html new file mode 100644 index 0000000000..cf76445536 --- /dev/null +++ b/files/de/mozilla/firefox/releases/47/index.html @@ -0,0 +1,174 @@ +--- +title: Firefox 47 for developers +slug: Mozilla/Firefox/Releases/47 +translation_of: Mozilla/Firefox/Releases/47 +--- +
{{FirefoxSidebar}}

 

+ +

To test the latest developer features of Firefox,
+ install Firefox Developer Edition
Firefox 47 was released on June 6, 2016. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

+ +

Changes for Web developers

+ +

Developer Tools

+ + + +

HTML

+ +

No change.

+ +

CSS

+ + + +

JavaScript

+ + + +

Interfaces/APIs/DOM

+ +

DOM & HTML DOM

+ + + +

WebGL

+ +

No change.

+ +

IndexedDB

+ + + + + + + +

WebRTC

+ + + +

New APIs

+ +

No change.

+ +

Others

+ + + +

Audio/Video

+ + + +

HTTP

+ +

No change.

+ +

Networking

+ +

No change.

+ +

Security

+ + + +

Changes for add-on and Mozilla developers

+ +

Interfaces

+ + + +

FUEL

+ +

The FUEL JavaScript library, introduced back in Firefox 3, has been removed. This library was designed to aid in add-on development and with the introduction of the Add-on SDK and, now, by WebExtensions support, is no longer useful. ({{bug(1090880)}})

+ +

XUL

+ +

No change.

+ +

JavaScript code modules

+ +

No change.

+ +

XPCOM

+ +

No change.

+ +

Other

+ +

No change.

+ +

See also

+ + + +

Older versions

+ +

{{Firefox_for_developers(46)}}

diff --git a/files/de/mozilla/firefox/releases/5/index.html b/files/de/mozilla/firefox/releases/5/index.html new file mode 100644 index 0000000000..febb262599 --- /dev/null +++ b/files/de/mozilla/firefox/releases/5/index.html @@ -0,0 +1,169 @@ +--- +title: Firefox 5 for developers +slug: Mozilla/Firefox/Releases/5 +tags: + - Firefox + - Firefox 5 + - Gecko 5.0 + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Firefox/Releases/5 +--- +
{{FirefoxSidebar}}

Firefox 5, based on Gecko 5.0, was released on June 21, 2011. This article provides links to information about the changes that affect developers in this release.

+ +

Changes for web developers

+ +

HTML

+ + + +

Canvas improvements

+ + + +

CSS

+ +
+
CSS animations
+
Support for CSS animations has been added, using the -moz- prefix for now.
+
+ +

DOM

+ + + +

JavaScript

+ + + +

SVG

+ + + +

HTTP

+ + + +

MathML

+ + + +

Developer tools

+ + + +

Changes for Mozilla and add-on developers

+ +

For a guide to updating your add-on for Firefox 5, please see Updating add-ons for Firefox 5.

+ +
Note: Firefox 5 requires that binary components be recompiled, as do all major releases of Firefox. See Binary Interfaces for details.
+ +

Changes to JavaScript code modules

+ +

New JavaScript code modules

+ + + +

NetUtil.jsm

+ + + +

Interface changes

+ + + +

New interfaces

+ + + +

Removed interfaces

+ +

The following interfaces were implementation details that are no longer needed:

+ + + +

Debugging aids

+ + + +

JavaScript API (SpiderMonkey)

+ + + +

Build system changes

+ + + +

See also

+ +
{{Firefox_for_developers('4')}}
diff --git a/files/de/mozilla/firefox/releases/56/index.html b/files/de/mozilla/firefox/releases/56/index.html new file mode 100644 index 0000000000..0158450bdc --- /dev/null +++ b/files/de/mozilla/firefox/releases/56/index.html @@ -0,0 +1,122 @@ +--- +title: Firefox 56 for developers +slug: Mozilla/Firefox/Releases/56 +translation_of: Mozilla/Firefox/Releases/56 +--- +
{{FirefoxSidebar}}
+

Dieser Artikel enthält Informationen über die Änderungen in Firefox 56, die Entwickler betreffen. Firefox 56 ist die aktuelle Beta-Version von Firefox und wird am 26. September 2017 veröffentlicht werden

+ +
+

Änderungen für Web-Entwickler

+ +

Entwicklerwerkzeuge

+ +

Keine Änderungen.

+ +

HTML

+ +
    +
  • Implementiert die Label-Eigenschaft für beschreibbare Formular-Steuerelemente, zum Beispiel {{domxref("HTMLInputElement.labels")}} ({{bug(556743)}}).
  • +
  • Implementiert <link rel="preload">; siehe Preloading content with rel="preload" für mehr Details ({{bug(1222633)}}).
  • +
+ +

CSS

+ +
    +
  • Implementiert die propietären Mozilla-spezifischen Werte {{cssxref("<color>")}} -moz-win-accentcolor und -moz-win-accentcolortext (see {{bug(1344910)}}), und die propietäre Medienabfrage -moz-windows-accent-color-in-titlebar (see {{bug(1379938)}}).
  • +
+ +

SVG

+ +

Keine Änderungen.

+ +

JavaScript

+ +
    +
  • The Intl API has been enabled on Firefox for Android ({{bug(1344625)}}).
  • +
+ +

APIs

+ +

New APIs

+ +

Keine Änderungen.

+ +

DOM

+ +
    +
  • Auf Macist jetzt {{domxref("Document.hidden")}} wahr, wenn das Fenster hinter einer anderen nicht-lichtdurchlässigen Anwendung steht {{bug(1236512)}}.
  • +
  • Die Eigenschaft {{domxref("Gamepad.displayId")}} wurde implementiert ({{bug(1375816)}}).
  • +
  • Die Methode {{domxref("CanvasRenderingContext2D.drawImage()")}} wurde aktualisiert, so dass so dass die Glättung beim Downscaling erfolgt, auch wenn imageSmoothingEnabled ist false. Dies ist nicht obligatorisch wie pro Spezifikation, sondern folgt Chromes Verhalten. Siehe {{bug(1360415)}}.
  • +
  • Die Eigenschaft {{domxref("PerformanceTiming.secureConnectionStart")}} wurde implementiert ({{bug(772589)}}).
  • +
  • Firefox verwendet iso-2022-jp-2, um Sequenzen zu nehmen, wenn ein iso-2022-jp {{domxref ("TextDecoder.TextDecoder", "TextDecoder ()")}} instanziiert wurde. Dies wurde nun entfernt, um die API zu vereinfachen, da keine anderen Browser oder Webseiten es unterstützen. ({{bug(715833)}}).
  • +
  • Das 4ms- Klemmeverhalten von {{domxref("WindowOrWorkerGlobalScope.setTimeout","setTimeout()")}} und {{domxref("WindowOrWorkerGlobalScope.setInterval","setInterval()")}} wurde aktualisiert, um besser in Einklang mit anderen Browsern, wie in Timeouts throttled to >=4ms zu sein. ({{bug(1378586)}}).
  • +
  • Der Page Visibility API's {{domxref("Document.onvisibilitychange")}} handler wurde hinzugefügt ({{bug("1333912")}}).
  • +
+ +

DOM events

+ +
    +
  • {{domxref("GlobalEventHandlers.onwheel")}} ist ab sofort verfügbar {{domxref("HTMLElement")}} — es war nicht vorher ({{bug(1370550)}}).
  • +
+ +

WebRTC

+ +
    +
  • Firefox unterstützt nun die {{domxref("RTCPeerConnection")}} Eigenschaften, die Sie die aktuellen und ausstehenden Konfigurationen der lokalen und entfernten Enden der Verbindung untersuchen lassen, um zu helfen, Änderungen in der Konfiguration zu verwalten:{{domxref("RTCPeerConnection.currentLocalDescription", "currentLocalDescription")}}, {{domxref("RTCPeerConnection.pendingLocalDescription", "pendingLocalDescription")}}, {{domxref("RTCPeerConnection.currentRemoteDescription", "currentRemoteDescription")}}, and {{domxref("RTCPeerConnection.pendingRemoteDescription", "pendingRemoteDescription")}}.
  • +
+ +

Sicherheit

+ +

Keine Änderungen.

+ +

Plugins

+ +

Keine Änderungen.

+ +

Weiteres

+ +
    +
  • Gecko kodiert nun URLs intern als punycode, um URL-Codierungsprobleme zu vermeiden (siehe {{Bug ("945240")}}, siehe auch Diskussion in {{Bug ("942074")}}).
  • +
  • Firefox unter Windows und Mac OS X kann nun im headless Modus mit der -headless-Flagge ausgeführt werden (siehe {{bug (1355150)}} und {{bug (1355147)}}).
  • +
+ +

Von der Web-Plattform entfernt

+ +

HTML

+ +
    +
  • Das {{htmlelement("isindex")}} Element wurde vom HTML parser und aus der Formularvorlage entfernt. ({{bug(1266495)}}).
  • +
  • Das {{htmlelement("applet")}} Element wurde entfernt ({{bug(1279218)}}).
  • +
+ +

APIs

+ +
    +
  • Die {{domxref("KeyframeEffectReadOnly.spacing")}} Eigenschaft wurde von dem {{SpecName('Web Animations')}} spec entfernt, und deswegen wurde es auch von Gecko entfernt ({{bug(1339690)}}).
  • +
+ +

SVG

+ +

Keine Änderungen.

+ +

Änderungen für add-on und Mozilla-Entwickler

+ +

WebExtensions

+ +

Keine Änderungen.

+ +

Siehe auch

+ + +
+ + + +

Ältere Versionen

+ +

{{Firefox_for_developers(55)}},

+
diff --git a/files/de/mozilla/firefox/releases/57/index.html b/files/de/mozilla/firefox/releases/57/index.html new file mode 100644 index 0000000000..dccbe85dea --- /dev/null +++ b/files/de/mozilla/firefox/releases/57/index.html @@ -0,0 +1,99 @@ +--- +title: Firefox 57 für Entwickler +slug: Mozilla/Firefox/Releases/57 +translation_of: Mozilla/Firefox/Releases/57 +--- +
{{FirefoxSidebar}}
{{draft}}
+ +

Dieser Artikel enthält Informationen über die Änderungen in Firefox 57, die Entwicklern nützlich sind. Firefox 57 ist die aktuelle Nightly-Version von Firefox und wird am 14. November 2017 veröffentlicht werden.

+ +
+

Firefox 57 = Firefox Quantum

+ +

Firefox 57 wurde Quantum genannt, weil dies der passendste Name für "Stabilität, Performance, etc." ist.

+ +

Änderungen für Web-Entwickler

+ +

Entwickler-Tools

+ +

Keine Änderungen.

+ +

HTML

+ +

Keine Änderungen.

+ +

CSS

+ +

Keine Änderungen.

+ +

SVG

+ +

Keine Änderungen.

+ +

JavaScript

+ +

Keine Änderungen.

+ +

APIs

+ +

Neue APIs

+ +

Keine Änderungen.

+ +

DOM

+ +

Keine Änderungen.

+ +

DOM events

+ +

Keine Änderungen.

+ +

WebRTC

+ +

Keine Änderungen.

+ +

Sicherheit

+ +

Keine Änderungen.

+ +

Plugins

+ +

Keine Änderungen.

+ +

Anderes

+ +

Keine Änderungen.

+ +

Von der Web-Plattform entfernt

+ +

HTML

+ +

Keine Änderungen.

+ +

APIs

+ +

Keine Änderungen.

+ +

SVG

+ +

Keine Änderungen.

+ +

Änderungen für add-on und Mozilla-Entwickler

+ +

WebExtensions

+ +

Keine Änderungen.

+ +

Siehe auch

+ + +
+ + + +

Ältere Versionen

+ +

{{Firefox_for_developers(56)}}

diff --git a/files/de/mozilla/firefox/releases/58/index.html b/files/de/mozilla/firefox/releases/58/index.html new file mode 100644 index 0000000000..ba03bbbc43 --- /dev/null +++ b/files/de/mozilla/firefox/releases/58/index.html @@ -0,0 +1,186 @@ +--- +title: Firefox 58 for developers +slug: Mozilla/Firefox/Releases/58 +translation_of: Mozilla/Firefox/Releases/58 +--- +
{{FirefoxSidebar}}
+

Dieser Artikel enthält Informationen zu den Änderungen in Firefox 58, die sich auf Entwickler auswirken. Firefox 58 ist die aktuelle Beta-Version von Firefox und wird am 16. Januar 2018 ausgeliefert.

+ +
+

Änderungen für Web Entwickler

+ +

Developer Tools

+ +
    +
  • Der Code für den alten Responsive-Design-Modus (standardmäßig aktiviert vor Firefox 52) wurde jetzt aus den Devtools entfernt ({{bug (1305777)}}). Informationen zu den neuen Tools finden Sie im Responsive Design-Modus.
  • +
  • Die Option zum Anzeigen von MDN-Dokumenten aus dem CSS-Bereich des Seiteninspektors wurde entfernt ({{bug (1382171)}}).
  • +
  • Der CSS-Formen-Textmarker wurde standardmäßig für Formen aktiviert, die über {{cssxref ("clip-path")}} ({{bug (1405339)}}) erstellt wurden.
  • +
  • Der Netzwerkmonitor verfügt jetzt über eine Schaltfläche zum Anhalten / Wiedergeben der Aufzeichnung des Netzwerkverkehrs ({{bug (1005755)}}).
  • +
  • Im Netzwerkmonitor ist die Filterschaltfläche "Flash" nicht mehr verfügbar und Flash-Anforderungen sind im Filter "Others" enthalten ({{bug (1413540)}}).
  • +
+ +

HTML

+ +

Keine Änderungen.

+ +

CSS

+ +
    +
  • Der Deskriptor {{cssxref ("@ font-face / font-display", "font-display")}} ist jetzt standardmäßig auf allen Plattformen verfügbar ({{bug (1317445)}}).
  • +
+ +

SVG

+ +

Keine Änderungen .

+ +

JavaScript

+ +
    +
  • Das Objekt {{jsxref ("Global_Objects / DateTimeFormat", "Intl.DateTimeFormat")}} unterstützt jetzt die Option hourCycle und das hc Sprachen Tag ({{bug (1386146)}}).
  • +
+ +

APIs

+ +

Neue APIs

+ +
    +
  • Die API {{domxref ("PerformanceNavigationTiming")}} wurde implementiert ({{bug (1263722)}}). +
      +
    • Gecko besitzt nun eine Pref Einstellung, die verwendet werden kann, um die Schnittstelle bei Bedarf zu deaktivieren — dom.enable_performance_navigation_timing, Standardwert ist true ({{bug(1403926)}}).
    • +
    +
  • +
+ +

DOM

+ +
    +
  • Fehler, die über Fehlerobjekte in bestimmten APIs gemeldet werden - z. B. in der error Eigenschaft von {{domxref ("FileReader")}}, {{domxref ("IDBRequest")}} und {{domxref ("IDBTransaction")}}, sowie wenn Anfragen über bestimmte Methoden von {{domxref ("RTCPeerConnection")}} nicht erfolgreich sind - werden jetzt durch {{domxref ("DOMException")}} Instanzen repräsentiert. {{domxref ("DOMError")}} ist veraltet und wurde aus der DOM4-Spezifikation ({{bug (1120178)}}) ​​entfernt.
  • +
  • Die WebVR-API wurde standardmäßig unter macOS aktiviert ({{bug (1374399)}}).
  • +
  • Die Eigenschaft {{domxref ("PerformanceResourceTiming.workerStart")}} wird jetzt unterstützt ({{bug (1191943)}}).
  • +
  • Budget-basierte Timeout-Throttling-Regeln wurden implementiert - siehe Richtlinien zur Unterstützung der Performance von Hintergrundseiten für weitere Details ({{bug (1377766)}}).
  • +
+ +

DOM Events

+ +

Keine Änderungen.

+ +

Media and WebRTC

+ +
    +
  • Die vorangestellte Version von {{domxref ("HTMLMediaElement.srcObject")}} wurde entfernt. Es ist sicherzustellen, daß der Code aktualisiert wird, um das Standard-srcObject anstelle von mozSrcObject ({{bug (1183495)}}) zu verwenden.
  • +
+ +

Canvas und WebGL

+ +

Keine Änderungen.

+ +

HTTP

+ +
    +
  • frame-ancestors wird nicht mehr ignoriert in {{httpheader ("Content-Security-Policy-Report-Only")}} ({{bug (1380755)}}).
  • +
  • Firefox implementiert jetzt ein TLS-Handshake-Timeout mit einem Standardwert von 30 Sekunden. Der Timeout-Wert kann durch Bearbeiten des Parameters network.http.tls-handshake-timeout in about:config ({{bug(1393691)}}).
  • +
  • Die worker-src CSP Richtlinie wurde implementiert ({{bug(1302667)}}).
  • +
+ +

Security

+ +

Keine Änderungen.

+ +

Plugins

+ +

Keine Änderungen.

+ +

Andere

+ +

Keine Änderungen.

+ +

Webplattform Berichtigungen

+ +

HTML

+ +
    +
  • {{htmlelement ("a")}} -Elemente können nicht mehr in ein {{htmlelement ("map")}} -Element eingebettet werden, um einen Hotspot-Bereich zu erstellen - ein {{htmlelement ("area")}} -Element muss stattdessen verwendet werden ({{bug (1317937)}}).
  • +
+ +

CSS

+ + + +

JavaScript

+ + + +

APIs

+ +
    +
  • Die proprietären moz-blob und moz-chunked-text Werte der {{Domxref ("XMLHttpRequest.responseType")}} - Eigenschaft wurden in Firefox 58 vollständig entfernt ({{bug (1397145)}}, {{bug (1397151)}}, {{bug (1120171)}}).
  • +
  • Die Voreinstellungen dom.abortController.enabled und dom.abortController.fetch.enabled, die die Belichtung der Abort-API-Funktionalität kontrollierten, wurden nun entfernt, da diese Funktionen jetzt standardmäßig aktiviert sind ({{bug (1402317)}}).
  • +
  • Die proprietäre Eigenschaft mozSrcObject wurde in Firefox 58 entfernt ({{bug (1183495)}}). Verwenden Sie stattdessen die standardmäßige {{domxref ("HTMLMediaElement.srcObject")}} -Eigenschaft.
  • +
+ +

SVG

+ +

Keine Änderungen.

+ +

Änderungen für Add-On und Mozilla Entwickler

+ +

WebExtensions

+ +

Keine Änderungen.

+ +

Siehe auch

+ + +
+ + + +

Ältere Versionen

+ +

{{Firefox_for_developers(57)}}

+
diff --git a/files/de/mozilla/firefox/releases/60/index.html b/files/de/mozilla/firefox/releases/60/index.html new file mode 100644 index 0000000000..2d75e69ac2 --- /dev/null +++ b/files/de/mozilla/firefox/releases/60/index.html @@ -0,0 +1,146 @@ +--- +title: Firefox 60 for developers +slug: Mozilla/Firefox/Releases/60 +translation_of: Mozilla/Firefox/Releases/60 +--- +
{{FirefoxSidebar}}
{{draft}}
+ +

This article provides information about the changes in Firefox 60 that will affect developers. Firefox 60 is the current Nightly version of Firefox, and will ship on May 8, 2018.

+ +

Stylo comes to Firefox for Android in 60

+ +

Firefox's new parallel CSS engine — also known as Quantum CSS or Stylo, which was first enabled by default in Firefox 57 for desktop, has now been enabled in Firefox for Android.

+ +

Changes for web developers

+ +

Developer tools

+ + + +

HTML

+ +

Pressing the Enter key in designMode and contenteditable now inserts <div> elements when the caret is in an inline element or text node which is a child of a block level editing host — instead of inserting <br> elements like it used to. If you want to use the old behavior on your app, you can do it with document.execCommand(). See Differences in markup generation for more details.

+ +

CSS

+ + + +

SVG

+ +

No changes.

+ +

JavaScript

+ +

The {{jsxref("Array.prototype.values()")}} method has been added again ({{bug(1420101)}}). It was disabled due to compatibilty issues in earlier versions. Make sure your code doesn't have any custom implementation of this method.

+ +

APIs

+ +

New APIs

+ +

No changes.

+ +

DOM

+ + + +

DOM events

+ +

No changes.

+ +

Service workers

+ +

No changes.

+ +

Media and WebRTC

+ + + +

Canvas and WebGL

+ +

No changes.

+ +

CSSOM

+ +

No changes.

+ +

HTTP

+ +

No changes.

+ +

Security

+ +

No changes.

+ +

Plugins

+ +

No changes.

+ +

Other

+ +

No changes.

+ +

Removals from the web platform

+ +

HTML

+ +

No changes.

+ +

CSS

+ + + +

JavaScript

+ +

The non-standard expression closure syntax has been removed ({{bug(1426519)}}).

+ +

APIs

+ +

No changes.

+ +

SVG

+ +

No changes.

+ +

Other

+ +

No changes.

+ +

Changes for add-on and Mozilla developers

+ +

WebExtensions

+ +

No changes.

+ +

See also

+ + + +

Older versions

+ +

{{Firefox_for_developers(58)}}

+ +

 

diff --git a/files/de/mozilla/firefox/releases/68/index.html b/files/de/mozilla/firefox/releases/68/index.html new file mode 100644 index 0000000000..8a5c4fa572 --- /dev/null +++ b/files/de/mozilla/firefox/releases/68/index.html @@ -0,0 +1,162 @@ +--- +title: Firefox 68 für Entwickler +slug: Mozilla/Firefox/Releases/68 +translation_of: Mozilla/Firefox/Releases/68 +--- +

{{FirefoxSidebar}}{{Draft}}

+ +

This article provides information about the changes in Firefox 68 that will affect developers. Firefox 68 is the current Beta version of Firefox, and will ship on July 9, 2019.

+ +

Changes for web developers

+ +

Developer tools

+ + + +

Removals

+ +

HTML

+ +

No changes.

+ +

 Removals

+ +

CSS

+ + + +

Removals

+ + + +

SVG

+ +

No changes.

+ +

Removals

+ +

JavaScript

+ +

No changes.

+ +

Removals

+ +

APIs

+ +

No changes.

+ +

New APIs

+ + + +

DOM

+ + + +

DOM events

+ +

Service workers

+ +

Media, Web Audio, and WebRTC

+ + + +

Canvas and WebGL

+ +

Removals

+ + + +

Security

+ +

No changes.

+ +

Removals

+ +

Plugins

+ +

No changes.

+ +

Removals

+ +

Other

+ +

No changes.

+ +

Removals

+ +

Changes for add-on developers

+ +

API changes

+ + + +

Removals

+ +

Manifest changes

+ +

No changes.

+ +

Removals

+ +

See also

+ + + +

Older versions

+ +

{{Firefox_for_developers(67)}}

diff --git a/files/de/mozilla/firefox/releases/index.html b/files/de/mozilla/firefox/releases/index.html new file mode 100644 index 0000000000..e5af49da21 --- /dev/null +++ b/files/de/mozilla/firefox/releases/index.html @@ -0,0 +1,12 @@ +--- +title: Firefox developer release notes +slug: Mozilla/Firefox/Releases +tags: + - Firefox + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Firefox/Releases +--- +
{{FirefoxSidebar}}

This page provides links to the "Firefox X for developers" articles for each Firefox release. These notes let you see what features were added and bugs eliminated in each version of Firefox.

+ +
{{ListSubpages("",1,0,1)}}
diff --git a/files/de/mozilla/firefox/the_about_protocol/index.html b/files/de/mozilla/firefox/the_about_protocol/index.html new file mode 100644 index 0000000000..5225af8915 --- /dev/null +++ b/files/de/mozilla/firefox/the_about_protocol/index.html @@ -0,0 +1,190 @@ +--- +title: Firefox und das "about"-Protokoll +slug: Mozilla/Firefox/The_about_protocol +tags: + - Einstellungen + - Firefox + - Guide + - Protokolle + - Referenz + - 'about:' +translation_of: Mozilla/Firefox/The_about_protocol +--- +
{{FirefoxSidebar}}
+ +
Es gibt eine Menge wichtiger Informationen über Firefox, die sich hinter dem about: URL-Protokoll verbergen. Am wichtigsten ist die URL about:config, die Einstellungen anzeigt, die sich dort betrachten und ändern lassen. Hier ist eine komplette Liste mit allen URLs  des about:-Pseudo-Protokolls::
+ +
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
about: SeiteBeschriebung
about:Zeigt die Versionsnummer, Buildinformationen, Links zu den Beitragenden, Lizenzinformationen und Einstellungen zur Build-Konfiguration an.
about:aboutZeigt einen Überblick über alle about:-Seiten an.
about:accountsZeigt Informationen zur Sync-Funktion an.
about:addonsÖffnet den Add-ons-Manager
about:app-managerÖffnet den App-Manager
about:buildconfigZeigt die für die Version von Firefox verwendete Konfiguration und Plattform an.
about:cacheZeigt Informationen zum Speicher, Speichermedium und Arbeitsspeicher an.
about:compartments +
+

Seit Firefox 26 können diese Informationen unter "Other Measurements" in about:memory gefunden werden.

+
+ +

Zeigt Informationen zu einzelnen "Compartments".

+
about:configBietet eine Möglichkeit, Einstellungen in Firefox zu untersuchen und zu ändern.
about:crashesListet alle Abstürze, die während der gesamten Lebenszeit von Firefox passierten, auf.
about:creditsListet alle Ünterstützer und Mitwirkenden des Firefox-Projektes auf.
about:customizingWechselt zur Anpassungsseite, die Anpassungen der Benutzeroberfläche von Firefox erlaubt.
about:downloadsListet alle Downloads von Firefox aus auf.
about:healthreportZeigt Leistungsinformationen von Firefox an (nur wenn der Nutzer dies aktiviert hat).
about:homeÖffnet die Startseite, die beim Öffnen eines neuen Fensters erscheint.
about:licenseZeigt Lizenzinformationen an.
about:logoZeigt das Firefox-Logo an.
about:memoryBietet eine Möglichkeit, die Speicherverwendung anzuzeigen, als Bericht zu speichern oder GC und CC auszuführen.
about:mozillaDiese Sonderseite zeigt eine Nachricht aus dem "The Book of Mozilla".
about:networkingZeigt Netzwerk-Informationen an.
about:newtabÖffnet die Startseite für einen neuen Tab.
about:permissions +
+

Wurde mit Firefox 45 entfernt. ({{bug(933917)}})

+
+ +

Bietet eine Möglichkeit, Berechtigungen anzuzeigen und verwalten zu lassen.

+
about:pluginsZeigt Informationen zu installierten Plugins an.
about:preferencesÖffnet die Einstellungen zu Firefox (auch erreichbar über das Firefox-Menü > Optionen)
about:privatebrowsingÖffnet die Startseite, die beim Öffnen eines privaten Tabs angezeigt wird.
about:profilesZeigt und verwaltet Firefox-Profile.
about:rightsZeigt rechtliche Informationen an.
about:robotsDiese Sonderseite zeigt Informationen zu Robots an.
about:serviceworkersZeigt aktuell laufende Service Workers an.
about:sessionrestoreÖffnet die Sitzungswiederherstellungsseite (wird nach einem Absturz angezeigt).
about:supportÖffnet die Fehlerbehebungsseite (auch erreichbar über das Firefox-Menü > ? (Fragezeichen) > Informationen zur Fehlerbehebung)
about:sync-logZeigt ein Synchronisations-Protokoll bezogen auf die Sync-Funktion an.
about:sync-progressZeigt die Seite, die nach der Einrichtung der Sync-Funktion aufgerufen wird.
about:sync-tabsZeigt synchronisierbare Tabs an (für die Sync-Funktion).
about:telemetryZeigt die von Firefox gesammelten und an Mozilla gesendeten telemetrischen Daten an (nur wenn der Nutzer Telemetrie aktiviert hat).
about:webrtcZeigt Informationen zur Verwendung von WebRTC an.
about:welcomebackZeigt die Seite, die nach einer Zurücksetzung aufgerufen wird.
+ +

Diese URLs wurden in {{source("docshell/base/nsAboutRedirector.cpp")}} innerhalb des kRedirMap-Arrays definiert. Der Array zeigt die meisten der URLs, wie config in URLs im chrome:-Pseudo-Protokoll, wie chrome://global/content/config.xul an.  Der Ort der about:-Informationen wurde aus {{source("docshell/build/nsDocShellModule.cpp")}} kopiert..

diff --git a/files/de/mozilla/firefox/updating_add-ons_for_firefox_5/index.html b/files/de/mozilla/firefox/updating_add-ons_for_firefox_5/index.html new file mode 100644 index 0000000000..f57ae8a1fc --- /dev/null +++ b/files/de/mozilla/firefox/updating_add-ons_for_firefox_5/index.html @@ -0,0 +1,69 @@ +--- +title: Updating add-ons for Firefox 5 +slug: Mozilla/Firefox/Updating_add-ons_for_Firefox_5 +translation_of: Mozilla/Firefox/Releases/5/Updating_add-ons +--- +
{{FirefoxSidebar}}

This article provides an overview of the changes you may need to make to your add-ons in order for them to work properly in Firefox 5. You can find a complete list of developer-related changes in Firefox 5 in Firefox 5 for developers.

+ +

Do you need to do anything at all?

+ +

If your add-on is distributed on addons.mozilla.org (AMO), it's been checked by an automated compatibility verification tool. Add-ons that don't use APIs that changed in Firefox 5, and have no binary components (which need to be recompiled for every major Firefox release), have automatically been updated on AMO to indicate that they work in Firefox 5.

+ +

So you should start by visiting AMO and looking to see if your add-on needs any work done at all.

+ +
Note: You should still test your add-on on Firefox 5, even if it's been automatically upgraded. There are edge cases that may not be automatically detected.
+ +

Once you've confirmed that you need to make changes, come on back to this page and read on.

+ + + +

Due to the short development cycle (even for our rapid release cycle; Firefox 5 was on an extra-short schedule for timing reasons), there are very few UI related changes in Firefox 5.

+ +

Determining the UI language

+ +

In the past, the {{ domxref("window.navigator.language") }} DOM property reflected the language of Firefox's user interface. This is no longer the case; instead, it reflects the value of the Accept-Language header for the current document. If you need to detect the UI language, you should instead look at the value of the general.useragent.locale preference.

+ +

DOM changes

+ +

The behaviors of {{ domxref("window.setTimeout()") }} and {{ domxref("window.setInterval()") }} have changed; the minimum allowed time has changed, and varies depending on the situation. In addition, timeouts and intervals are clamped to one per second in inactive tabs (that is, tabs the user isn't currently looking at).

+ +

JavaScript changes

+ +

The following keywords are now reserved in JavaScript, even when you're not in strict mode:

+ + + +

Don't use those keywords anywhere in your code, even as object property names.

+ +
Note: This is one of those things that AMO's automatically upgrade tool may not always catch, so check your code for these if your add-on was automatically upgraded but is still not working properly.
+ +

Interface changes

+ +

Instantiating certain services, including the {{ interface("nsICertOverrideService") }}, at startup can make Firefox unusable ({{ bug(650858) }}. This happens only if you try to instantiate a service before the load event is fired.

+ +

To fix this, simply move your instantiation of these services into your load event handler:

+ +
var MyObject = {
+  comp : null,
+  init: function() {
+    this.comp = Components.classes[...].getService(...);
+  },
+  ...
+}
+window.addEventListener("load", function() { MyObject.init(); }, false);
+
+ +

An even better solution, of course, is to follow performance best practices and to not instantiate services until you need to use them.

+ +

See also

+ + diff --git a/files/de/mozilla/firefox_fuer_android/compatibility_testing/index.html b/files/de/mozilla/firefox_fuer_android/compatibility_testing/index.html new file mode 100644 index 0000000000..e8c5b26907 --- /dev/null +++ b/files/de/mozilla/firefox_fuer_android/compatibility_testing/index.html @@ -0,0 +1,103 @@ +--- +title: Site Compatibility Testing for Firefox for Android +slug: Mozilla/Firefox_fuer_Android/Compatibility_Testing +translation_of: Mozilla/Firefox_for_Android/Compatibility_Testing +--- +

Overview

+

Our goal, is to open up the Web to all mobile browsers via promotion of standards and best practices.

+

However, some websites serve content either that doesn't function well or that is different than that served to some specific popular mobile browsers of the moment. This content may be:

+ +

We refer to this category of issues as Web compatibility issues. Web compatibility issues (for Firefox for Android, Firefox OS and other browsers with limited market share in one or more regions) typically result from one or more of several causes:

+
+
+ User-agent sniffing
+
+ Identifying the browser by its user-agent string and sending different content.
+
+ Use of non standard (typically Webkit) CSS properties
+
+ Using non standard CSS properties that the browser does not recognize, causing layout or style issues
+
+ Use of non standard (typically Webkit) DOM properties
+
+ Using non standard DOM properties in JavaScript that the browser does not recognize, causing functional issues
+
+ Browser limitations
+
+ Using standard CSS and DOM properties that the browser does not currently implement or that have functional or performance issues
+
+

For Firefox specifically, we need your help to identify sites that do not work well by reporting the specific issues that you find in your investigation. Other browsers vendors have bug reporting systems, where you can report the issues as well for their specific browser.

+

Outlined below are steps that you can follow to identify and report site issues.

+

Setup

+

To start, let's set up your hardware and software for compatibility testing.

+
    +
  1. An Android phone is a prerequisite for testing Firefox for Android. See our list of supported devices for Firefox for Android to ensure that your phone is supported.
  2. +
  3. Install Firefox for Android from Google Play.
  4. +
  5. Install the Phony Add-on for Firefox on Android. This add-on lets Firefox for Android pretend to be another browser by changing the user-agent string that is sent with each HTTP request.
  6. +
  7. Set up an account on bugzilla so that you can report issues.
  8. +
+

Optional steps:

+ +
+

Note: See the article Browser detection using the user agent for an in-depth explanation about browser user-agents.

+
+

Compatibility Testing

+

The following steps walk you through the method that Mozilla QA uses for compatibility testing:

+
    +
  1. Select a site to test. +
      +
    • This may be a site that you already visited and saw that something is wrong in your daily browser usage.
    • +
    • Alternatively, you can select one of the top sites listed on the Are We Compatible Yet report. Sites that have not yet been investigated are shown in white.
    • +
    +
  2. +
  3. Open the site that you selected in Firefox for Android. Test the functionality of the site by exploring different areas of the site. For example, if the site displays articles, pictures, and videos, you should explore all three areas of the site. Click on links, use forms, create accounts, sign in, and question: +
      +
    1. Is the site a desktop site? If so, skip to #3 and #4 to determine if Safari on iPhone and the Android browser are served the same desktop content.
    2. +
    3. Does the site have obvious layout problems? Are elements positioned on top of one another? Is there missing content? Do menus display correctly? Are header background colors correct? Are areas of the page shown correctly? Does the site simply look bad?
      +  
    4. +
    +
  4. +
  5. Visit the same website using your device’s Android browser, using the same exploration methods in #2, and question: +
      +
    1. Is the site a desktop site? Does the content greatly differ than what you saw on Firefox for Android? If so, how is it different? Is it a mobile optimized site?
    2. +
    3. Are there any similar layout issues as seen in Firefox for Android? If so, what problems do you see with Firefox for Android that you do not see in the Android browser?
      +  
    4. +
    +
  6. +
  7. Make Firefox for Android appear to the site as though it is Safari on iPhone by clicking Menu->Phony and selecting iPhone. After selecting iPhone click Menu->Reload. Visit the same site again and continue with the same exploration methods in #2 and question: +
      +
    1. Is the site a desktop site? Does the content greatly differ than what you previously saw in Firefox for Android? If so, how is it different? Is it a mobile optimized site?
    2. +
    3. Does the site have any layout problems? If so, what are those problems?
    4. +
    +
  8. +
+

Reporting Results

+

For any site that looks or functions differently in Firefox for Android, the Android browser, or Safari on iPhone you should report each issue in Bugzilla. To report an issue, file a bug in the Firefox for Android Evangelism component and provide as much information about the issue as you can. Here are some pieces of information that are typically helpful to submit with your report:

+
+
+
+
+ Summary
+
+ Summarize the issue that you have identified with the site. It is helpful to include the domain name, such as mozilla.org, in the summary.
+
+ Description
+
+ Describe the issue as best as you can. Include details such as how the content differs between Firefox for Android, Android browser, and Safari on iPhone, the specific places (titles, article list, options menu) where the site does not look correct, and what parts of the site (articles are unreadable, videos don't play, can't click on links) that do not function as you expected that they would.
+
+ If you have some knowledge of HTML, CSS, and JavaScript, it is also very helpful to have references to the lines of code that are the root cause of the issue.
+
+ Attachments
+
+ It is also valuable to attach a screen capture that shows the problem in Firefox for Android. How to take a screenshot on Android differs based on your version of the operating system.
+
+

Contact Information

+

If you have any questions about compatibility testing or want to become involved in Mozilla’s mobile web compatibility effort, please sign up for the compatibility@lists.mozilla.org mailing list.

diff --git a/files/de/mozilla/firefox_fuer_android/index.html b/files/de/mozilla/firefox_fuer_android/index.html new file mode 100644 index 0000000000..1df1e939c9 --- /dev/null +++ b/files/de/mozilla/firefox_fuer_android/index.html @@ -0,0 +1,64 @@ +--- +title: Firefox für Android +slug: Mozilla/Firefox_fuer_Android +translation_of: Mozilla/Firefox_for_Android +--- +

Für mehr und mehr Menschen sind Mobilgeräte der Hauptweg, oder sogar der einzige Weg, Zugang zum Web zu erlangen. Firefox für Android (Codename Fennec) ist ein offener, hackbarer, auf Standards basierender Browser, genau wie Firefox für den Desktop.

+ +

Firefox für Android erzeugt seine Benutzeroberfläche aus systemeigenen Android Widgets anstatt aus XUL: dies verbessert die Performanz außerordentlich, insbesondere die Zeit des Startvorgangs, und den Speicherbedarf.

+ +

Zu Firefox für Android beitragen

+ +

Die Hauptbezugsquelle für Informationen über das Firefox für Android Projekt selbst ist die Wikiseite des Projekts.

+ +

Sie können uns helfen Firefox für Android zu gestalten und zu verbessern:

+ + + +

Entwickeln für das mobile Web

+ +

Wir haben begonnen eine Anleitung zum Gestalten von Websites für Mobilgeräte zusammenzuschreiben.

+ +

Mit Firefox für Android erhalten Sie Zugang zu einer Reihe von APIs, die das unterliegende Leistungsvermögen des Gerätes zum Vorschein bringen und somit die Lücke zwischen Web und systemeigenen Anwendungen schließen:

+ + + +

Um Ihre Website auf Firefox für Android zu testen, können Sie ihn auf Ihrem Android Gerät installieren oder ihn auf ihrem Desktop mithilfe des Android Emulators laufen lassen.

+ +

Erstellen mobiler Add-ons

+ +

Firefox für Android unterstützt Add-ons durch genau das gleiche Erweiterungssystem, das auch alle anderen Gecko-basierten Anwendungen verwenden. Wir haben kein neues Add-on-System erfunden. Das bedeutet, dass beim Erstellen eines Add-ons für Firefox für Android der gleiche Prozess verwendet wird wie für den Desktop Firefox. Add-ons, die im Desktop Firefox laufen, laufen nicht automatisch im Firefox auf Android. Die Benutzeroberflächen sind einfach zu unterschiedlich.

+ +
Firefox auf Android hat eine eindeutige Anwendungskennung, die in install.rdf angegeben werden muss. Die Kennung ist {aa3c5121-dab2-40e2-81ca-7ea25febc110}
+ +

Sowohl die klassischen Add-on-Herangehensweisen, die einen Neustart erfordern, als auch die neueren Add-on-Herangehensweisen, die ohne Neustart auskommen, werden unterstützt. Die Herangehensweise, die ohne Neustart auskommt, ist wann immer möglich die bevorzugte, weil gegenüber dem erzwungenen Anwendungsneustart beim Installieren und Entfernen von Add-ons das Nutzererlebnis hier weitaus besser ist.

+ +

Kurzer Überblick

+ + + +

Erhalten Sie Hilfe zu Firefox für Android

+ +

Dokumentationen und Tutoriale zur Verwendung und Fehlerbehebung von Firefox für Android sind auf der Mozilla Support Website verfügbar.

diff --git a/files/de/mozilla/index.html b/files/de/mozilla/index.html new file mode 100644 index 0000000000..64886b45c6 --- /dev/null +++ b/files/de/mozilla/index.html @@ -0,0 +1,12 @@ +--- +title: Mozilla +slug: Mozilla +tags: + - TopicStub +translation_of: Mozilla +--- +
+ {{draft}}
+

Das hier wird bald eine geniale Zielseite für internes von Mozilla sein. Aber momentan ist es das nicht.

+
+ {{ListSubpages}}
diff --git a/files/de/mozilla/javascript_code_modules/deutsch/index.html b/files/de/mozilla/javascript_code_modules/deutsch/index.html new file mode 100644 index 0000000000..361b8eaa94 --- /dev/null +++ b/files/de/mozilla/javascript_code_modules/deutsch/index.html @@ -0,0 +1,197 @@ +--- +title: Benutzung von JavaScript Code Modulen +slug: Mozilla/JavaScript_code_modules/Deutsch +tags: + - Anleitung + - Erweiterungen + - JavaScript + - XPCOM +translation_of: Mozilla/JavaScript_code_modules/Using +--- +
{{gecko_minversion_header("1.9")}}
+ +

Das Konzept von JavaScript Code Modulen wurde in {{Gecko("1.9")}} eingeführt und dient der gemeinsamen Verwendung von Code in unterschiedlichen Anwendungsbereichen. Module können außerdem dazu genutzt werden, globale JavaScript Singletons anzulegen, wofür früher JavaScript XPCOM Objekte nötig waren. Ein javaScript Code Modul ist nichts weiter als eine Sammlung von JavaScript code, der an einem bestimmten Ort abgelegt ist. Solch ein Modul wird mit Components.utils.import() oder Components.utils["import"]() in einen bestimmten JavaScript Anwendungsbereich geladen, etwa ein XUL oder JavaScript XPCOM Script.

+ +

Erstellen eines JavaScript Code Moduls

+ +

Ein sehr einfaches JavaScript Modul sieht so aus:

+ +
var EXPORTED_SYMBOLS = ["foo", "bar"];
+
+function foo() {
+  return "foo";
+}
+
+var bar = {
+  name : "bar",
+  size : 3
+};
+
+var dummy = "dummy";
+
+ +

Wie zu sehen ist, verwendet das Modul reguläres JavaScript, um Funktionen, Objekte, Konstanten und jeden anderen JavaScript Datentyp anzulegen. Das Modul definiert außerdem eine spezielle Variable namens EXPORTED_SYMBOLS. Alle JavaScript Objekte, die in EXPORTED_SYMBOLS angeführt sind, werden aus dem Modul exportiert und in den Anwendungsbereich geladen, der das Modul einbindet. Ein Beispiel:

+ +
Components.utils.import("resource://app/my_module.jsm");
+
+alert(foo());         // displays "foo"
+alert(bar.size + 3);  // displays "6"
+alert(dummy);         // displays "dummy is not defined" because 'dummy' was not exported from the module
+
+ +
Hinweis: Wenn Änderungen an einem Modul getestet werden sollen, muss immer darauf geachtet werden, die Versionsnummer der Anwendung zu erhöhen. Andernfalls kann es passieren, dass die vorherige Version des Moduls verwendet wird.
+ +

Die URL eines Code Moduls

+ +

Wie im obigen Beispiel ersichtlich ist, benötigt man für den Import eines Code Moduls eine URL. (Die URL im Beispielcode ist "resource://app/my_module.jsm".)

+ +

Code Module können nur mit einer chrome: ({{gecko_minversion_inline("2")}}), resource:, oder file: URL geladen werden.

+ + + +

Gemeinsame Verwendung von Objekten

+ +

Eine besonders wichtige Eigenschaft von Components.utils.import() ist es, dass Module beim erstmaligen Importieren im Zwischenspeicher abgelegt werden und alle weiteren Importvorgänge diese gespeicherte Version verwenden anstatt das Modul neu zu laden. Das bedeutet, dass das Modul von allen Anwendungsbereichen die es importiert haben, gemeinsam verwendet wird. Alle Änderungen von Daten, Objekten oder Funktionen sind in jeden Anwendungsbereich, der das Modul benutzt, sichtbar. Wenn wir beispielsweise unser einfaches Modul in zwei JavaScript Bereichen importieren, können Änderungen aus einem Bereich auch im anderen Bereich beobachtet werden.

+ +

Bereich 1:

+ +
Components.utils.import("resource://app/my_module.jsm");
+
+alert(bar.size + 3);  // displays "6"
+
+bar.size = 10;
+
+ +

Bereich 2:

+ +
Components.utils.import("resource://app/my_module.jsm");
+
+alert(foo());         // displays "foo"
+alert(bar.size + 3);  // displays "13"
+
+ +

Durch diese Eigenschaft können Module als Singleton Objekte verwendet werden um Daten zwischen verschiedenen Fenstern, oder auch zwischen XUL Scripten und XPCOM Objekten, auszutauschen.

+ +

{{Note("Jeder Bereich, der ein Modul importiert, erhält eine Kopie (by-value) aller exportierten Symbole des Moduls. Änderungen der Werte in dieser Kopie werden nicht an andere Bereiche weitergeleitet (allerdings werden Objekteigenschaften per Referenz manipuliert).")}}

+ +

Bereich 1:

+ +
Components.utils.import("resource://app/my_module.jsm");
+
+bar = "foo";
+alert(bar);         // displays "foo"
+
+ +

Bereich 2:

+ +
Components.utils.import("resource://app/my_module.jsm");
+
+alert(bar);         // displays "[object Object]"
+
+ +

Der Haupteffekt dieser by-value Kopie besteht darin, dass globale Variablen eines einfachen Typs nicht in allen Bereichen geteilt werden. Variablen sollten daher immer in eine Wrapper Klasse gehüllt werden (siehe bar im obigen Beispiel).

+ +

{{h2_gecko_minversion("Code Module Entladen", "7.0")}}

+ +

Mit Components.utils.unload() kann ein zuvor importiertes Modul wieder entladen werden. Nach dem Aufruf dieser Funktion sind zwar alte Referenzen auf das Modul weiterhin gültig, aber ein nachträgliches Importieren wird das Modul neu laden und ihm auch eine neue Referenz zuweisen.

+ +

Beispiele

+ + + +

Erweiterung von resource: URLs

+ +

Vor der Einführung von {{Gecko("2.0")}} war der übliche Weg, ein Modul einzubinden, die resource: URL. Die grundlegende Syntax sieht wie folgt aus:

+ +
resource://<alias>/<relative-path>/<file.js|jsm>
+
+ +

<alias> bezeichnet einen Ort, üblicherweise einen physikalischen Ort relativ zur Anwendung oder der XUL Laufzeitumgebung. Die XUL Laufzeitumgebung bietet verschiedene vordefinierte Aliase:

+ + + +

Der Pfad in <relative-path> kann beliebig tief sein und ist immer relativ zum in <alias> angegbenen Ort. Der übliche relative Pfad, der auch von XUL Runner und Firefox verwendet wird, ist "modules". Code Module sind einfache JavaScript Dateien mit einer .js oder .jsm Dateiendung.

+ +

Das verwendete <alias> muss für jede Erweiterung einzigartig sein, da alle definierten Alias Werte aller Anwendungen und Erweiterungen in einem gemeinsamen Namespace gespeichert werden.

+ +

Mittels chrome.manifest

+ +

Die einfachste Möglichkeit, ein neues Alias für eine Erweiterung oder XUL Anwendung anzulegen, besteht darin, eine Zeile wie die Folgende in chrome manifest einzufügen:

+ +
resource aliasname uri/to/files/
+
+ +

Wenn zum Beispiel die XPI deiner foo Erweiterung einen top-level Ordner namens modules/ besitzt, in dem sich das bar.js Modul befindet (das beudeutet, der modules/ Ordner liegt neben chrome.manifest und install.rdf), kann ein Alias etwa so angelegt werden:

+ +
resource foo modules/
+
+ +

(Beachte den Schrägstrich am Ende!) Danach kannst du das Modul wie folgt in deinen JavaScript Code importieren:

+ +
Components.utils.import("resource://foo/bar.js");
+
+ +

Programmatisches Hinzufügen eines Alias

+ +

Aliase auf Pfade, die als {{interface("nsILocalFile")}} dargestellt werden können, können auch programmatisch angelegt werden. Zum Beispiel:

+ +
// Import Services.jsm unless in a scope where it's already been imported
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+var resProt = Services.io.getProtocolHandler("resource")
+                      .QueryInterface(Components.interfaces.nsIResProtocolHandler);
+
+var aliasFile = Components.classes["@mozilla.org/file/local;1"]
+                          .createInstance(Components.interfaces.nsILocalFile);
+aliasFile.initWithPath("/some/absolute/path");
+
+var aliasURI = Services.io.newFileURI(aliasFile);
+resProt.setSubstitution("myalias", aliasURI);
+
+// assuming the code modules are in the alias folder itself
+
+ +

Anmerkungen

+ +

Eigene Module und XPCOM Komponenten

+ +

In früheren Versionen als {{Gecko("2.0")}} werden JavaScript XPCOM Komponenten bereits vor der Chrome Registrierung geladen. Das bedeutet, dass Components.utils.import() nicht mit einer eigenen URL in einer Komponente verwendet werden kann. Eine mögliche Lösung des Problems besteht darin, den Aufruf von Components.utils.import() in den Konstruktor der XPCOM Komponente zu legen (Diskussion).

+ +

Packaging Anmerkungen

+ +

Unter normalen Umständen gibt es keinen guten Grund JavaScript Code Module in einer JAR Datei zu verpacken. Von Firefox 3.6 wird diese Form der Distribution gar nicht unterstützt. Nur in einem Anwendungsfall kann es sinnvoll sein, Module in JAR zu packen: In einer Erweiterung, die nur Firefox 4 unterstützt, und die ungepackt installiert werden muss. In allen anderen Fällen wird dadurch nur unnötigerweise die Kompatibilität zerstört.

+ +

CommonJS Module Importieren

+ +

Die hier beschriebenen JavaScript Code Module sind nicht zu verwechseln mit CommonJS modules, aber auch CommonJS Module können in jeden Bereich importiert werden, der Components.utils.import unterstützt. Der folgende Aufruf wird require() in deinen Anwendungsbereich importieren:

+ +
const { require } = Cu.import("resource://gre/modules/commonjs/toolkit/require.js", {})
+ +

Damit können danach andere CommonJS Module importiert werden. Auch Add-on SDK Module können auf die selbe Art importiert werden, wie aus einem SDK Add-on:

+ +
// import the SDK's base64 module
+
+var base64 = require("sdk/base64");
+base64.encode("hello"); // "aGVsbG8="
+ +

Auch andere CommonJS Module können importiert werden, solange der Pfad bekannt ist:

+ +
// import my module
+
+var myModule = require("resource://path/to/my/module.js");
+ +

In diesem Fall kann es aber ratsam sein, einen eigenen Loader zu entwickeln, damit das paths Attribut selbst gewählt werden kann.

+ +

Weiterführende Links

+ + diff --git a/files/de/mozilla/javascript_code_modules/index.html b/files/de/mozilla/javascript_code_modules/index.html new file mode 100644 index 0000000000..1a977f72f2 --- /dev/null +++ b/files/de/mozilla/javascript_code_modules/index.html @@ -0,0 +1,102 @@ +--- +title: JavaScript code modules +slug: Mozilla/JavaScript_code_modules +tags: + - Add-ons + - Extensions + - JavaScript + - Landing + - Modules + - NeedsTranslation + - TopicStub + - XPCOM +translation_of: Mozilla/JavaScript_code_modules +--- +

JavaScript code modules let multiple privileged JavaScript scopes share code. For example, a module could be used by Firefox itself as well as by extensions, in order to avoid code duplication.

+ +

General topics

+ +
+
Using JavaScript code modules
+
An introduction to how to use JavaScript code modules.
+
Components.utils.import
+
How to import a JavaScript code module.
+
Components.utils.unload
+
How to unload a JavaScript code module.
+
Code snippets: Modules
+
Examples of how to use code modules.
+
Mozilla Labs JS Modules
+
This page features a list of JS modules, along with download links and documentation, that extension developers can use in their code.
+
+ +
+
+ +

Standard code modules

+ +
+
AddonManager.jsm
+
Interface to install, manage, and uninstall add-ons.
+
AddonRepository.jsm
+
Allows searching of the add-ons repository.
+
Assert.jsm
+
Implements the CommonJS Unit Testing specification version 1.1, which provides a basic, standardized interface for performing in-code logical assertions with optional, customizable error reporting.
+
BookmarkHTMLUtils.jsm
+
Provides utility functions for importing and exporting bookmarks from the old-school "bookmarks.html" style bookmark files.
+
ctypes.jsm
+
Provides an interface that allows JavaScript code to call native libraries without requiring the development of an XPCOM component.
+
CustomizableUI.jsm
+
Allows you to interact with customizable buttons and items in Firefox's main window UI.
+
DeferredTask.jsm
+
Run a task after a delay.
+
Dict.jsm
+
Provides an API for key/value pair dictionaries.
+
DownloadLastDir.jsm
+
Provides the path to the directory into which the last download occurred.
+
Downloads.jsm
+
Provides a single entry point to interact with the downloading capabilities of the platform.
+
FileUtils.jsm
+
Provides helpers for dealing with files.
+
Geometry.jsm
+
Provides routines for performing basic geometric operations on points and rectangles.
+
HTTP.jsm
+
A wrapper for XMLHttpRequest that provides convenient and simplified API for dealing with HTTP requests.
+
JNI.jsm
+
Abstracts the js-ctypes to provide an interface that allows JavaScript code to call code running in native JVMs.
+
ISO8601DateUtils.jsm
+
Provides routines to convert between JavaScript Date objects and ISO 8601 date strings.
+
Log.jsm (formerly log4moz)
+
Provides a log4j style API for logging log messages to various endpoints, such as the Browser Console or a file on disk. This module was formerly
+
NetUtil.jsm
+
Provides helpful networking utility functions, including the ability to easily copy data from an input stream to an output stream asynchronously.
+
openLocationLastURL.jsm
+
Provides access to the last URL opened using the "Open Location" option in the File menu.
+
OSFile.jsm
+
Provides routines to access files. Read, write, rename, create directories, ...
+
PerfMeasurement.jsm
+
Provides access to low-level hardware and OS performance measurement tools.
+
PluralForm.jsm
+
Provides an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule.
+
PopupNotifications.jsm
+
Provides an easy way to present non-modal notifications to users.
+
Promise.jsm
+
Implements the Promises/A+ proposal as known in April 2013.
+
PromiseWorker.jsm
+
A version of {{domxref("ChromeWorker")}} which uses promises to return the worker's result instead of using an event to do so.
+
Services.jsm
+
Provides getters for conveniently obtaining access to commonly-used services.
+
source-editor.jsm
+
The Source Editor is used by developer tools such as the Style Editor; this interface implements the editor and lets you interact with it.
+
Sqlite.jsm
+
A Promise-based API to mozIStorage/SQLite.
+
Task.jsm
+
Implements a subset of Task.js to make sequential, asynchronous operations simple, using the power of JavaScript's yield operator.
+
Timer.jsm
+
A pure JS implementation of window.setTimeout.
+
Webapps.jsm
+
Provides an interface to manager Open Web Apps.
+
WebRequest.jsm
+
Provides an API to add event listeners for the various stages of making an HTTP request. The event listener receives detailed information about the request, and can modify or cancel the request.
+
XPCOMUtils.jsm
+
Contains utilities for JavaScript components loaded by the JS component loader.
+
diff --git a/files/de/mozilla/localization/index.html b/files/de/mozilla/localization/index.html new file mode 100644 index 0000000000..54d427c2de --- /dev/null +++ b/files/de/mozilla/localization/index.html @@ -0,0 +1,25 @@ +--- +title: Lokalisation bei Mozilla +slug: Mozilla/Localization +tags: + - Landing + - Localization + - Mozilla + - NeedsTranslation + - TopicStub + - Translation + - l10n +translation_of: Mozilla/Localization +--- +

Localization (L10n) ist die Übersetzung der Benutzeroberfläche von einer Sprache in die andere, um diese so einer anderen Sprache und Kultur anzupassen. Diese Quellen stehen jedem zur Verfügung, der sich für die technischen Aspekte der L10n interessiert - Entwicklern und Helfern

+ +

Siehe auch

+ +
+
Lokalisieren von MDN
+
Diese Ressource beinhaltet die Lokalization der Dokumentation hier bei MDN.
+
App localization
+
Diese Sammlung von Dokumenten bezieht sich genauer auf das Lokalisieren von Apps, inklusive Firefox OS apps.
+
L10n
+
Referenzdokumente für die L10n API, die Mozilla für das Lokalisieren von Firefox OS nutzt.
+
diff --git a/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html b/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html new file mode 100644 index 0000000000..46b60bbf1f --- /dev/null +++ b/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html @@ -0,0 +1,137 @@ +--- +title: Kodierungen für Lokalisierungsdateien +slug: Mozilla/Localization/Kodierung_fuer_Lokalisierungs-Dateien +tags: + - Internationalisierung + - Lokalisierung +translation_of: Mozilla/Localization/Encodings_for_localization_files +--- +

Beim Erstellen einer Lokalisierung für Mozilla Produkte ist es wichtig die Kodierung der Dateien zu beachten, die man generiert.

+ +

Im Allgemeinen sind Dateien im Mozilla Repository UTF-8 kodiert. Es gibt allerdings einige wenige Ausnahmen.

+ +

Installer

+ +

Der Windows Installer unterstützt UTF-8 nicht, sondern nur die von Windows vorgegebenen Zeichensatztabellen. Die Einbindung in den Erstellungsprozess ist kompliziert, daher hier einige Hinweise:  

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateiKodierungHinweise
toolkit/installer/windows/charset.mkASCIIDie Variable WIN_INSTALLER_CHARSET muss eine Kodierung haben, die mit dem Parameter CHARSET= aus toolkit/installer/windows/install.it übereinstimmt. Geeignete Werte siehe in der Tabelle unten. 
toolkit/installer/windows/install.it +

Eine Zeichensatztabelle von Windows. Der Parameter CHARSET= in dieser Datei und der Parameter WIN_INSTALLER_CHARSET in der Datei charset.mk müssen mit dem Zeichensatz übereinstimmen.

+
Die Parameter FONTNAME/FONTSIZE/CHARSET in dieser Datei müssen geeigete Werte haben. Für die meisten westlichen Zeichensätze sind die Werte "MS Sans Serif" und "8" sinnvolle Standardwerte. Für östliche Schriftsätze müssen geeignete Schriftarten aus dem Lieferumfang von Windows ausgewählt werden. Geeignete Werte für den Parameter CHARSET= siehe in der Tabelle unten.
browser/installer/installer.incUTF-8 
toolkit/installer/unix/install.itUTF-8{{ Deprecated_inline() }}
+ +

Native Windows-Kodierungen

+ +

Die nachfolgende Tabelle beinhaltet native Windows-Kodierungen und die jeweiligen Werte für WIN_INSTALLER_CHARSET und CHARSET=:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KodierungsbezeichnungWIN_INSTALLER_CHARSET (charset.mk)CHARSET= (windows/install.it)
ANSI_CHARSETCP12520
BALTIC_CHARSETCP1257186
CHINESEBIG5_CHARSETCP950136
EASTEUROPE_CHARSETCP1250238
GB2312_CHARSETCP936134
GREEK_CHARSETCP1253161
HANGUL_CHARSETCP949129
RUSSIAN_CHARSETCP1251204
SHIFTJIS_CHARSETCP932128
TURKISH_CHARSETCP1254162
VIETNAMESE_CHARSETCP1258163
Windows Sprachversionen Middle East:
ARABIC_CHARSETCP1256178
HEBREW_CHARSETCP1255177
Windows Sprachversionen Thai:
THAI_CHARSETCP874222
diff --git a/files/de/mozilla/localization/localization_content_best_practices/index.html b/files/de/mozilla/localization/localization_content_best_practices/index.html new file mode 100644 index 0000000000..d5b4c70dfc --- /dev/null +++ b/files/de/mozilla/localization/localization_content_best_practices/index.html @@ -0,0 +1,324 @@ +--- +title: Localization content best practices +slug: Mozilla/Localization/Localization_content_best_practices +translation_of: Mozilla/Localization/Localization_content_best_practices +--- +
+

 

+ +

Dieses Dokument stellt Entwicklern bewährte Methoden zum Erstellen von standortabhängigem Code bereit und beschreibt wie man häufige Fehler, bei der Lokalisierbarkeit verhindert.

+
+ +
+

Note: If you're a localizer and you want to contribute to the localization of Mozilla products, you might want to read our Localization quick start guide for information on localizing Mozilla code.

+
+ +

Note on localizers

+ +

Mozilla localizers a volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with VCS systems.

+ +

It's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details.

+ +

Localization files

+ +

Choose good key IDs

+ +

The IDs (names) chosen for your keys, regardless of the file format, should always be descriptive of the string, and its role in the interface (button label, title, etc.). Think of them as long variable names. When you have to change a key ID, adding a progressive number to the existing key should always be used as a last resort. For example, suppose this string needs to be changed from "Event" to "Add New Event":

+ +
new-event-header = Event
+ +

add-new-event-header is definitely a better choice for the new string than new-event-header1.

+ +

If a string is tied to an accesskey or a tooltip, use string IDs that highlight this relation:

+ +
neweventbtn.label = Add event
+neweventbtn.accesskey = A
+neweventbtn.tooltip = Add a new event
+
+ +

Don't duplicate IDs

+ +

If you're adding new strings, check that you're not duplicating an existing ID. Depending on the parser logic, one of these two translations will be ignored.

+ +

Add localization notes

+ +

Localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too. These comments are generally referred to as localization notes.

+ +

Don't forget to add a localization note when:

+ + + +

There is an established format for localization comments: it's important to follow the format as closely as possible, since there are a number of automated tools that parse these comments for easier access and use by localizers.

+ +

DTD files

+ +
<!-- LOCALIZATION NOTE (entity name): \{{privacy}} will be replaced at run-time by an
+     active link. the string 'privacy-link' will be used as text for this link. -->
+
+ +

Properties files

+ +
# LOCALIZATION NOTE(privacy-text): \{{privacy}} will be replaced at run-time by an
+# active link. the string 'privacy-link' will be used as text for this link.
+privacy-text = By proceeding you accept the \{{privacy}}.
+privacy-link = Privacy Terms
+
+ +

File-wide comments should use the same format, they should be at the top of the file (after the license header) and just drop the (entity name/key) reference.

+ +

Land good quality strings

+ + + +

Use Unicode characters over their ASCII counterparts when possible

+ +

Strings should use directional quotation marks when possible.

+ + + +

Non-directional single, and double, quotation marks should be used in reference to HTML code, or other languages where ASCII character usage is required, such as HTML. HTML does not prefer one over the other, and our codebase uses them interchangeably as of March 2016.

+ + + +

U+2026 (\u2026) is the horizontal ellipsis character. This character should be used in place of three consecutive periods.

+ +

Create localizable strings

+ +

Don't assume grammar structures

+ +

You need to consider the need for different grammar structures in different locales, and add switching mechanisms to present them appropriately. You shouldn't make assumptions as to what those structures will be: instead, let locales/localizers decide. When in doubt, ask the localizers.

+ +

Date and time formats

+ +

For example, you shouldn't hard code date formats into applications:

+ +
%A, %b %e
+// resulting in Wednesday, May 20
+ +

This is fine in English, but in Italian results in "Mercoledì, Mag 20", which sounds unnatural. Every time you use this kind of structure, you should have a localizable string behind it, and let localizers decide the best order for their language.

+ +

Units

+ +

Another example is localizing percentages or units. Some locales use a space between the number and the % symbol, some don't, some use a non-breaking space.

+ +

Splitting

+ +

Splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate. When a composite string is needed, try to give the translators "room to move".

+ +

Word Order

+ +

If a string will contain a placeholder, always add the placeholder to the string to allow the localizer to change the word order if necessary. For example, it might seem ok in English to present the strings [username] says: to localizers simply as says: but this will cause serious issues in many other languages as the agent of an action often will not come in front of the verb, but some other position. For example in Irish/Gaelic the correct order is be [username] at saying:. If a placeholder is present, this can be correctly localized as Tá %s ag rádh: but not without.

+ +

Similarly, if the UI string is Flash Version, do not simply present the translator with Version for translation. Present the whole string or, if there is a significant need for a placeholder, use a placeholder. the word Version may have to go before or after Flash and one or both may need to be inflected.

+ +

Idiom

+ +

Idiom, in a loose sense, also has an impact on localization if it leads to strings being prepared in a way that renders them unlocalizable. For example, in English all the following begin with the same clause: The URL of this feed is invalid; The URL of this feed cannot be reached; The URL of this feed cannot be parsed. It might be tempting to 'save time' by presenting this as The URL of this feed %s and then is invalid; cannot be reached and cannot be parsed. However, linguistically these are different types of sentences and will be handled differently in other languages. This is usually not a case of translator choice but obligatory in the language. For example, in Gaelic these sentences must be translated as Tha URL an inbhir seo mì-dhligheach;Cha ruig sinn URL an inbhir seo and Cha ghabh URL an inbhir seo a pharsadh.

+ +
+

Unless there are significant savings of translation volume involved, it is usually easier and quicker for translators to handle these as fixed strings rather than composed strings, especially considering the time needed for locating, checking and potentially fixing composed strings.

+
+ +

Case and inflections

+ +

(Also see section on Placeholders)

+ +

Many languages have features like noun classes (i.e. nouns belonging to different categories and are treated differently by the grammar), case and inflections (changes are made to a word to indicate differences in meaning or use) and so on. In modern English, such features are rare and are mainly restricted to plural -s and verb forms (e.g. go > went is a form of inflection). Examples from other languages:

+ + + +
+

Implication: Using placeholders for something like 'the text' or 'the file' works well in English but is likely to cause severe headaches for localizers if the placeholders cannot be inflected.

+
+ +

Use proper plural forms

+ +

Firefox supports proper plural forms. As a native English speaker, you might find it natural to use

+ +
delete-cookie = Delete cookie
+delete-cookies = Delete cookies
+
+ +

In Firefox this should be

+ +
# LOCALIZATION NOTE (delete-cookies): Semi-colon list of plural forms.
+# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
+# #1 is the number of cookies to delete
+# example:
+delete-cookies = Delete #1 cookie;Delete #1 cookies
+ +
+

Important: always include the localization note with this format if you use a plural form in Firefox. This comment is used by tools to identify strings with plural forms.

+
+ +

One last advice: never use plural form as a replacement for single/multiple conditional. See {{ Bug("658191") }} for more details.

+ +

Use ordered variables in string with multiple variables

+ +

Consider this string from /browser:

+ +
generalSiteIdentity=This website is owned by %S\nThis has been verified by %S
+ +

First thing: always add a localization comment explaining what these variables mean, even if it seems obvious. Using multiple %S give the impression that the order of variables if fixed, which is actually not.

+ +
# LOCALIZATION NOTE(generalSiteIdentity): %1$S is the owner of the current website,
+# %2$S is the name of the Certification Authority signing the certificate.
+generalSiteIdentity=This website is owned by %1$S\nThis has been verified by %2$S
+ +

Avoid concatenations, use placeholders instead

+ +

Consider this string:

+ +
tos-text = By proceeding you accept the
+tos-link = Terms of Services
+
+ +

Most developers would consider this a good solution and display the concatenation of tos-text+tos-link, with an active link on the second part. Unfortunately, this won't work at all: you need at least a third string to place after the link, without that some languages won't be able to create a natural sounding sentence.
+
+ A much more flexible solution would be:

+ +
# LOCALIZATION NOTE(tos-text): \{{link}} will be replaced at run-time
+# by an active link. String with ID 'tos-link' will be used as text
+# for this link.
+tos-text = By proceeding you accept the \{{link}}
+tos-link = Terms of Services
+ +

And then replace \{{link}} at run-time with the second string. Note also the localization comments and make sure it is clear to the localizer which placeholder string will appear in lieu of the placeholder as this may affect translation and/or inflection. For example, By proceeding you accept the \{{Terms of Service}} will result in the Gaelic translation Ma leanas tu air adhart, bidh tu a' gabhail ri \{{teirmichean na seirbheise}}. But in another grammatical context, \{{Terms of Service}} may require a different inflection, for example \{{theirmichean na seirbheise}}. So if the localizer is left unsure as to which string goes into which placeholder, this may lead to bad translations.

+ +

Don't reuse strings in different contexts

+ +

This is particularly important for mobile, where different context often means different font and available space for the string. For example, if you're adding a new menu item in Settings on Android, don't use the same string for the menu item and the following screen header.

+ +

Another example, some locales use nouns for titles, and verbs for actions (for example button labels). Sometimes they coincide with English, but they rarely do in other languages. Take Bookmark: it can be both a noun and a verb in English. A developer could be tempted to reuse the same string "Bookmark" in the button to add a bookmark, and in the header for the next dialog. This won't work in some languages.

+ +

Avoid unnecessary complexity in strings

+ +

Consider this string:

+ +
privacy-link = <p>By proceeding you accept the <a href="https://www.mozilla.org/privacy" class="external">Privacy Terms</a>.</p>
+ +

In this case, you shouldn't put the URL inside the localization string, unless you need it to be localizable. If you change the URL, you're going to need a new string ID; the same goes for the anchor's attributes, or the paragraph markup. Instead, you should use the following strings

+ +
# LOCALIZATION NOTE(privacy-text): \{{link}} will be replaced at run-time
+# by an active link. String with ID 'privacy-link' will be used as text
+# for this link.
+privacy-text = By proceeding you accept the \{{link}}.
+privacy-link = Privacy Terms
+ +

And then replace {{link}} at run-time with the link.

+ +

Don't hardcode characters

+ +

Typically white spaces, commas, or other separators (":", "|").

+ +

If you need a trailing white space in a string, use the Unicode character \u0020 (that's usually a bad sign, you're concatenating it to another string). At some point, someone will accidentally trim that whitespace.

+ +

Remove unused strings

+ +

If you're removing features, don't leave around unused strings in the .properties file.

+ +

Tooltips

+ +

If a string is used as a tooltip, it should not end in a period (in English). Tooltips are never written in imperative mood but infinitive mood instead. Hence the proper absence of periods to indicate this isn't just a matter of consistency for en-US, as it is also vital info for localizers.

+ + + +

The labels on controls and menu titles, menu option strings, and so forth should not end in periods (in English). These are generally not complete sentences, but instead, phrases that convey the idea of a concept or action. Therefore, for both correctness and consistency within en-US, please leave out the trailing periods for these items. This also helps with localization.

+ +

Developer tools key shortcuts

+ +

When translating Firefox strings from /devtools/ folder, you may see some keys like this:

+ +
inspector.searchHTML.key=CmdOrCtrl+F
+ +

The first part of the string `CmdOrCtrl` should not be translated. You may only translate the letter to better match your locale. This key shortcut definition matches the Electron key shortcut definition.

+ +

Create localizable UI

+ +

CSS issues

+ +

Some CSS text/font properties may cause problems with text legibility when applied to certain language texts.

+ + + +

Design for +50%

+ +

Bear in mind that English strings will likely be a lot shorter than their international equivalents, so you need to leave some space in your UI to allow for this. Some examples:

+ + + +

Another good example is Yes/No. There are two types of languages, those that have Yes/No as a single word, and those that don't and work on mirroring the verb. For example, a Do you want to open the page? > Yes/No dialog works in English, but in Gaelic/Irish/Welsh and several other languages the equivalent answer is Want/Not want.

+ +

W3C has a good guide on the length ratios a developer should be prepared for.

+ +

Test localizability

+ +

As a developer, you should always test your patches not just for code errors, but also for localizability issues in case they involve string or UI changes.

+ +

Gecko and mozilla-central

+ +

First, make sure that there are no hard-coded strings, and all strings are available in localization files (.dtd, .properties). One possible way to test a patch for localizability issues is to alter the en-US localization files, adding extraneous characters to the original strings: this can help to identify both hard-coded strings and "flexibility issues" in the UI.

+ +

Changing existing strings

+ +

Updating Entity Names

+ +

If you are changing a string such that its meaning has changed, you must update the entity or property name for the string to match the new meaning. If your changes are relevant only for English — for example, to correct a typographical error or to make letter case consistent — then there is generally no need to update the entity name.

+ +

Changing the string ID will invalidate the existing translation, the new string will be reported as missing in all tools, and localizers will have to retranslate it. Given the diversity of tools used by localization teams, this is the only reliable method to ensure that localizers update existing localizations.

+ +

If you change the entity or property name of a string, you must also update all instances where that entity or property name is used in the source code, including localization comments.

+ +

If you change the entity or property name of a string, and the string has an accompanying access key, command key, or tooltip, you should update their names as well for consistency. This change is fundamental for access keys, since many localization tools use the entity name to connect an access key to its label. For example, to check if it's using a character not available in the original string, given entities "useBookmark.label" and "useBookmark.accesskey", if you change to "chooseBookmark.label" due to a string change, change the access key entity to "chooseBookmark.accesskey" to match it.

+ +

String freeze

+ +

Some repositories are considered to be string-frozen. This means that string changes are not allowed to land, and each case must be evaluated before landing. As a general rule, it's recommended to fix strings on the trunk/master repository, and create ad-hoc patches for string frozen repositories that don't involve string changes. Note that even removing strings is considered a breakage.

+ +

In the case of Firefox and Thunderbird, string frozen repositories are: mozilla-aurora, mozilla-beta, mozilla-release.

+ +

Bugzilla and l10n

+ +

Do I need l10n feedback?

+ +

Feedback from l10n-drivers is not necessary for each landing involving strings, as long as you're following the basic rules described in this document. If you have doubts about the localizability of some text or structure (not about the text itself, that would need copywriters), it's definitely good to ask feedback.

+ +

Keywords: l12y, late-l10n

+ +

Two keywords are generally used on Bugzilla:

+ + + +

Alias :l10n

+ +

The :l10n alias on Bugzilla (community@localization.bugs) is followed by some localizers and it could be CC'd to gather opinions from the wider l10n community (no point in opening NEEDINFO or requiring actions from this alias). There is also a dev-l10n mailing list and a #l10n channel on IRC, they might be a good place to ask questions.

diff --git a/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html b/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html new file mode 100644 index 0000000000..6f7835ed1b --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html @@ -0,0 +1,252 @@ +--- +title: Lokalisierung mit Mercurial +slug: Mozilla/Localization/Lokalisierung_mit_Mercurial +translation_of: Mozilla/Localization/Localizing_with_Mercurial +--- +

Für Mozillla verwenden wir das Versionskontrollsystem von Mercurial (Hg) zur Verwaltung des Quellcodes und der Lokalisierungen. Mit Mercurial können Lokalisierer lokal arbeiten (auf dem eigenen Rechner) und dann die Änderungen an ein Remote-Repository hochladen (push), das überlicherweise auf den Mozilla-Servern (hg.mozilla.org) gehostet wird. Für die Lokalisierung aktueller Versionen von Firefox, Thunderbird und SeaMonkey wird Mercurial verwendet. Falls die Dokumentation unvollständig ist oder du Fragen hast, schau bitte bei den #l10n- oder #hg-Kanälen oder auf irc.mozilla.org vorbei. Es lohnt sich auch die Mercurial FAQ zu lesen, falls du auf ein Problem stoßen solltest.

+ +

Für die Motivierten und Schnellen unter euch folgen hier Anweisungen zur Installation und Konfiguration von Mercurial, eine Anleitung dazu, wie man Hochlade-Rechte für seinen Hg-Account erhält und einige Aufgaben, die ohne Account-Rechte erfüllt werden können.

+ +

Mercurial installieren

+ +

Befolge die nachfolgenden Anweisungen um Mercurial auf deinem System zu installieren. Sobald du mit der Installation von Mercurial fertig bist, zeigen wir dir Schritt für Schritt wie man Mercurial konfiguriert.

+ +

Mercurial unter Linux

+ +

Mit einem der folgenden Befehle ist es ganz einfach möglich Mercurial aus der Befehlszeile  heraus zu installieren. Wähle den zu deiner Distribution passenden Befehl aus und stelle sicher, dass das Terminal als root läuft.

+ +
# Debian/ubuntu
+$ apt-get install mercurial
+
+# Fedora
+$ yum install mercurial
+
+# Gentoo
+$ emerge mercurial
+
+# Arch Linux
+$ pacman -S mercurial
+
+# OpenSolaris
+$ pkg install SUNWmercurial
+
+ +

Wenn du eine grafische Oberfläche bevorzugst kannst du MercurialEclipe hier herunterladen und istallieren.

+ +

Hat es funktioniert?

+ +

Öffne ein Terminalfenster und gib folgenden Befehl ein: hg --version. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. Mercurial Distributed SCM (version 1.3.1)), war die Installation von Mercurial erfolgreich.

+ +

Weitere Details

+ +

Weitere Details zur Installation von Hg auf Linus-Systemen findest in den Anweisungen auf der Download-Seite von Mercurial

+ +

Mercurial unter Windows

+ +

Unter Windows gibt es zwei Möglichkeiten zur Installation:

+ + + +

Mercurial Installer.pngBei derr Befehlszeileninstallation von Hg unter Windows ist es wichtig sicherzustellen, dass sich die ausführbare Datei von hg in der Variable %PATH% des Systems befindet (für TortoiseHg is dieser Schritt nicht nötig). Verwende das Hilfsprogramm add_path.exe, das unter C:\mozilla-build\hg zu finden ist, um diesen Schritt auszuführen.

+ +
PS C:\Users\your_id> cd C:\mozilla-build\hg
+PS C:\mozilla-build\hg> .\add_path.exe /result .
+
+ +

Beachte, dass der Punkt (".") am Ende des zweiten Befehl für das aktuelle Verzeichnis steht. Wenn das Hilfsprogramm %PATH% erfolgreich modifiziert hat, öffnet sich ein Dialog mit der Meldung "%PATH% wurde korrekt aktualisiert".

+ +

Alternativ kann die Variable %PATH% auch manuell bearbeitet werden. Klicke hierfür mit der rechten Maustaste auf den Eintrag Computer im Startmenü, gehe zu Eigenschafte > Erweitert > Umgebungsvariablen, wähle PATH und klicke auf Bearbeiten. Wenn xx in der Auswahl nicht angezeigt wird, musst du auf Hinzufügen klicken und die Bearbeitung innerhalb des Dialogs Hinzufügen vornehmen (Beispiel siehe Screenshot).
+ PATH.jpg

+ +

Hat es funktioniert?

+ +
    +
  1. Gehe zu Start > Ausführen...
  2. +
  3. Gib cmd.exe ein und klicke auf OK. Ein neues Shell-Fenster sollte erscheinen.
  4. +
  5. Gib im neuen Shell-Fenster hg --version ein. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. Mercurial Distributed SCM (version 1.3.1)), war die Installation von Mercurial erfolgreich.
  6. +
+ +

Weitere Details

+ +

Weitere Details zur Installation von Hg unter Windows findest in den Anweisungen auf der Download-Seite von Mercurial.

+ +

Mercurial unter Mac OSX

+ +

Die Installation von Hg unter Mac OSX ist sehr einfach. Mit Hilfe von MacPorts kann Mercurial über das Terminal mit folgendem Befehl installiert werden:

+ +

$ sudo port install mercurial

+ +

Es ist außerdem möglich Mercurial über die dmg-Datei von der Hg Download-Seite zu installieren. Hier wird man über einen Installations-Dialog Schritt für Schritt durch den Prozess geleitet.

+ +

Wenn du eine grafische Oberfläche bevorzugst, kannst du MercurialEclipse hier herunterladen und installieren.

+ +

Hat es funktioniert?

+ +

Öffne ein Terminal-Fenster und gib folgenden Befehl ein: hg --version. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. Mercurial Distributed SCM (version 1.3.1)), war die Installation von Mercurial erfolgreich.

+ +

Weitere Details

+ +

Weitere Details zur Installation von Hg unter Mac OSX findest in den Anweisungen auf der Download-Seite von Mercurial.

+ +

Mercurial konfigurieren

+ +

Sobald Mercurial installiert wurde, muss es konfiguriert werden, um genutzt werden zu können.

+ +

Die Mercurial-Konfiguration befindet sich in einer config-Datei, die du selbst erstellen musst. Je nach Betriebssystem heißt die config-Datei entweder ~/.hgrc (UNIX-Systeme) oder Mercurial.ini (Windows).

+ +

Die config-Datei sollte die folgenden Einstellungen haben:

+ +
[ui]
+username = Your Real Name <user@example.com>
+merge = internal:merge
+
+[defaults]
+commit = -v
+
+[diff]
+git = 1
+showfunc = 1
+unified = 8
+ +

Befolge folgende Schritte für die Konfiguration von Hg: 

+ +
    +
  1. Erstelle eine neue Datei in einem Texteditor deiner Wahl. 
  2. +
  3. Kopiere die Einstellungen oben und füge sie in diese neue Datei ein. 
  4. +
  5. Speichere die Datei entweder unter dem Namen .hgrc (UNIX-Systeme) oder Mercurial.ini (Windows) und lege Sie in unter $HOME/ oder C:\mozilla-build\hg\ or C:\Program Files\Mercurial\ ab.
  6. +
+ +

Wenn die Installation und Konfiguration von Hg abgeschlossen ist, gibt es einige Aufgaben die ohne Upload-Rechte für Hg ausgeführt werden können. 

+ +

Repositorys klonen und aktualisieren

+ +

Es gibt ein paar Repositorys mit  en-US Quelldateien, die für die meisten Localea relevant sind:

+ + + +
+

Wenn man das comm-central Repository erstellt, beinhaltet dieses auch das mozilla-central repository. Es ist also möglich, das für die Entwicklung von Firefox, SeaMonkey und Thunderbird konfigurierte Repository zu verwenden, ohne mozilla-central ein weiteres Mal anlegen zu müssen. 

+
+ +

So erstellt (oder klont) man die en-US Quelldateien beim ersten Mal:

+ + + +
hg clone https://hg.mozilla.org/mozilla-central/
+
+ +

So wird das mozilla-central Repository ins Verzeichnis mozilla-central geklont.

+ + + +
hg clone https://hg.mozilla.org/comm-central/
+cd comm-central
+python client.py checkout
+
+ +

Der erste Befehl erstellt einen Klon des comm-central Repositorys. Der zweite Befehl führt dich zu diesem Verzeichnis. Der dritte Befehl erstellt einen Klon von mozilla-central und legt einige weitere hg-Repositorys an. Die anderen Verzeichnisse werden für SeaMonkey und Thunderbird benötigt.

+ + + +
hg clone https://hg.mozilla.org/l10n-central/ab-CD/
+ +

Lokale Repositorys aktualisieren

+ + + +
hg pull -u
+
+ +

Dieser Befehl ruft neue Changesets von mozilla-central ab und wendet diese Änderungen auf deine Arbeitskopie an.

+ + + +
python client.py checkout
+ +

Dieser Befehl ruft neue Changesets von comm-central, mozilla-central und anderen passenden Repositorys ab und wendet diese Änderungen auf deine Arbeitskopie an.

+ + + +
hg pull -u
+ +

L10n-Patches erstellen

+ +

Another thing you can do with Hg without needing account priviledges is creating L10n patches of your work for someone else to commit to your remote L10n repo on the Mozilla servers. Doing this ensures that your dashboards are always accurate, as they look at your remote repo.

+ +

Here's how to create a L10n patch with Hg and the Mq extension:

+ +
    +
  1. Enable Mq by adding hg.ext =  to your Mercurial config file (~/.hgrc on Unix-like systems or Mercurial.ini on Windows) under the [extensions] section.
  2. +
  3. Open your command line tool and navigate to your L10n directory.
  4. +
  5. Inside your L10n directory, init your repo with Mq by running hg init --mq.
  6. +
  7. To create a new patch, run hg qnew -m "Your commit message" patch-name.patch. The commit message should take the form of "Bug 123456 - Change this thing to work better by doing something; r=reviewers" if you are to fix a bug.
  8. +
  9. Make your change.
  10. +
  11. Once you finish making your change, run hg qrefresh to commit your changes to the patch.
  12. +
  13. Navigate to your <repository>/.hg/patches to find your .patch.
  14. +
  15. You may repeat from step 4 to create another patch. Your patches will be incremental, i.e. new patches are created based on old patches. If you want to commit all the patches to the repository and cleanup the patch queue, run hg qfinish.
  16. +
+ +

Please refer to MqTutorial and Mq documentation for further uses of Mq extension to manage patches.

+ +

Mercurial account priviledges

+ +

Eventually, you or your team leader will need Hg account priviledges. Let's face it, it's just more convenient to commit and push your work to the remote repo yourself, rather than creating patches and asking someone else to push them for you.

+ +

To get write access to the l10n hg repositories on the Mozilla server, there's a bit of paper work to be done. The localization team owner needs to file a bug requesting an hg account. This bug will request level 1 L10n priviledges. You need to follow the instructions regarding the contributor form. Write access to the hg repositories requires a ''voucher'', which, for the owner, will be done based on the review by Mozilla. For peers of a localization, the owner can vouch (once she or he is registered).

+ +

Sending changes to Mozilla

+ +

Now that you have Hg account privileges, you can send your work to Mozilla all by yourself. Here are the steps to send your L10n work using Mercurial:

+ +
    +
  1. Since your L10n work takes place in your own local repository, you should ensure that there are no changes made to the remote repository before committing your work. To do this, update your locale, as per the section above.
  2. +
  3. After finishing a change or set of changes and checking you have updated to the latest, you should commit by entering this command:
  4. +
+ +
hg commit -m "your message identifying the change (bug 555)"
+ +

Committing won’t send your changes to Mozilla’s repository, but prepares them for it. The next step will send your changes to your remote repo via push.

+ +
    +
  1. To push to mozilla-hosted repositories, you have to have committer access, and you must edit the file (your-local-hg-root AKA the directory you pulled your locale into)/.hg/hgrc (note, this is NOT your ~/.hgrc) to add these lines (replacing ab-CD with your locale code):
  2. +
+ +
[paths]
+default = https://hg.mozilla.org/l10n-central/ab-CD/
+default-push = ssh://hg.mozilla.org/l10n-central/ab-CD/
+
+ +
    +
  1. You’ll also need to tell ssh which account to use for your pushes, too, by editing ~/.ssh/config and adding these lines, where user@host.domain is your account:
  2. +
+ +
Host hg.mozilla.org
+User user@host.domain
+
+ +
    +
  1. Now you can push your work to the repository (and check the result on the dashboard) by entering this command from your local directory:
  2. +
+ +
hg push
+ +

And tah dah! You're done! Congratulations on finishing the tutorial. Take a break and grab a snack, you deserve it

diff --git a/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html b/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html new file mode 100644 index 0000000000..edd35eb17e --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html @@ -0,0 +1,135 @@ +--- +title: Lokalisierung von Pontoon +slug: Mozilla/Localization/Lokalisierung_von_Pontoon +translation_of: Mozilla/Localization/Localizing_with_Pontoon +--- +

Lokalisierung von Pontoon is a web-based, What-You-See-Is-What-You-Get (WYSIWYG), localization (l10n) tool. At Mozilla, we use Pontoon to localize all Mozilla products and websites, ranging from Firefox to Mozilla.org. Pontoon is a very simple and intuitive tool that requires little to no technical skill to use in the l10n workflow. Here we'll discuss how to use Pontoon to localize projects, from first sign-in to finalizing your contributions. Along the way, we'll point out some sweet features that will make you more efficient and make your l10n contributions easier.

+ +
+

Are you a developer? Read about implementing Pontoon in your project or learn how to get involved on GitHub.

+
+ +

First steps

+ +

Pontoon's home page is very easy to use. To begin localizing the project, click on the Persona icon and sign in. Next, simply select the project you want to work on and your locale from the dropdown menus. Pontoon will automatically open that locale's project for you to get started. Note that for our purposes here, we'll be using Firefox Affiliates website to demo Pontoon's functionality and workflow. And there it is, opened inside Pontoon:

+ +

Browser app and workspace

+ +

Main toolbar

+ +

As you can see, most of the interface is taken by the website being translated. Only the toolbar on top belongs to Pontoon, containing the following items (from left to right):

+ +

Main toolbar

+ +

List of strings

+ +

Opens a sidebar with a list of all strings to localize.

+ +

Project selector (Affiliates)

+ +

Switches between projects to localize.

+ +

Resource selector (Homepage)

+ +

Switches between project resources to localize, like subpages or localization files. Hidden if no resources available for project.

+ +

+ +
+
+ +

Locale selector (Slovenian)

+ +

Switches between languages to localize.

+ +

Go

+ +

Opens project-resource-locale selection.

+ +

Progress indicator

+ +

Displays your progress on the resource being localized. More details are available in the popup.

+ +
+
+ +

User menu

+ +

Allows for user-specific tasks, like commiting to repository, downloading files and signing out.

+ +

Info menu

+ +

Gives important information, like the anticipated project timeline and a list of keyboard shortcuts.

+ +
+
+ +

Alright, how about we do some translating now?

+ +
+
+ +

Translate strings

+ +

When using Pontoon for localization, you have a couple of options to translate your strings. You can translate in-context, out-of-context, or a combination of the two. We'll start with looking at in-context translation.

+ +

In-context

+ +

Pontoon's in-context translation mode is what puts it above others. It opens a web page (or web app) and enables real-time editing of that page. Here's how you translate your first string:

+ +

In-context localization

+ +
    +
  1. Hover over the text you want to translate with your mouse.
  2. +
  3. An edit button appears over that text. Click on it to enable the translate mode.
  4. +
  5. Replace the original text with its translation into your language.
  6. +
  7. Click the save button to save your translation.
  8. +
+ +
+

Out-of-context

+ +

Some strings are impossible to translate in-context, e.g. the contents of the <title> tag in websites and strings with placeables or different plural forms. By clicking on the hamburger icon in the main toolbar, a list of all strings and available translations will open in the sidebar. You can also use the sidebar for out-of-context localization:

+ +

Out-of-context localization: list Out-of-context localization: translate

+ +
    +
  1. Click on the string you'd like to translate.
  2. +
  3. Translation panel with original string and its details (e.g. comments) opens.
  4. +
  5. Translate the string in the translation area below.
  6. +
  7. Click the save button to save your translation.
  8. +
+ +

As you translate strings out-of-context, translations will also appear in website, if they could also be translated in-context.

+ +

Translation helpers

+
+ +

As you can see, suggestions from history, translation memory, machine translation and other locales are also available in the out-of-context translation panel. We call all of these translation helpers and here's how each of them will help you as you translate strings:

+ +

Translation helpers: History Translation helpers: Machinery Translation helpers: Other locales Translation helpers: Search

+ +

History

+ +

Displays previously suggested translations, including from other users.

+ +

Machinery

+ +

Displays matches from various services: internal translation memory, Mozilla Transvision, open source translation memory, Microsoft terminology and machine translation.

+ +

Other locales

+ +

Displays matching translations from other locales.

+ + + +

Almost like machinery, but takes provided keyword as input parameter instead of the original string.

+ +

By clicking a suggestion, it gets copied into translation area.

+ +
+
+ +

Publishing your localization

+ +

Suppose you now want to publish your l10n work by committing it to a repo. Pontoon lets you do that too! Actually, it does that for you by automatically syncing with repositories on hourly basis. You can now pat yourself on the back, do a little dance, go to sleep or do something else to celebrate your work!

diff --git a/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html b/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html new file mode 100644 index 0000000000..b11efae69b --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html @@ -0,0 +1,59 @@ +--- +title: Lokalisierung von XLIFF-Dateien für iOS +slug: Mozilla/Localization/Lokalisierung_von_XLIFF-Dateien +translation_of: Mozilla/Localization/Localizing_XLIFF_files +--- +

Firefox für iOS verwendet das XML-basierte Dateiformat XLIFF zur Speicherung und Weitergabe von Lokalisierungsdaten. XLIFF (eXtensible Localisation Interchange File Format) ist ein Lokaliserungsstandard, der von der Normungsorganisation OASIS verwaltet wird. Ziel dieses Standards ist ein XML-basiertes Dateiformat, das ohne das Risiko von Datenverlust oder -beschädigung zum Austausch von Lokaliserungsdaten zwischen verschiedenen Tools verwendet werden kann. Die meisten Übersetzungstools unterstützen den XLIFF-Standard, sodass die Lokalisierung von XLIFF-Dateien für Firefox für iOS einfach mit diesen Tools erfolgen kann. Die direkte Bearbeitung einer XLIFF-Datei ist recht simpel, besonders wenn man sich mit XML auskennt. Dieses Tutorial wird Schritt für Schritt zeigen wie Strings in einer XLIFF-Datei übersetzt werden. 

+ +

String-Repository für Firefox auf iOS

+ +

Die Datei firefox-ios.xliff befindet sich im SVN.

+ +
    +
  1. Entscheiden Sie, wo auf Ihrem lokalen Computer Sie die Kopie aus dem github-Repository speichern möchten und navigieren Sie im Terminal dorthin.
  2. +
  3. Geben Sie folgenden Befehl ein: git clone https://github.com/mozilla-l10n/firefoxios-l10n/your-locale-code/
  4. +
  5. Das Projekt firefox-os sollte sich nun zusammen mit der Datei firefox-ios.xliff in dem von Ihnen gewählten Ordner befinden.
  6. +
+ +

Übersetzen der XLIFF-Datei

+ +
    +
  1. Öffnen Sie die Datei firefox-ios.xliff in einem Texteditor Ihrer Wahl.
  2. +
  3. Fügen Sie im <file>-Tag das Attribut target-language mit dem Code Ihrer Locale als Wert hinzu (z. B. target-language="xx-XX"). Beachten Sie, dass es innerhalb eines XLIFF-Dokuments viele <file>-Tags geben kann. Jedes <file>-Tag muss das Attribut target-language mit dem Code Ihrer Locale als Wert enthalten (z. B. target-language="xx-XX").
  4. +
  5. Strings befinden sich zwischen <trans-unit>-Tags. Englische Quell-Strings befinden sich zwischen den Child-Tags <source>. Nachfolgend ein Beispiel einer solchen <trans-unit>. +
    <trans-unit id="Add to Bookmarks">
    +    <source>Add to Bookmarks</source>
    +</trans-unit>
    +
  6. +
  7. Ihre Übersetzung muss sich zwischen den Child-Tags <target> befinden. Gehen Sie die gesamte XLIFF-Datei durch und fügen Sie unter jedem <source>-Tag das Tagpaar <target></target> hinzu. Dies wird Ihnen helfen, die Strings auszumachen, die übersetzt werden müssen. Das Tagpaar <source> darf nicht gelöscht werden. +
    <trans-unit id="Add to Bookmarks">
    +    <source>Add to Bookmarks</source>
    +    <target>YOUR_TRANSLATION_HERE</target>
    +</trans-unit>
    +
    +
  8. +
  9. Fügen Sie die Übersetzungen der Strings zwischen den <source>-Tags zwischen die <target>-Tags darunter ein. Bitte beachten Sie, dass folgende Zeichenfolgen nicht übersetzt werden dürfen. +
      +
    1. $(SOME_TEXT_HERE) ein Variablenformat,
    2. +
    3. %1$@ ist ein weiteres Variablenformat.
    4. +
    5. <note>-Tags beinhalten Hinweise der Entwickler zur Lokalisierung und sollten nicht übersetzt werden. 
    6. +
    + +
    <trans-unit id="Add to Bookmarks">
    +    <source>Add to Bookmarks</source>
    +    <target>Agregar a marcadores</target>
    +    <note>No comment provided by engineer.</note>
    +</trans-unit>
    +
    +
  10. +
  11. Speichern Sie Ihre Übersetzungen regelmäßig.
  12. +
  13. Wenn Sie mit Ihrer Übersetzung fertig sind, ist es wichtig sicherzustellen, dass der XML-Code in der XLIFF-Datei valide ist (z. B. keine beschädigten Tagpaare enthält). Öffnen Sie die Datei in Firefoy, um eine Validitätsprüfung auszuführen und verbessern Sie alle Fehler, die gemeldet werden. 
  14. +
+ +

Hochladen der XLIFF-Datei

+ +
    +
  1. Laden Sie mit dem folgenden Befehl die übersetzte XLIFF-Datei in das Verzeichnis Ihrer Locale hoch: git commit -m "Commit message here" .
  2. +
  3. Speichern Sie Ihre Version im github-Repository: git push
  4. +
  5. Legen Sie die Füße hoch, gönnen Sie sich ein Bier (oder eine Limo) und seien Sie stolz darauf etwas Neues, Anderes und Aufregendes gemacht zu haben! 
  6. +
diff --git "a/files/de/mozilla/localization/programm\303\274bersetungen_mit_mercurial/index.html" "b/files/de/mozilla/localization/programm\303\274bersetungen_mit_mercurial/index.html" new file mode 100644 index 0000000000..f2dd7ac06d --- /dev/null +++ "b/files/de/mozilla/localization/programm\303\274bersetungen_mit_mercurial/index.html" @@ -0,0 +1,284 @@ +--- +title: Programmübersetzungen mit Mercurial +slug: Mozilla/Localization/Programmübersetungen_mit_Mercurial +translation_of: Mozilla/Localization/Application_Translation_with_Mercurial +--- +

{{draft}}

+ +

Herausfinden, wo Übersetzungen fehlen

+ +
    +
  1. Herausfinden, für welche Ableger der Mozilla-Familie noch Übersetzungen fehlen. Dazu sollte die Übersetzungsseite des verantwortlichen Sprachteams gelesen werden (dazu hier den richtigen Sprachcode - z. B. "de" für Deutsch - anklicken). Das Lokalisationstem kennt die Ableger. Der Standard-Lokalisationsableger ist aurora.
  2. +
  3. Als nächstes muss überprüft werden, was noch unübersetzt ist, dazu zur Lokalisations-Statusseite gehen und die Seite der Zielsprache aufrufen.
  4. +
  5. Im Abschnitt "Applications & Sign-offs" befinden sich verschiedene Produkte und deren Ableger, die noch nicht fertig übersetzt sind. +
      +
    • gaia-* bezeichnet Ableger von Firefox OS, dem Betriebssystem für Mobilgeräte.
    • +
    • Firefox und fx-* beueichnen Ableger vom Desktop-Firefox, dem Browser für PCs und Laptops auf Windows, Mac OS oder Linux.
    • +
    • Fennec und fennec-* bezeichnen Ableger vom mobilen Firefox, dem Firefoxbrowser für Android.
    • +
    • Thunderbird und tb-* bezeichen Ableger von Thunderbird, dem E-Mail-Programm, Newsgroup- und Feedreader und Chatprogramm. Die Lokalisation des Lightning Kalendar Add-Ons findet auch hier statt.
    • +
    • SeaMonkey und sea-* bezeichnen Ableger von SeaMonkey, der All-in-One Internetsuite, die Browser, E-Mail- und Chatprogramm und mehr enthält.
    • +
    • Lightning und cal-* bezeichnen Ableger von Lightning, dem Kalender Add-On für Thunderbird. Die Lokalisation von Lightning findet inzwischen in Thunderbirds tb-*-Teil statt, der cal-*-Bereich wird nicht länger verwendet.
    • +
    +
  6. +
  7. In diesem Beispiel soll der Aurora-Ableger des Desktop-Firefox übersetzt werden. Deshalb zu fx_aurora scrollen.
  8. +
  9. Der Text daneben zeigt den Übersetzungsstatus an. +
      +
    • Wenn dort 'Translated' steht, ist der Ableger schon fertig übersetzt. Nun können Sie entweder ein anderes Produkt übersetzen oder jemanden von der Lokalisationsseite (siehe oben) kontaktieren, damit er Sie informieren kann, wenn neue unübersetzte Texte vorhanden sind.
    • +
    • Wenn es ein roter Text ist, der aus einer Nummer und dem Wort 'missing' besteht, sind unübersetzte Texte vorhanden und die Anleitung kann weiter ausgeführt werden.
      +  
    • +
    +
  10. +
+ +

Required Tools

+ +

Build pre-requisites

+ +

First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from Build Instructions. This is only necessary once.

+ +
+

Install MozillaBuild 1.9.0pre from https://groups.google.com/forum/#!topic/mozilla.dev.platform/aIFUKRrb3IY

+
+ +
+

MozillaBuild must be installed into an absolute file path without whitespaces, else it will break.

+
+ +

File comparison program

+ +

For the translation, it is recommend to use file comparison program to compare the English file (containing the new texts) with the file of your locale (which is still missing the new strings). This example uses WinMerge: Download and install it. A comparison of alternatives (e.g. for Linux and Mac OS) is available on Wikipedia.

+ +

File and text editor

+ +

For editing individual files a text editor can be a better choice than a file comparion program, e.g. because the file is new and everything has to be translated, the file is too customized to compare it to the English one, or special functionality is required (e.g. bookmarking untranslated lines). Use a text editor you are comfortable with. This example uses Notepad++.

+ +

Progress tracking tool

+ +

To track which strings and files already have been translated and later also to see which new strings have already been tested in the product as being a good translation for the functionality behind the translated strings and that the translated texts fit into the available, the translation progress should be tracked. This can be done in a text editor or word processor or any other tool in which you can attach different kind of states to the individual texts to translate. The Firefox extension Scrapbook is used in this guide. Install it into your default Firefox profile (you will have more than one profile when following this guide).

+ +

Getting the current Texts in English and your Locale

+ +

Obtaining the English texts with the source code

+ +

Get the source code by downloading the following file:

+ + + +

In the next step, we will unpack the source code:

+ +
    +
  1. Open an input shell, e.g. by pressing the Windows key and R on the keyboard Screenshot of Windows key + R key or by calling the "Run..." command from the Windows "Start" button, and then typing cmd and pressing the Enter key.
  2. +
  3. Launch the installed MozillaBuild toolset by launching it with its path, e.g. C:\Mozilla\Coding\Buildtools\MozillaBuild\start-shell-msvc2010.bat You can autocomplete the file path after typing a few characters and then pressing the Tabulator key.
    + If you launch the start-shell-l10n.bat, compiling features will be disabled. You can create translation patches, but creating language packs for the application, binary repacks of the application (changing the localization of the program), and compiling the application likely won't work.
  4. +
  5. You are now in the Mozilla development environment which emulates a Linux environment. Now go to the directory where you want to put the source code. It's highly recommended to put it onto the fastest hard drive in the device. File paths here work starting with a slash (/) followed by the drive letter, and then the directory structure like on Windows, but using slashes (/) instead of backslashes (\). So let's go to C:\Mozilla by typing
    + cd /c/Mozilla/
  6. +
  7. Create a new directory for the source code:
    + mkdir mozilla-aurora
  8. +
  9. Initialize the new directory as new repository:
    + hg init mozilla-aurora
  10. +
  11. Go into the new directory:
    + cd mozilla-aurora
  12. +
  13. Unpack the source code:
    + hg unbundle /path/to/the/downloaded/mozilla-aurora.hg
    + This can take some time, mostly depending on the performance of the hard drive.
  14. +
+ +

Obtaining the texts of your localization

+ +
    +
  1. Go back to the parent folder of mozilla-aurora:
    + cd ..
  2. +
  3. Find the localization repository for your branch and language on http://hg.mozilla.org/ E.g. for aurora and German (language code 'de'), it is http://hg.mozilla.org/releases/l10n/mozilla-aurora/de/ Copy that url to the clipboard.
  4. +
  5. Copy the repository to your computer by running the following command:
    + hg clone http://hg.mozilla.org/releases/l10n/mozilla-aurora/de/ de-mozilla-aurora
    + This should proceed pretty fast.
    + On Windows, you can paste the url by calling the Paste command from the window menu in the upper left corner of the window.
  6. +
+ +

Configuring your Mercurial user settings

+ +

Still in the command prompt, go to your home directory in the file system, e.g. for a Windows user, it looks like C:\Users\MyName , depending on your Windows version:

+ +

cd /c/Users/MyName

+ +

Now list all the files here:

+ +

ls -l

+ +

If there is no file called .hgrc , create it with

+ +

> .hgrc

+ +

This file stores your general Mercurial settings (Mercurial is the tool which manages the source code and its history of changes).

+ +

Now go in the file system to the file and open it in your favorite text editor. Windows users can use e.g. Notepad++.

+ +

Paste the following content into the file:

+ +
[ui]
+username = Firstname Lastname <mynick@example.com>
+merge = internal:merge
+
+[alias]
+qexport = export -g -r qtip
+qexportall = diff -r qparent
+
+[defaults]
+commit = -v
+diff = -p -U 8
+qdiff = -p -U 8
+qnew = -U
+
+[diff]
+git = 1
+showfunc = 1
+unified = 8
+
+[extensions]
+hgext.mq =
+progress =
+
+[hooks]
+
+
+ +

Put in your name and email address which later will be public on the internet after your translation patch got accepted and uploaded. Save the file and close it.

+ +

Enabling Mercurial queues (revertable patches)

+ +

Some time will pass between the moment in which you start the localization, finish it, test it, improve it, upload it for review and get review (maybe not approved on first try). Other localizers will likely have done changes to the translation, either adding new texts, removing obsolete ones or improving the current texts. This can cause conflicts between the changes you created and theirs. For this reason, updating patches kann be necessary so Mercurial is still able to find the lines in the files which it has to replace or where it has to add them. Mercurial queues allow to revert changes and also pull changes and reapply your local changes.

+ +

Go back to the localization directory:

+ +

cd /c/Mozilla/de-mozilla-aurora

+ +

Initiate Mercurial queues:

+ +

hg qinit

+ +

Get to know the translation style

+ +

For having good chances that the translation suggestions get accepted, they should match the translation style of the texts in the application already translated. In general, the labels in the applications should have the same style like the operating system, e.g. use the same order of subject, verb and objects; decline verbs or not like the operating system does.

+ +

The following resources can help figuring out the translation style and translate according to them:

+ + + +

Choosing what to translate

+ +

Go to the Localization status page and click on the '<number> missing' label of the Firefox branch on which you want to translate, e.g. fx_aurora. The page which opens has a bar holding information about how many texts (strings) have already been translated, how many there are in English and your locale and have the same text, and how many are missing in your local. The interesting part follows below as list of missing texts.

+ +

unchanged localization report

+ +

The first line shows the locale for which the texts are bing translated (in this example: de - German). With the second line start the file paths of the files which require changes. The file paths follow the directory structure of the locale repository downloaded for translation. In this example, the file aboutDialog can be found in the folder browser/chrome/browser/. The text striked through are texts which have been removed in the English version and can also be removed from the locale being worked on. In this example we will translate the one new text with the id privatebrowsingpage.howToStart4 in the file aboutPrivateBrowsing.dtd.

+ +

Tips for finding files with usually easily translateable texts:

+ + + +

Tracking the translation progress

+ +

If you translate more than a few strings, you usually want to keep track of what has already been translated (and later if the text has been tested in the product as fitting into the available area and suiting the functionality it describes). This guide achieves this with the Firefox extension Scrapbook.

+ +
    +
  1. You installed Scrapbook earlier, now open it in Firefox either by calling it from the Firefox menu bar (press the Alt key to show it if necessary) using "View" > "Sidebar" > "Scrapbook" or by clicking its toolbar button which you likely have to add by toolbar customization if you didn't do this before.
  2. +
  3. Drag the tab with the localization error showing missing and obsolete strings to the sidebar.
  4. +
  5. After Scrapbook has saved the web page to your local disk, click with the right mouse button on the page in the sidebar and choose "Properties" from the context menu which gets opened. Rename it something meaningful, e.g. "Firefox <version number> translation".
  6. +
  7. After you saved the dialog, click with the left mouse button on the page in the sidebar to open the locally saved copy.
  8. +
+ +

Opening English files and the target locale side-by-side

+ +

The localization report shows the IDs of added or removed texts, but the English text itself is still unknown. We get this by comparing the English version of the file with the one of the locale we are translating in. To do so,

+ +
    +
  1. Launch WinMerge.
  2. +
  3. From its "File" menu, choose "Save project".
  4. +
  5. For the file path of the left directory, go to the downloaded mozilla-aurora source code and then into its browser/locales/en-US/ folder. In this example, the absolute file path is C:\Mozilla\mozilla-aurora\browser\locales\en-US.
  6. +
  7. Enable read-only mode for the left directory.
  8. +
  9. For the file path of the right directory, go to the downloaded translation directory de-mozilla-aurora and then into its browser folder. In this example, the absolute file path is C:\Mozilla\de-mozilla-aurora\browser.
  10. +
  11. Save this comparison as project so you can easily relaunch this comparision without selecting the directories again. A good name is e.g. translation-mozilla-aurora-browser.winmerge
  12. +
  13. Open the comparison you just saved.
  14. +
+ +

The translation

+ +
    +
  1. +

    Bring the console with Mercurial to the front.

    +
  2. +
  3. +

    Start tracking changes you make against the localization repository by telling it that with the qnew subcommand to save these changes as patch in a mercurial queue. This patch needs a name, choose something meaning full like "Firefox-<version number>-more-details". In this example, Firefox-29-aboutPrivateBrowsing will be used.
    + hg qnew Firefox-29-aboutPrivateBrowsing

    +
  4. +
  5. Switch back to WinMerge and navigate to browser/chrome/browser/ and open the aboutPrivateBrowsing.dtd file. You will see something like this:
    + single file comparision in WinMerge without changes by the user
    + On the left, you see an overview of the comparison of the English and the non-English file. Gray parts indicate blocks of texts which can't be found in that file, dark yellow represents changed lines and light yellow the parts of text in it which is different.
  6. +
  7. Below the license header which should never changed, the texts are organized in the following format:
    + <!ENTITY stringid "Text which will be shown in Firefox">
  8. +
  9. As you can see there is a bigger block of text not recognized. This is due to the texts which have in the English versionmoved from below the string with the id privatebrowsingpage.howToStart3 to a position above it. Cut and paste these strings in the localized file so their position corresponds to the on in the English file.
  10. +
  11. Press the F5 key or click the reload button in WinMerge's toolbar to re-compare the files.
  12. +
  13. Now copy the empty lines below privatebrowsingpage.learnMore and the line <!-- TO BE REMOVED POST-AUSTRALIS --> to the localized file. This text is a comment (which in .dtd files always can be found between <!-- and -->). There is no need to translate this text.
  14. +
  15. Now we copy the two missing lines from the English file and insert them in the localized file:
    + <!-- LOCALIZATION NOTE (privatebrowsingpage.howToStart4): please leave &newPrivateWindow.label; intact in the translation -->
    + <!ENTITY privatebrowsingpage.howToStart4               "To start Private Browsing, you can also select &newPrivateWindow.label; from the menu.">

    + The first line is a comment providing information on the localization of the text in the following line. &newPrivateWindow.label; has to be left unchanged so it can be replaced with the text of the string id &newPrivateWindow.label; whis is stored elsewhere.
  16. +
  17. Translation time: Translate the text. Afterwars, the line should look somehow like this:
    + <!ENTITY privatebrowsingpage.howToStart4               "Der private Modus kann auch über den Menü-Eintrag &newPrivateWindow.label; gestartet werden.">
  18. +
  19. Save the file.
  20. +
+ +

Exporting the changes as patch

+ +

A patch is a file containing recorded changes to a repository. It can be used to apply these changes to a copy of the repository yet without these changes.

+ +
    +
  1. Tell Mercurial to store the changes in the Mercurial queue with the qref command. We also create a commit message which will describe the changes in the patch and later get used when the patched gets checked in ('added') to the official repository with the localized files. For the commit message, we have to use the -m command line flag,
    + hg qref -m "Firefox 29: Localize missing string in aboutPrivateBrowsing.dtd"
    + You can change the commit message in the Mercurial queue every time by calling hg qref again.
  2. +
  3. Now export the patch to the file system using the qexport command which is defined in the .hgrc file (see above):
    + hg qexport > ../firefox-29-aboutPrivateBrowsing-v1.patch
    + This creates a patch file called firefox-29-aboutPrivateBrowsing-v1.patch containing the changes in the parent directory of de-mozilla-aurora (in this example: C:\Mozilla\).
  4. +
+ +

Proof-reading and altering the patch

+ +

Now proof-read the patch. This detects often more than 90 percent of the possible reasons for the reviewer to not accept the patch. If you find that changes have to be done, edit the real aboutPrivateBrowsing.dtd file from the localization repository, save it and follow the steps from Exporting the changes as patch (see above).

+ +

Validating the translation in the product

+ +

This guide hasn't yet a section about the validation of the translation. Please follow the instructions from the QA phase section of the Localization quick start guide.

+ +

Submitting the patch for review

+ +

Now the patch has to be shared so the people currently trusted to change the official translation can review the suggested changes.

+ +
    +
  1. File a bug ("ticket") in the Mozilla Localization product and choose as component the localization for which you have translated.
  2. +
  3. Choose a meaningful bug summary which will be shown for searches etc. like in this example "Firefox 29: aboutPrivateBrowsing.dtd"
  4. +
  5. Fill any important and additional information into the description field.
  6. +
  7. Click the 'Add attachment' button.
  8. +
  9. Select the exported patch file with the file picker. The checkbox for 'patch' should get automatically checked.
  10. +
  11. Add a meaningful name for the attachment, e.g. aboutPrivateBrowsing.dtd, patch, v1
  12. +
  13. Go to the review 'Flags' category and set the one for review to ?, meaning that you request review for the patch.
  14. +
  15. In the text field next to it, add the mail address of the person leading the translation of the locale. This information can be found on the page of the localization team.
  16. +
  17. Submit the bug report.
  18. +
  19. Now you have to wait for the review of that person. This can happen on the same day, on the next weekend or later, but should happen in the timeframe given for the localization of aurora. If the person requests changes, follow the instructions under Proof-reading and altering the patch. If the reviewer accepts the changes, the patch will get uploaded and your translation will officially be added to Firefox.
  20. +
diff --git a/files/de/mozilla/mathml_project/index.html b/files/de/mozilla/mathml_project/index.html new file mode 100644 index 0000000000..b1f0bf57d0 --- /dev/null +++ b/files/de/mozilla/mathml_project/index.html @@ -0,0 +1,72 @@ +--- +title: Mozilla MathML Project +slug: Mozilla/MathML_Project +tags: + - MathML + - MathML Project + - TopicStub +translation_of: Mozilla/MathML_Project +--- +

Das Mozilla MathML Project ist Mozillas Projekt, um MathML-Unterstützung mit Firefox und anderen Mozilla-basierten Applikationen zu erstellen und zu verbessern. Für einen schnellen Überblick, sehen Sie die Aufgaben für die Entwickler bei Mozilla Summit 2013.

+ +

Updates

+ +

Mathzilla

+ + + +

Community

+ + + + + + + +

Beispiel-MathML-Dokumente

+ + + +

MathML Dokumente erstellen

+ + + +
+

Original Document Information

+ + +
diff --git a/files/de/mozilla/mathml_project/mathml_torture_test/index.html b/files/de/mozilla/mathml_project/mathml_torture_test/index.html new file mode 100644 index 0000000000..f48515f89d --- /dev/null +++ b/files/de/mozilla/mathml_project/mathml_torture_test/index.html @@ -0,0 +1,1323 @@ +--- +title: MathML Härtetest +slug: Mozilla/MathML_Project/MathML_Torture_Test +tags: + - Beispiel + - Intermediate + - MathML +translation_of: Mozilla/MathML_Project/MathML_Torture_Test +--- +

MathML Härtetest

+ +
+

HTML Content

+ +
<p>
+  Render mathematics with:
+  <select name="MathFont" id="MathFont">
+    <option value="Default" selected="selected">Default fonts</option>
+    <option value="Asana">Asana</option>
+    <option value="Cambria">Cambria</option>
+    <option value="LatinModern">Latin Modern</option>
+    <option value="LucidaBright">Lucida Bright</option>
+    <option value="Minion">Minion</option>
+    <option value="STIX">STIX</option>
+    <option value="TeXGyreBonum">TeX Gyre Bonum</option>
+    <option value="TeXGyrePagella">TeX Gyre Pagella</option>
+    <option value="TeXGyreSchola">TeX Gyre Schola</option>
+    <option value="TeXGyreTermes">TeX Gyre Termes</option>
+    <option value="XITS">XITS</option>
+    <option value="XITSRTL">XITS RTL</option>
+  </select> <br/>
+</p>
+
+<table>
+
+<tr>
+<td></td>
+<th scope="col">As rendered by TeX</th>
+<th scope="col">As rendered by your browser</th></tr>
+
+<tr>
+<td>1</td>
+
+<td><img src="https://developer.mozilla.org/@api/deki/files/4578/=ex1.png" width="38" height="22"
+alt="TeXbook, 16.2-16.3" /></td>
+<td>
+<math display="block">
+<mrow>
+  <msup>
+    <mi>x</mi>
+    <mn>2</mn>
+  </msup>
+  <msup>
+    <mi>y</mi>
+
+    <mn>2</mn>
+  </msup>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>2</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4579/=ex2.png" width="30" height="17" alt="TeXbook, 16.2-16.3" /></td>
+<td>
+<math display="block">
+<!--
+<mrow>
+  <msub><mi></mi><mn>2</mn></msub>
+  <msub><mi>F</mi><mn>3</mn></msub>
+</mrow>
+-->
+<mrow>
+
+  <mmultiscripts>
+    <mi>F</mi>
+    <mn>3</mn><none/>
+    <mprescripts/>
+    <mn>2</mn><none/>
+  </mmultiscripts>
+</mrow>
+</math>
+
+</td></tr>
+
+<tr>
+<td>3</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4586/=ex21.png" width="58" height="47" alt="TeXbook, 17-17.1" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mfrac>
+    <mrow>
+      <mi>x</mi>
+      <mo>+</mo>
+
+      <msup>
+        <mi>y</mi>
+        <mn>2</mn>
+      </msup>
+    </mrow>
+    <mrow>
+      <mi>k</mi>
+
+      <mo>+</mo>
+      <mn>1</mn>
+    </mrow>
+  </mfrac>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>4</td>
+
+<td><img src="https://developer.mozilla.org/@api/deki/files/4587/=ex22.png" width="76" height="25" alt="TeXbook, 17-17.1" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mi>x</mi>
+  <mo>+</mo>
+  <msup>
+    <mi>y</mi>
+    <mfrac>
+
+      <mn>2</mn>
+      <mrow>
+        <mi>k</mi>
+        <mo>+</mo>
+        <mn>1</mn>
+      </mrow>
+    </mfrac>
+
+  </msup>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>5</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4588/=ex23.png" width="30" height="42" alt="TeXbook, 17-17.1" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mfrac>
+    <mi>a</mi>
+
+    <mrow>
+      <mi>b</mi>
+      <mo>/</mo>
+      <mn>2</mn>
+    </mrow>
+  </mfrac>
+</mrow>
+</math>
+
+</td></tr>
+
+<tr>
+<td>6</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4589/=ex24.png" width="220" height="138" alt="TeXbook, 17.5-17.6" /></td>
+<td>
+<math display="block">
+<mrow>
+  <msub>
+    <mi>a</mi>
+    <mn>0</mn>
+
+  </msub>
+  <mo>+</mo>
+  <mfrac>
+    <mn>1</mn>
+    <mstyle displaystyle="true" scriptlevel="0">
+      <msub>
+        <mi>a</mi>
+
+        <mn>1</mn>
+      </msub>
+      <mo>+</mo>
+      <mfrac>
+        <mn>1</mn>
+        <mstyle displaystyle="true" scriptlevel="0">
+          <msub>
+
+            <mi>a</mi>
+            <mn>2</mn>
+          </msub>
+          <mo>+</mo>
+          <mfrac>
+            <mn>1</mn>
+            <mstyle displaystyle="true" scriptlevel="0">
+
+              <msub>
+                <mi>a</mi>
+                <mn>3</mn>
+              </msub>
+              <mo>+</mo>
+              <mfrac>
+                <mn>1</mn>
+
+                <mstyle displaystyle="true" scriptlevel="0">
+                  <msub>
+                    <mi>a</mi>
+                    <mn>4</mn>
+                  </msub>
+                </mstyle>
+              </mfrac>
+            </mstyle>
+          </mfrac>
+
+        </mstyle>
+      </mfrac>
+    </mstyle>
+  </mfrac>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>7</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4590/=ex25.png" width="200" height="85" alt="TeXbook, 17.5-17.6" /></td>
+<td>
+
+<math>
+<mrow>
+  <msub>
+    <mi>a</mi>
+    <mn>0</mn>
+  </msub>
+  <mo>+</mo>
+  <mfrac>
+
+    <mn>1</mn>
+    <mrow>
+      <msub>
+        <mi>a</mi>
+        <mn>1</mn>
+      </msub>
+      <mo>+</mo>
+
+      <mfrac>
+        <mn>1</mn>
+        <mrow>
+          <msub>
+            <mi>a</mi>
+            <mn>2</mn>
+          </msub>
+
+          <mo>+</mo>
+          <mfrac>
+            <mn>1</mn>
+            <mrow>
+              <msub>
+                <mi>a</mi>
+                <mn>3</mn>
+
+              </msub>
+              <mo>+</mo>
+              <mfrac>
+                <mn>1</mn>
+                <mrow>
+                  <msub>
+                    <mi>a</mi>
+
+                    <mn>4</mn>
+                  </msub>
+                </mrow>
+              </mfrac>
+            </mrow>
+          </mfrac>
+        </mrow>
+      </mfrac>
+
+    </mrow>
+  </mfrac>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>8</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4591/=ex26.png" width="54" height="50" alt="TeXbook, 17.5-17.6" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mo>(</mo>
+
+  <mfrac linethickness="0px">
+    <mi>n</mi>
+    <mrow>
+      <mi>k</mi>
+      <mo>/</mo>
+      <mn>2</mn>
+    </mrow>
+
+  </mfrac>
+  <mo>)</mo>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>9</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4592/=ex27.png" width="237" height="50" alt="TeXbook, 17.7" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mrow>
+
+
+    <mo>(</mo>
+    <mfrac linethickness="0px">
+      <mi>p</mi>
+      <mn>2</mn>
+    </mfrac>
+    <mo>)</mo>
+  </mrow>
+
+  <msup>
+    <mi>x</mi>
+    <mn>2</mn>
+  </msup>
+  <msup>
+    <mi>y</mi>
+    <mrow>
+
+      <mi>p</mi>
+      <mo>-</mo>
+      <mn>2</mn>
+    </mrow>
+  </msup>
+  <mo>-</mo>
+  <mfrac>
+
+    <mn>1</mn>
+    <mrow>
+      <mn>1</mn>
+      <mo>-</mo>
+      <mi>x</mi>
+    </mrow>
+  </mfrac>
+
+  <mfrac>
+    <mn>1</mn>
+    <mrow>
+      <mn>1</mn>
+      <mo>-</mo>
+      <msup>
+        <mi>x</mi>
+
+        <mn>2</mn>
+      </msup>
+    </mrow>
+  </mfrac>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>10</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4593/=ex29.png" width="116" height="63" alt="TeXbook, 17.7-17.8" /></td>
+
+<td>
+<math display="block">
+<mrow>
+  <munder>
+    <mo>&sum;</mo>
+    <mrow>
+      <mfrac linethickness="0px">
+        <mrow>
+          <mn>0</mn>
+          <mo>&leq;</mo>
+
+          <mi>i</mi>
+          <mo>&leq;</mo>
+          <mi>m</mi>
+        </mrow>
+        <mrow>
+          <mn>0</mn>
+          <mo>&lt;</mo>
+
+          <mi>j</mi>
+          <mo>&lt;</mo>
+          <mi>n</mi>
+        </mrow>
+      </mfrac>
+    </mrow>
+  </munder>
+  <mi>P</mi>
+
+  <mo stretchy="false">(</mo>
+  <mi>i</mi>
+  <mo>,</mo>
+  <mi>j</mi>
+  <mo stretchy="false">)</mo>
+</mrow>
+</math>
+
+</td></tr>
+
+<tr>
+<td>11</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4580/=ex3.png" width="27" height="18" alt="TeXbook, 16.2-16.3" /></td>
+<td>
+<math display="block">
+<mrow>
+<msup>
+  <mi>x</mi>
+  <mrow>
+    <mn>2</mn>
+
+    <mi>y</mi>
+  </mrow>
+</msup>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>12</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4594/=ex30.png" width="175" height="61" alt="TeXbook, 17.8" /></td>
+<td>
+<math display="block">
+<mrow>
+
+  <munderover>
+    <mo>&sum;</mo>
+    <mrow>
+      <mi>i</mi>
+      <mo>=</mo>
+      <mn>1</mn>
+    </mrow>
+
+    <mi>p</mi>
+  </munderover>
+  <munderover>
+    <mo>&sum;</mo>
+    <mrow>
+      <mi>j</mi>
+      <mo>=</mo>
+
+      <mn>1</mn>
+    </mrow>
+    <mi>q</mi>
+  </munderover>
+  <munderover>
+    <mo>&sum;</mo>
+    <mrow>
+      <mi>k</mi>
+
+      <mo>=</mo>
+      <mn>1</mn>
+    </mrow>
+    <mi>r</mi>
+  </munderover>
+  <msub>
+    <mi>a</mi>
+
+    <mrow>
+      <mi>i</mi>
+      <mi>j</mi>
+    </mrow>
+  </msub>
+  <msub>
+    <mi>b</mi>
+
+    <mrow>
+      <mi>j</mi>
+      <mi>k</mi>
+    </mrow>
+  </msub>
+  <msub>
+    <mi>c</mi>
+
+    <mrow>
+      <mi>k</mi>
+      <mi>i</mi>
+    </mrow>
+  </msub>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+
+<td>13</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4595/=ex31.png" width="405" height="100" alt="TeXbook, 17.9-17.10" /></td>
+<td>
+<math display="block">
+<mrow>
+  <msqrt>
+    <mn>1</mn>
+    <mo>+</mo>
+    <msqrt>
+      <mn>1</mn>
+
+      <mo>+</mo>
+      <msqrt>
+        <mn>1</mn>
+        <mo>+</mo>
+        <msqrt>
+          <mn>1</mn>
+          <mo>+</mo>
+
+          <msqrt>
+            <mn>1</mn>
+            <mo>+</mo>
+            <msqrt>
+              <mn>1</mn>
+              <mo>+</mo>
+              <msqrt>
+
+                <mn>1</mn>
+                <mo>+</mo>
+                <mi>x</mi>
+              </msqrt>
+            </msqrt>
+          </msqrt>
+        </msqrt>
+
+      </msqrt>
+    </msqrt>
+  </msqrt>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>14</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4596/=ex34.png" width="272" height="50" alt="TeXbook, 17.10" /></td>
+<td>
+<math display="block">
+<mrow>
+
+  <mrow>
+    <mo>(</mo>
+    <mfrac>
+      <msup>
+        <mo>&part;</mo>
+        <mn>2</mn>
+      </msup>
+      <mrow>
+
+        <mo>&part;</mo>
+        <msup>
+          <mi>x</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+    </mfrac>
+    <mo>+</mo>
+
+    <mfrac>
+      <msup>
+        <mo>&part;</mo>
+        <mn>2</mn>
+      </msup>
+      <mrow>
+        <mo>&part;</mo>
+        <msup>
+
+          <mi>y</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+    </mfrac>
+    <mo>)</mo>
+  </mrow>
+
+  <msup>
+    <mrow>
+      <mo minsize="150%">|</mo>
+      <mi>&#x3C6; <!-- \varphi --></mi>
+      <mo stretchy="false">(</mo>
+      <mi>x</mi>
+      <mo>+</mo>
+
+      <mi mathvariant="normal">i</mi>
+      <mi>y</mi>
+      <mo stretchy="false">)</mo>
+      <mo minsize="150%">|</mo>
+    </mrow>
+    <mn>2</mn>
+
+  </msup>
+  <mo>=</mo>
+  <mn>0</mn>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>15</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4581/=ex4.png" width="31" height="22" alt="TeXbook, 16.2-16.3" /></td>
+<td>
+
+<math display="block">
+<mrow>
+  <msup>
+    <mn>2</mn>
+    <msup>
+      <mn>2</mn>
+      <msup>
+        <mn>2</mn>
+
+        <mi>x</mi>
+      </msup>
+    </msup>
+  </msup>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>16</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4597/=ex40.png" width="55" height="49" alt="TeXbook, 18.10-18.11" /></td>
+
+<td>
+<math display="block">
+<mrow>
+  <msubsup>
+    <mo stretchy="false">&int;</mo>
+    <mn>1</mn>
+    <mi>x</mi>
+ </msubsup>
+ <mfrac>
+
+   <mrow><mi>d</mi><mi>t</mi></mrow>
+   <mi>t</mi>
+ </mfrac>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>17</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4599/=ex41.png" width="91" height="47" alt="TeXbook, 18.12-18.13" /></td>
+<td>
+
+<math display="block">
+<mrow>
+  <msub>
+    <mo>&#x222C; <!-- \iint --></mo>
+    <mi>D</mi>
+  </msub>
+  <mi>d</mi><mi>x</mi>
+  <mspace width="thinmathspace"/>
+
+  <mi>d</mi><mi>y</mi>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>18</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4600/=ex43.png" width="250" height="66" alt="TeXbook, 18.23" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mi>f</mi>
+
+  <mo stretchy="false">(</mo>
+  <mi>x</mi>
+  <mo stretchy="false">)</mo>
+  <mo>=</mo>
+  <mrow>
+    <mo>{</mo>
+
+    <mtable>
+      <mtr>
+        <mtd columnalign="center">
+          <mrow>
+            <mn>1</mn>
+            <mo>/</mo>
+            <mn>3</mn>
+
+          </mrow>
+        </mtd>
+        <mtd columnalign="left">
+          <mrow>
+            <mtext>if&nbsp;</mtext>
+            <mn>0</mn>
+            <mo>&leq;</mo>
+            <mi>x</mi>
+
+            <mo>&leq;</mo>
+            <mn>1</mn>
+            <mo>;</mo>
+          </mrow>
+        </mtd>
+      </mtr>
+      <mtr>
+        <mtd columnalign="center">
+
+          <mrow>
+            <mn>2</mn>
+            <mo>/</mo>
+            <mn>3</mn>
+          </mrow>
+        </mtd>
+        <mtd columnalign="center">
+
+          <mrow>
+            <mtext>if&nbsp;</mtext>
+            <mn>3</mn>
+            <mo>&leq;</mo>
+            <mi>x</mi>
+            <mo>&leq;</mo>
+            <mn>4</mn>
+
+            <mo>;</mo>
+          </mrow>
+        </mtd>
+      </mtr>
+      <mtr>
+        <mtd columnalign="center">
+          <mn>0</mn>
+        </mtd>
+
+        <mtd columnalign="left">
+          <mtext>elsewhere.</mtext>
+        </mtd>
+      </mtr>
+    </mtable>
+  </mrow>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>19</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4601/=ex44.png" width="101" height="44" alt="TeXbook, 18.23-18.24" /></td>
+<td>
+<math display="block">
+<mover>
+  <mrow>
+    <mi>x</mi>
+    <mo>+</mo>
+    <mo>...</mo>
+
+    <mo>+</mo>
+    <mi>x</mi>
+  </mrow>
+  <mover>
+    <mo>&OverBrace;</mo>
+    <mrow><mi>k</mi> <mspace width="thinmathspace"/> <mtext>times</mtext></mrow>
+  </mover>
+
+</mover>
+</math>
+</td></tr>
+
+<tr>
+<td>20</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4582/=ex5.png" width="25" height="13" alt="TeXbook, 16.2-16.3" /></td>
+<td>
+<math display="block">
+<mrow>
+  <msub>
+    <mi>y</mi>
+    <msup>
+
+      <mi>x</mi>
+      <mn>2</mn>
+    </msup>
+  </msub>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>21</td>
+
+<td><img src="https://developer.mozilla.org/@api/deki/files/4602/=ex51.png" width="253" height="56" alt="TeXbook, 18.40" /></td>
+<td>
+<math display="block">
+<mrow>
+  <munder>
+    <mo>&sum;</mo>
+    <mrow>
+      <mi>p</mi>
+      <mtext>&nbsp;prime</mtext>
+    </mrow>
+
+  </munder>
+  <mi>f</mi>
+  <mo stretchy="false">(</mo>
+  <mi>p</mi>
+  <mo stretchy="false">)</mo>
+  <mo>=</mo>
+
+  <msub>
+    <mo stretchy="false">&int;</mo>
+    <mrow>
+      <mi>t</mi>
+      <mo>&gt;</mo>
+      <mn>1</mn>
+    </mrow>
+  </msub>
+
+  <mi>f</mi>
+  <mo stretchy="false">(</mo>
+  <mi>t</mi>
+  <mo stretchy="false">)</mo>
+  <mspace width="thinmathspace"/>
+  <mi>d</mi>
+  <mi>&pi;</mi>
+  <mo stretchy="false">(</mo>
+  <mi>t</mi>
+  <mo stretchy="false">)</mo>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>22</td>
+
+<td><img src="https://developer.mozilla.org/@api/deki/files/4603/=ex52.png" width="159" height="81" alt="TeXbook, 18.41" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mo stretchy="false">{</mo>
+  <munder>
+    <mrow>
+      <mover>
+        <mrow>
+          <mpadded width="0em"><mphantom><mo>(</mo></mphantom></mpadded>
+          <mi>a</mi>
+          <mo>,</mo>
+          <mo>...</mo>
+          <mo>,</mo>
+          <mi>a</mi>
+        </mrow>
+
+        <mover>
+          <mo>&OverBrace;</mo>
+          <mrow>
+            <mi>k</mi>
+            <mtext>&nbsp;</mtext>
+            <mi>a</mi>
+            <mtext>'s</mtext>
+
+          </mrow>
+        </mover>
+      </mover>
+      <mo>,</mo>
+      <mover>
+        <mrow>
+          <mpadded width="0em"><mphantom><mo>(</mo></mphantom></mpadded>
+          <mi>b</mi>
+          <mo>,</mo>
+          <mo>...</mo>
+          <mo>,</mo>
+          <mi>b</mi>
+        </mrow>
+
+        <mover>
+          <mo>&OverBrace;</mo>
+          <mrow>
+            <mi>&ell;</mi>
+            <mtext>&nbsp;</mtext>
+            <mi>b</mi>
+            <mtext>'s</mtext>
+          </mrow>
+
+        </mover>
+      </mover>
+    </mrow>
+    <munder>
+      <mo>&UnderBrace;</mo>
+      <mrow>
+        <mi>k</mi>
+        <mo>+</mo>
+
+        <mi>&ell;</mi>
+        <mtext>&nbsp;elements</mtext>
+      </mrow>
+    </munder>
+  </munder>
+  <mo stretchy="false">}</mo>
+</mrow>
+</math>
+</td></tr>
+
+<tr>
+<td>23</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4604/=ex53.png" width="213" height="108" alt="TeXbook, 18.42" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mo>(</mo>
+  <mtable>
+    <mtr>
+      <mtd columnalign="center">
+
+        <mrow>
+          <mo>(</mo>
+          <mtable>
+            <mtr>
+              <mtd columnalign="center">
+                <mi>a</mi>
+              </mtd>
+              <mtd columnalign="center">
+
+                <mi>b</mi>
+              </mtd>
+            </mtr>
+            <mtr>
+              <mtd columnalign="center">
+                <mi>c</mi>
+              </mtd>
+              <mtd columnalign="center">
+
+                <mi>d</mi>
+              </mtd>
+            </mtr>
+          </mtable>
+          <mo>)</mo>
+        </mrow>
+      </mtd>
+      <mtd columnalign="center">
+
+        <mrow>
+          <mo>(</mo>
+          <mtable>
+            <mtr>
+              <mtd columnalign="center">
+                <mi>e</mi>
+              </mtd>
+              <mtd columnalign="center">
+
+                <mi>f</mi>
+              </mtd>
+            </mtr>
+            <mtr>
+              <mtd columnalign="center">
+                <mi>g</mi>
+              </mtd>
+              <mtd columnalign="center">
+
+                <mi>h</mi>
+              </mtd>
+            </mtr>
+          </mtable>
+          <mo>)</mo>
+        </mrow>
+      </mtd>
+    </mtr>
+
+    <mtr>
+      <mtd columnalign="center">
+        <mn>0</mn>
+      </mtd>
+      <mtd columnalign="center">
+        <mrow>
+          <mo>(</mo>
+          <mtable>
+
+            <mtr>
+              <mtd columnalign="center">
+                <mi>i</mi>
+              </mtd>
+              <mtd columnalign="center">
+                <mi>j</mi>
+              </mtd>
+            </mtr>
+
+            <mtr>
+              <mtd columnalign="center">
+                <mi>k</mi>
+              </mtd>
+              <mtd columnalign="center">
+                <mi>l</mi>
+              </mtd>
+            </mtr>
+
+          </mtable>
+          <mo>)</mo>
+        </mrow>
+      </mtd>
+    </mtr>
+  </mtable>
+  <mo>)</mo>
+</mrow>
+
+</math>
+</td></tr>
+
+<tr>
+<td>24</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4605/=ex54.png" width="344" height="130" alt="TeXbook, 18.43" /></td>
+<td>
+<math display="block">
+<mrow>
+  <mi>det</mi>
+  <mo>|</mo>
+  <mtable>
+
+    <mtr>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mn>0</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+
+        <msub>
+          <mi>c</mi>
+          <mn>1</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+
+          <mn>2</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&mldr;</mo>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+
+          <mi>c</mi>
+          <mi>n</mi>
+        </msub>
+      </mtd>
+    </mtr>
+    <mtr>
+      <mtd columnalign="center">
+        <msub>
+
+          <mi>c</mi>
+          <mn>1</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+
+          <mn>2</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mn>3</mn>
+
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&mldr;</mo>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+
+          <mrow>
+            <mi>n</mi>
+            <mo>+</mo>
+            <mn>1</mn>
+          </mrow>
+        </msub>
+      </mtd>
+
+    </mtr>
+    <mtr>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mn>2</mn>
+        </msub>
+      </mtd>
+
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mn>3</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+
+          <mi>c</mi>
+          <mn>4</mn>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&mldr;</mo>
+      </mtd>
+      <mtd columnalign="center">
+
+        <msub>
+          <mi>c</mi>
+          <mrow>
+            <mi>n</mi>
+            <mo>+</mo>
+            <mn>2</mn>
+          </mrow>
+
+        </msub>
+      </mtd>
+    </mtr>
+    <mtr>
+      <mtd columnalign="center">
+        <mo>&#x22EE;</mo>
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&#x22EE;</mo>
+
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&#x22EE;</mo>
+      </mtd>
+      <mtd columnalign="center">
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&#x22EE;</mo>
+      </mtd>
+
+    </mtr>
+    <mtr>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mi>n</mi>
+        </msub>
+      </mtd>
+
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mrow>
+            <mi>n</mi>
+            <mo>+</mo>
+            <mn>1</mn>
+
+          </mrow>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mrow>
+            <mi>n</mi>
+
+            <mo>+</mo>
+            <mn>2</mn>
+          </mrow>
+        </msub>
+      </mtd>
+      <mtd columnalign="center">
+        <mo>&mldr;</mo>
+      </mtd>
+
+      <mtd columnalign="center">
+        <msub>
+          <mi>c</mi>
+          <mrow>
+            <mn>2</mn>
+            <mi>n</mi>
+          </mrow>
+
+        </msub>
+      </mtd>
+    </mtr>
+  </mtable>
+  <mo>|</mo>
+  <mo>&gt;</mo>
+  <mn>0</mn>
+</mrow>
+
+</math>
+</td></tr>
+
+<tr>
+<td>25</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4598/=ex6.png" width="25" height="14" alt="TeXbook, 16.2-16.3" /></td>
+<td>
+<math display="block">
+<msub>
+  <mi>y</mi>
+  <msub>
+    <mi>x</mi>
+
+    <mn>2</mn>
+  </msub>
+</msub>
+</math>
+</td></tr>
+
+<tr>
+<td>26</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4583/=ex7.png" width="90" height="23" alt="TeXbook, 16.4-16.5" /></td>
+<td>
+<math display="block">
+<mrow>
+  <msubsup>
+
+    <mi>x</mi>
+    <mn>92</mn>
+    <mn>31415</mn>
+  </msubsup>
+  <mo>+</mo>
+  <mi>&pi;</mi>
+</mrow>
+
+</math>
+</td></tr>
+
+<tr>
+<td>27</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4584/=ex8.png" width="27" height="36" alt="TeXbook, 16.4-16.5" /></td>
+<td>
+<math display="block">
+<msubsup>
+  <mi>x</mi>
+  <msubsup>
+    <mi>y</mi>
+
+    <mi>b</mi>
+    <mi>a</mi>
+  </msubsup>
+  <msubsup>
+    <mi>z</mi>
+    <mi>c</mi>
+    <mi>d</mi>
+
+  </msubsup>
+</msubsup>
+</math>
+</td></tr>
+
+<tr>
+<td>28</td>
+<td><img src="https://developer.mozilla.org/@api/deki/files/4585/=ex9.png" width="24" height="22" alt="TeXbook, 16.4-16.5" /></td>
+<td>
+<math display="block">
+<msubsup>
+  <mi>y</mi>
+  <mn>3</mn>
+  <mo>&#x2034;</mo>
+</msubsup>
+</math>
+
+</td></tr>
+</table>
+ +

CSS Content

+ +
  /* Table style */
+
+  body {
+   text-align: center;
+  }
+
+  table
+  {
+  border: solid thin;
+  border-collapse: collapse;
+  margin-left: auto;
+  margin-right: auto;
+  }
+
+  th
+  {
+  background-color: #ddf;
+  border: solid thin;
+  color: black;
+  padding: 5px;
+  }
+
+  td
+  {
+  border: solid thin;
+  padding: 5px;
+  text-align: center;
+  }
+
+  .Asana math { font-family: Asana Math; }
+  .Cambria math { font-family: Cambria Math; }
+  .LatinModern math { font-family: Latin Modern Math; }
+  .LucidaBright math { font-family: Lucida Bright Math; }
+  .Minion math { font-family: Minion Math; }
+  .STIX math { font-family: STIX Math; }
+  .TeXGyreBonum math { font-family: TeX Gyre Bonum Math; }
+  .TeXGyrePagella math { font-family: TeX Gyre Pagella Math; }
+  .TeXGyreSchola math { font-family: TeX Gyre Schola Math; }
+  .TeXGyreTermes math { font-family: TeX Gyre Termes Math; }
+  .XITS math { font-family: XITS Math; }
+  .XITSRTL math { font-family: XITS Math; direction: rtl; }
+
+ +

JavaScript Content

+ +
  function updateMathFont()
+  {
+  var mathFont = document.getElementById("MathFont").value;
+  if (mathFont == "Default") {
+    document.body.removeAttribute("class");
+  } else {
+    document.body.setAttribute("class", mathFont);
+  }
+  }
+
+  function load()
+  {
+  document.getElementById("MathFont").
+  addEventListener("change", updateMathFont, false)
+  }
+
+  window.addEventListener("load", load, false);
+
+
+
+ +

Der folgende Test enthält TeX-Beispielformeln aus Knuths TeX book und vergleichbare MathML-Repräsentationen. Es vergleicht das Rendering von der XeTeX - Engine, die das standarte Latin Modern Font benutzt, und das MathML-Rendering von Ihrem Browser, welcher das standarte Math Font oder ein alternatives OpenType MATH Font benutzt. Um das beste Rendering zu erhalten, stellen Sie sicher, dass sie diese Mathematischen Fonts auf Ihrem Betriebssystem installiert haben und einen Browser mit OpenType Math - Support, wie Gecko 31.0 {{GeckoRelease("31.0")}} oder höher, benutzen. Sie können sich auch diese Seite für Tests von Mathematischen OpenType Fonts, welche stattdessen auf Web Fonts basiert. Zuletzt können Sie sich diese Tabelle anschauen wollen, die vergleicht, wie die Tests von verschiedenen Screen Readern für Mozilla-Browser gelesen werden.

+ +

{{ EmbedLiveSample('MathML_Torture_Test', '100%', '2500px') }}

+ +
 
diff --git a/files/de/mozilla/mathml_project/start/index.html b/files/de/mozilla/mathml_project/start/index.html new file mode 100644 index 0000000000..69d5538254 --- /dev/null +++ b/files/de/mozilla/mathml_project/start/index.html @@ -0,0 +1,95 @@ +--- +title: MathML in Aktion +slug: Mozilla/MathML_Project/Start +translation_of: Mozilla/MathML_Project/Start +--- +

MathML in Aktion

+ +

Sehen Sie schlaue Formeln auf dieser Seite? Nicht? Zu schlecht. Hier ist ein Screenshot von dem, was Sie verpassen. Downloaden Sie einen Mozilla-Browser, der MathML untestützt, um diese traurige Situation zu ändern.

+ +

You already have a MathML-enabled build but what you see on the screenshot is not what you get? In that case you are probably missing some crucial MathML fonts.

+ +

Now that you are well-equipped, you should be able to see this inline equation with varying accents: x ^ + xy ^ + xyz ^ . Next to it is this tiny formula, det | a c b d | = a d - b c , which can also be typeset in displaystyle as det | a b c d | = a d - b c .

+ +

Mathematical typesetting is picky. MathML in Mozilla aims at complying with the MathML specification so thatWhat You See Is What You Markup, or to put it another wayWhat You See Is What You Made, or in short "WYSIWYM". The difference between these two is in the markup! ( ... ( ( a 0 + a 1 ) n 1 + a 2 ) n 2 + ... + a p ) n p ( ... ( ( a 0 + a 1 ) n 1 + a 2 ) n 2 + ... + a p ) n p

+ +

The roots of this bold equation y 3 + p y + q = 0 are also bold y = - q 2 + q 2 4 + p 3 27 2 3 + - q 2 - q 2 4 + p 3 27 2 3 .

+ +

As for the roots of the equation a x 2 + b x + c = 0 , click anywhere in the yellow area to zoom-in/zoom-out:

+ +
+

Zoomable Math

+ +

HTML Content

+ +
    <p>
+      <math display="block">
+        <mstyle id="zoomableMath" mathbackground="yellow">
+          <mrow>
+            <mi>x</mi>
+            <mo>=</mo>
+            <mfrac>
+              <mrow>
+                <mrow>
+                  <mo>-</mo>
+                  <mi>b</mi>
+                </mrow>
+                <mo>&#xB1;</mo>
+                <msqrt>
+                  <mrow>
+                    <msup>
+                      <mi>b</mi>
+                      <mn>2</mn>
+                    </msup>
+                    <mo>-</mo>
+                    <mrow>
+                      <mn>4</mn>
+                      <mi>a</mi>
+                      <mi>c</mi>
+                    </mrow>
+                  </mrow>
+                </msqrt>
+              </mrow>
+              <mrow>
+                <mn>2</mn>
+                <mi>a</mi>
+              </mrow>
+            </mfrac>
+          </mrow>
+        </mstyle>
+      </math>
+    </p>
+
+
+ +

JavaScript Content

+ +
      function zoomToggle()
+      {
+      if (this.hasAttribute("mathsize")) {
+      this.removeAttribute("mathsize");
+      } else {
+      this.setAttribute("mathsize", "200%");
+      }
+      }
+
+      function load()
+      {
+      document.getElementById("zoomableMath").
+      addEventListener("click", zoomToggle, false);
+      }
+
+      window.addEventListener("load", load, false);
+
+ +

{{ EmbedLiveSample('Zoomable_Math') }}

+ +

Consider an interesting markup like this { u t + f ( u ) x = 0 u ( 0 , x ) = { u - if  x < 0 u + if  x > 0 or other complex markups like these Ell ^ Y ( Z ; z , τ ) := Y ( l ( y l 2 π i ) θ ( y l 2 π i - z ) θ ( 0 ) θ ( - z ) θ ( y l 2 π i ) ) × ( k θ ( e k 2 π i - ( α k + 1 ) z ) θ ( - z ) θ ( e k 2 π i - z ) θ ( - ( α k + 1 ) z ) ) π ( n ) = m = 2 n ( k = 1 m - 1 ( m / k ) / m / k ) - 1 ϕ W s k ( Ω g ) ( | α | k α ϕ ξ α L s ( Ω g ) s ) 1 / s

+ +

For more examples, refer to links on the MathML Project page, and if you are building your own Mozilla binary, see the directorymozilla/layout/mathml/tests.

+ +

Now, what next? As you try out MathML in Mozilla, what to do with those few things that appear to you not to work as per the MathML spec? Or what about those things that just seem itchy, and that you wish could be done just a little better? Or what about those things that were working before and are not working anymore (a.k.a. regressions)? In either case, head over to Bugzilla to report the discrepancies. Bugzilla has a big memory for these things, and besides, how would your problems be fixed if they are not reported?!

+ +

Getting involved is part of your contribution towards enriching Gecko with an elegant standards-compliant MathML renderer. Your feedback can be manifested by putting MathML content on the web, reporting bugs in Bugzilla, and, if you can help with code, inspecting/improving the current code, and/or picking up an item in the ToDo list.

+ +
 
diff --git a/files/de/mozilla/mobile/index.html b/files/de/mozilla/mobile/index.html new file mode 100644 index 0000000000..b3a3dc1803 --- /dev/null +++ b/files/de/mozilla/mobile/index.html @@ -0,0 +1,25 @@ +--- +title: Mobil +slug: Mozilla/Mobile +tags: + - Mozilla + - mobil +translation_of: Mozilla/Mobile +--- +

Firefox OS

+ +

Firefox OS ist ein Open Source Betriebssystem, welches Linux und Mozilla's Gecko Rendering Engine verwendet um eine Benutzeroberfläche und viele Anwendungen bereit zu stellen, die komplett in HTML, CSS und JavaScript geschrieben sind.

+ +

Informiere Dich darüber wie Firefox OS installiert wird und wie Apps für Firefox OS entwickelt werden.

+ +

Firefox für Android

+ +

Firefox für Android ist Mozilla's Web Browser für Android-Geräte. Firefox für Android wurde vor kurzem komplett überarbeitet um Android's natives User Interface zu nutzen und um es schneller, schlanker und besser anpassbar zu machen. Es unterstützt hardware-nahe APIs um z.B. auf die Kamera und die Telefonfunktionen zugreifen zu können.

+ +

Informiere Dich darüber wie Du beim Aufbau von Firefox für Android helfen kannst, wie die APIs benutzt werden und wie mobile Add Ons entwickelt werden.

+ +

Mobile Web Entwicklung

+ +

Mobile Geräte haben deutlich andere Hardware-Voraussetzungen als PCs oder Laptops und viele der genutzen APIs sind noch nicht standardisiert.

+ +

Informiere Dich darüber wie Web-Seiten entwickelt werden, die auf Mobil-Geräten gut aussehen und erfahre mehr über die neuen Möglichkeiten dieser Technologien. Lerne wie Du sicherstellen kannst, dass Deine Web-Seiten auf verschiedenen Browsern gut funktionieren.

diff --git a/files/de/mozilla/mobile/viewport_meta_tag/index.html b/files/de/mozilla/mobile/viewport_meta_tag/index.html new file mode 100644 index 0000000000..c17554471a --- /dev/null +++ b/files/de/mozilla/mobile/viewport_meta_tag/index.html @@ -0,0 +1,86 @@ +--- +title: Using the viewport meta tag to control layout on mobile browsers +slug: Mozilla/Mobile/Viewport_meta_tag +translation_of: Mozilla/Mobile/Viewport_meta_tag +--- +

Hintergrund

+ +

 

+ +

Der {{glossary("viewport")}} des Browsers ist der Bereich des Fensters, in dem Webinhalte zu sehen sind. Dies ist oft nicht die gleiche Größe wie die komplette gerenderte Seite. In diesem Fall stellt der Browser Scrollbars zur Verfügung, mit denen der Benutzer umherscrollen und auf alle Inhalte zugreifen kann.

+ +

Geräte mit schmalem Display (z.B. Handys) rendern Seiten in einem virtuellen Fenster oder Ansichtsfenster, das normalerweise breiter als der Bildschirm ist, und verkleinern dann das gerenderte Ergebnis, so dass es auf einmal zu sehen ist. Die Benutzer können dann schwenken und zoomen, um verschiedene Bereiche der Seite zu sehen. Wenn beispielsweise ein mobiler Bildschirm eine Breite von 640px hat, können Seiten mit einem virtuellen Ansichtsfenster von 980px gerendert und dann verkleinert werden, um in den 640px-Bereich zu passen.

+ +

Dies geschieht, weil viele Seiten nicht mobil optimiert sind und bei einer kleinen Ansichtsfensterbreite brechen (oder zumindest schlecht aussehen). Dieses virtuelle Ansichtsfenster ist eine Möglichkeit, nicht-mobile optimierte Seiten auf schmalen Bildschirmen besser aussehen zu lassen.

+ +

Enter viewport meta tag

+ +

However, this mechanism is not so good for pages that are optimized for narrow screens using media queries — if the virtual viewport is 980px for example, media queries that kick in at 640px or 480px or less will never be used, limiting the effectiveness of such responsive design techniques.

+ +

To mitigate this problem, Apple introduced the "viewport meta tag" in Safari iOS to let web developers control the viewport's size and scale. Many other mobile browsers now support this tag, although it is not part of any web standard. Apple's documentation does a good job explaining how web developers can use this tag, but we had to do some detective work to figure out exactly how to implement it in Fennec. For example, Safari's documentation says the content is a "comma-delimited list," but existing browsers and web pages use any mix of commas, semicolons, and spaces as separators.

+ +

Learn more about viewports in different mobile browsers in A Tale of Two Viewports at quirksmode.org.

+ +

Viewport basics

+ +

A typical mobile-optimized site contains something like the following:

+ +
<meta name="viewport" content="width=device-width, initial-scale=1">
+ +

The width property controls the size of the viewport. It can be set to a specific number of pixels like width=600 or to the special value device-width, which is the width of the screen in CSS pixels at a scale of 100%. (There are corresponding height and device-height values, which may be useful for pages with elements that change size or position based on the viewport height.)

+ +

The initial-scale property controls the zoom level when the page is first loaded. The maximum-scale, minimum-scale, and user-scalable properties control how users are allowed to zoom the page in or out.

+ +

A pixel is not a pixel

+ +

In recent years, screen resolutions have risen to the size that individual pixels are hard to distinguish with the human eye. For example, recent smartphones generally have a 5-inch screens with resolutions upwards of 1920—1080 pixels (~400 dpi). Because of this, many browsers can display their pages in a smaller physical size by translating multiple hardware pixels for each CSS "pixel". Initially this caused usability and readability problems on many touch-optimized web sites. Peter-Paul Koch wrote about this problem in A pixel is not a pixel.

+ +

On high dpi screens, pages with initial-scale=1 will effectively be zoomed by browsers. Their text will be smooth and crisp, but their bitmap images will probably not take advantage of the full screen resolution. To get sharper images on these screens, web developers may want to design images – or whole layouts – at a higher scale than their final size and then scale them down using CSS or viewport properties. This is consistent with the CSS 2.1 specification, which says:

+ +
+

If the pixel density of the output device is very different from that of a typical computer display, the user agent should rescale pixel values. It is recommended that the pixel unit refer to the whole number of device pixels that best approximates the reference pixel. It is recommended that the reference pixel be the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length.

+
+ +

For web developers, this means that the size of a page is much smaller than the actual pixel count and browsers may size their layouts and images accordingly. But remember that not all mobile devices are the same width; you should make sure that your pages work well in a large variation of screen sizes and orientations.

+ +

The default pixel ratio depends on the display density. On a display with density less than 200dpi, the ratio is 1.0. On displays with density between 200 and 300dpi, the ratio is 1.5. For displays with density over 300dpi, the ratio is the integer floor(density/150dpi). Note that the default ratio is true only when the viewport scale equals 1. Otherwise, the relationship between CSS pixels and device pixels depends on the current zoom level.

+ +

Viewport width and screen width

+ +

Sites can set their viewport to a specific size. For example, the definition "width=320, initial-scale=1" can be used to fit precisely onto a small phone display in portrait mode. This can cause problems when the browser doesn't render a page at a larger size. To fix this, browsers will expand the viewport width if necessary to fill the screen at the requested scale. This is especially useful on large-screen devices like the iPad. (Allen Pike's Choosing a viewport for iPad sites has a good explanation for web developers.)

+ +

For pages that set an initial or maximum scale, this means the width property actually translates into a minimum viewport width. For example, if your layout needs at least 500 pixels of width then you can use the following markup. When the screen is more than 500 pixels wide, the browser will expand the viewport (rather than zoom in) to fit the screen:

+ +
<meta name="viewport" content="width=500, initial-scale=1">
+ +

Other attributes that are available are minimum-scale, maximum-scale, and user-scalable. These properties affect the initial scale and width, as well as limiting changes in zoom level.

+ +

Not all mobile browsers handle orientation changes in the same way. For example, Mobile Safari often just zooms the page when changing from portrait to landscape, instead of laying out the page as it would if originally loaded in landscape. If web developers want their scale settings to remain consistent when switching orientations on the iPhone, they must add a maximum-scale value to prevent this zooming, which has the sometimes-unwanted side effect of preventing users from zooming in:

+ +
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
+
+ +

Common viewport sizes for mobile and tablet devices

+ +

If you want to know what mobile and tablet devices have which viewport widths, there is a comprehensive list of mobile and tablet viewport sizes here. This gives information such as viewport width on portrait and landscape orientation as well as physical screen size, operating system and the pixel density of the device.

+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS3 Device', '#viewport-meta', '<meta name="viewport">')}}{{Spec2('CSS3 Device')}}Non-normatively describes the Viewport META element
+ +

There is clearly demand for the viewport meta tag, since it is supported by most popular mobile browsers and used by thousands of web sites. It would be good to have a true standard for web pages to control viewport properties. As the standardization process proceeds, we at Mozilla will work to keep up to date with any changes.

diff --git a/files/de/mozilla/performance/index.html b/files/de/mozilla/performance/index.html new file mode 100644 index 0000000000..1127358db7 --- /dev/null +++ b/files/de/mozilla/performance/index.html @@ -0,0 +1,145 @@ +--- +title: Performance +slug: Mozilla/Performance +tags: + - Add-ons + - Debugging + - Development + - Mozilla + - NeedsTranslation + - Performance + - TopicStub +translation_of: Mozilla/Performance +--- +

The articles linked to from here will help you improve performance, whether you're developing core Mozilla code or an add-on.

+ + + + + + + + +
+

Documentation

+ +
+
Reporting a Performance Problem
+
A user friendly guide to reporting a performance problem. A development environment is not required.
+
Benchmarking
+
Tips on generating valid performance metrics.
+
Performance best practices in extensions
+
A performance "best practices" guide for extension developers.
+
Measuring Add-on Startup Performance
+
A guide for add-on developers on how to set up a performance testing environment.
+
XUL School: Add-on Performance
+
Tips for add-on developers to help them avoid impairing application performance.
+
GPU performance
+
Tips for profiling and improving performance when using a GPU.
+
Scroll-Linked Effects
+
Information on scroll-linked effects, their effect on performance, related tools, and possible mitigation techniques.
+
Automated Performance Testing and Sheriffing
+
Information on automated performance testing and sheriffing at Mozilla.
+
Best practices for Front-end Engineers
+
Tips for reducing impacts on browser performance in front-end code.
+
+ +

View all pages tagged with "Performance"...

+ +

Memory profiling and leak detection tools

+ +
+
The Developer Tools "Memory" panel
+
The memory panel in the devtools supports taking heap snapshots, diffing them, computing dominator trees to surface "heavy retainers", and recording allocation stacks.
+
+ +
+
about:memory
+
about:memory is the easiest-to-use tool for measuring memory usage in Mozilla code, and is the best place to start. It also lets you do other memory-related operations like trigger GC and CC, dump GC & CC logs, and dump DMD reports. about:memory is built on top of Firefox's memory reporting infrastructure.
+
DMD
+
DMD is a tool that identifies shortcomings in about:memory's measurements, and can also do multiple kinds of general heap profiling.
+
Are We Slim Yet
+
areweslimyet.com (a.k.a. AWSY) is a memory usage and regression tracker.
+
BloatView
+
BloatView prints per-class statistics on allocations and refcounts, and provides gross numbers on the amount of memory being leaked broken down by class. It is used as part of Mozilla's continuous integration testing.
+
Refcount tracing and balancing
+
Refcount tracing and balancing are ways to track down leaks caused by incorrect uses of reference counting. They are slow and not particular easy to use, and thus most suitable for use by expert developers.
+
GC and CC logs
+
GC and CC logs can be generated and analyzed to in various ways. In particular, they can help you understand why a particular object is being kept alive.
+
Valgrind
+
Valgrind is a tool that detects various memory-related problems at runtime, including leaks. Valgrind is used as part of Mozilla's continuous integration testing, though the coverage is limited because Valgrind is slow.
+
LeakSanitizer
+
LeakSanitizer (a.k.a. LSAN) is similar to Valgrind, but it runs faster because it uses static source code instrumentation. LSAN is part of Mozilla's continuous integration testing, with most tests running through it as part of the AddressSanitizer (a.k.a. ASAN) test jobs.
+
Apple tools
+
Apple provides some tools for Mac OS X that report similar problems to those reported by LSAN and Valgrind. The "leaks" tool is not recommended for use with SpiderMonkey or Firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see bug 390944).
+
Leak Gauge
+
Leak Gauge is a tool that can be used to detect certain kinds of leaks in Gecko, including those involving documents, window objects, and docshells.
+
LogAlloc
+
LogAlloc is a tool that dumps a log of memory allocations in Gecko. That log can then be replayed against Firefox's default memory allocator independently or through another replace-malloc library, allowing the testing of other allocators under the exact same workload.
+
Memory Profiler
+
The memory profiler samples allocation events and provides different views to analyze the allocation characteristic.
+
+ +

See also the documentation on Leak-hunting strategies and tips.

+
+

Profiling and performance tools

+ +
+
Profiling with the Developer Tools Profiler
+
The profiler built into the developer tools has a high-level waterfall, detailed call tree, allocations and GC profiling, and flame graphs. It is available on all platforms and release channels, and also supports remote profiling b2g and Fennec.
+
+ +
+
Profiling with the Gecko Profiler {{ gecko_minversion_inline("16.0") }}
+
The Gecko Profiler is a good tool to start with, particularly for understanding where time is spent within C++ code in Firefox.
+
Profiling with Instruments
+
How to use Apple's Instruments tool to profile Mozilla code.
+
Profiling with Xperf
+
How to use Microsoft's Xperf tool to profile Mozilla code.
+
Profiling with Concurrency Visualizer
+
How to use Visual Studio's Concurrency Visualizer tool to profile Mozilla code.
+
Profiling with Zoom
+
Zoom is a profiler for Linux done by the people who made Shark
+
Measuring performance using the PerfMeasurement.jsm code module {{ gecko_minversion_inline("2.0") }}
+
Using PerfMeasurement.jsm to measure performance data in your JavaScript code.
+
Adding a new Telemetry probe
+
Information on how to add a new measurement to the Telemetry performance-reporting system
+
Profiling JavaScript with Shark (obsolete - replaced by Instruments)
+
How to use the Mac OS X Shark profiler to profile JavaScript code in Firefox 3.5 or later.
+
Profiling with Shark (obsolete - replaced by Instruments)
+
How to use Apple's Shark tool to profile Mozilla code.
+
Investigating CSS Performance
+
How to figure out why restyle is taking so long
+
+ +

Power profiling

+ +
+
Power profiling overview
+
This page provides an overview of relevant information, including details about hardware, what can be measured, and recommended approaches. It should be the starting point for anybody new to power profiling.
+
tools/power/rapl (Mac, Linux)
+
tools/power/rapl is a command-line utility in the Mozilla codebase that uses the Intel RAPL interface to gather direct power estimates for the package, cores, GPU and memory.
+
powermetrics (Mac-only)
+
powermetrics is a command-line utility that gathers and displays a wide range of global and per-process measurements, including CPU usage, GPU usage, and various wakeups frequencies.
+
TimerFirings logging (All platforms)
+
TimerFirings logging is a built-in logging mechanism that prints data on every time fired.
+
Activity Monitor, Battery Status Menu and top (Mac-only)
+
The battery status menu, Activity Monitor and top are three related Mac tools that have major flaws but often consulted by users, and so are worth understanding.
+
Intel Power Gadget (Windows, Mac, Linux)
+
Intel Power Gadget provides real-time graphs for package and processor RAPL estimates. It also provides an API through which those estimates can be obtained.
+
perf (Linux-only)
+
perf is a powerful command-line utility that can measure many different things, including energy estimates and high-context measurements of things such as wakeups.
+
turbostat (Linux-only)
+
turbostat is a command-line utility that gathers and displays various power-related measurements, with a focus on per-CPU measurements such as frequencies and C-states.
+
powertop (Linux-only)
+
powertop is an interactive command-line utility that gathers and displays various power-related measurements.
+
+ + + +
+
JavaScript, XPCOM, Developing Mozilla, Extensions, Addons
+
+
+ +

 

diff --git a/files/de/mozilla/persona/bootstrapping_persona/index.html b/files/de/mozilla/persona/bootstrapping_persona/index.html new file mode 100644 index 0000000000..f4405da59f --- /dev/null +++ b/files/de/mozilla/persona/bootstrapping_persona/index.html @@ -0,0 +1,31 @@ +--- +title: Bootstrapping Persona +slug: Mozilla/Persona/Bootstrapping_Persona +tags: + - ich kann nur deutsch +translation_of: Archive/Mozilla/Persona/Bootstrapping_Persona +--- +

To be truly successful and decentralized, Persona needs support from three different groups:

+ +

This creates a chicken-and-egg problem: none of these groups would significantly benefit unless there was a critical mass of users, but a distributed system can't get a critical mass of users without support from the above groups.

+

To solve this problem, https://login.persona.org hosts three resources:

+
    +
  1. A fallback Identity Provider, which vouches for users whose email providers don't support Persona.
  2. +
  3. A cross-browser, JavaScript implementation of the navigator.id APIs for browsers without native support.
  4. +
  5. A hosted verification API to make it easy for sites to verify user credentials.
  6. +
+

Together, this allows web sites to offer Persona to users regardless of browser and without email providers needing to get involved.

+

These services are temporary, and the Persona system is designed such that they transparently and automatically drop away as native support gets added to browsers and email providers. Thus, they will become less relevant as Persona matures, and may eventually be removed all together. At that point, https://login.persona.org won't feature at all in the Persona system.

+

Fallback Identity Provider

+

Any domain can become an Identity Provider as long as relying parties are willing to trust the certificates issued by that domain. We expect email providers to act as an IdPs for the addresses they administer, making the user experience of Persona seamless for those users.  It allows the user to leverage their existing relationship with the email provider when authenticating at other sites.

+

However, email providers won't become IdPs until there is significant demand from their users. In the meantime, Mozilla operates a fallback IdP at https://login.persona.org. This fallback allows users to sign into sites with their existing email address, regardless of whether or not the email provider supports Persona. The fallback IdP will certify email addresses from any domain using its own authentication flow and its own password, so long as the user is able to prove control of an address by clicking a link in a verification email.

+

Once an email provider supports Persona natively, its users will transparently begin use it instead of the fallback IdP.

+

Cross-browser API Library

+

For Persona to work, the user's browser must support the navigator.id API. Eventually, browsers will add native support for these APIs, but until then a cross-browser implementation is available at https://login.persona.org/include.js. By including this file, web sites can already begin using Persona. Once native implementations of the API are available, the library will automatically defer to those.

+

Remote verification service

+

At https://login.persona.org Mozilla hosts a remote verification service that web sites can use to verify identity assertions sent from users. This makes it simpler for web sites to support Persona as it takes care of parsing the assertion and cryptographically verifying user identities.

+

Once the Persona data formats stabilize, verification will most likely be done locally on each site's server. This transition is especially important for user privacy, since it will make it impossible for the fallback IdP to track its users. Even with remote verification, users of native IdPs can't be tracked by that IdP.

diff --git a/files/de/mozilla/persona/branding/index.html b/files/de/mozilla/persona/branding/index.html new file mode 100644 index 0000000000..f35f03575c --- /dev/null +++ b/files/de/mozilla/persona/branding/index.html @@ -0,0 +1,42 @@ +--- +title: Branding resources +slug: Mozilla/Persona/branding +translation_of: Archive/Mozilla/Persona/User_interface_guidelines +--- +

Einloggen mit Persona Buttons

+

Bilder

+

Der "Einloggen" Button ist in drei Versionen und drei Farben erhältlich:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Einloggen mit EmailadresseEinloggen mit PersonaEinloggen
Schwarz
Blau
Rot
+

CSS-Basis

+

Sawyer Hollenshead erzeugte ein Set exzellenter CSS-basierter Buttons. Download (.zip)

+

Mehr Info

+

Mehr Informationen über Persona's visuelles Design bei Sean Martell's style primer.

diff --git a/files/de/mozilla/persona/browser_compatibility/index.html b/files/de/mozilla/persona/browser_compatibility/index.html new file mode 100644 index 0000000000..716b5c3c46 --- /dev/null +++ b/files/de/mozilla/persona/browser_compatibility/index.html @@ -0,0 +1,84 @@ +--- +title: Browser Kompatibilität +slug: Mozilla/Persona/Browser_compatibility +translation_of: Archive/Mozilla/Persona/Browser_compatibility +--- +

Unterstützte Browser

+

Persona wird mit den folgenden Browsern entwickelt und getestet. Dank Personas plattformübergreifender JavaScript Bibliothek benötigen Nutzer keine Add-Ons, um Persona zu nutzen.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Desktop Browser
Internet Explorer8.0*, 9.0, 10.0** (siehe Kompatibilitätsmodus)
FirefoxAktuelle Version, Beta, Aurora, Nightly, und Extended Support Versionen, vorige stabile Version
ChromeLetzte stabile Version
SafariLetzte stabile Version
OperaLetzte stabile Version
iOS Browser
Mobile SafariiOS 5.x — 6.x
Android Browser
Standardbrowser2.2 — 4.x
FirefoxAktuelle Version, Beta, Aurora, Nightly, und Extended Support Versionen, vorige stabile Version
ChromeLetzte stabile Version
+

*: für Windows XP. : für Windows Vista und Windows 7. **Windows 8.  : As time allows.

+

Nicht unterstützte Browser

+ +

Internet Explorer Kompatibilitätsmodus

+

Ab Version 8.0 unterstützt der Internet Explorer eine Funktion namens Kompatibilitätsmodus, die zur Emulation älterer Internet Explorer Versionen beim Rendern einer Seite dient. Die Funktion kann über drei verschiedene Wege kontrolliert werden:

+
    +
  1. Als lokale Einstellung im Browser
  2. +
  3. Basierend auf der Präsenz und dem Inhalt der DOCTYPE Deklaration auf der Seite.
  4. +
  5. Als "X-UA-Compatible" header anstatt eines HTTP headers oder als <meta> tag auf einer Seite. Diese Mehtode überschreibt die beiden ersten.
  6. +
+

Weil nur Internet Explorer 8.0 und neuer von Persona unterstützt werden, werden Internet Explorer, die eine ältere Version emulieren, nicht mit Persona funktionieren. Dies ist typisch für einen der folgenden Gründe:

+ +

Für weitere Informationen siehe "Understanding Compatibility Modes in Internet Explorer 8" und "IE8 and IE9 Complications".

+

Andere Browser

+

Obwohl nicht explizit unterstützt, jeder Browser der {{ domxref("window.postMessage()") }} und {{ domxref("Storage", "localStorage") }} unterstützt sollte funktionieren. Diese APIs werden seit März 2010 von allen bekannten Browsern untertützt.

+

Bekannte Fehler

+ diff --git a/files/de/mozilla/persona/index.html b/files/de/mozilla/persona/index.html new file mode 100644 index 0000000000..0a8aa84850 --- /dev/null +++ b/files/de/mozilla/persona/index.html @@ -0,0 +1,133 @@ +--- +title: Persona +slug: Mozilla/Persona +tags: + - Persona +translation_of: Archive/Mozilla/Persona +--- +
+

Bleibe informiert oder bekomme Hilfe!

+ +

Verfolge unseren Blog, trete unserer Mailingliste bei oder finde uns in #identity in IRC.

+
+ +

Mozilla Persona ist ein browserunabhängiges Login-System für das Web, das einfach zu verwenden und einfach einzusetzen ist. Es funktioniert mit allen wichtigen Browsern und du kannst noch heute beginnen.

+ +

Warum solltest du Persona auf deiner Seite verwenden?

+ +
    +
  1. Persona löst Webseiten-spezifische Passwörter vollständig ab, wodurch es Benutzer und Websites von der Last der Erstellung, Verwaltung und sicheren Speicherung von Passwörtern befreit.
  2. +
  3. Persona ist einfach zu bedienen. Mit nur zwei Klicks kann sich ein Persona-Benutzer bei einer neuen Website wie Voost registrieren und dabei alle Probleme bei der Account-Erstellung umgehen.
  4. +
  5. Persona ist einfach zu implementieren. Entwickler können Persona zu einer Website in einem einzigen Nachmittag hinzufügen.
  6. +
  7. Das Beste von allem, es gibt kein Lock-in. Entwickler erhalten eine verifizierte E-Mail-Adresse für alle ihre Benutzer und Benutzer können eine beliebige E-Mail-Adresse mit Persona verwenden.
  8. +
+ +

Und Persona wird stetig besser: Es basiert auf einem offenen, dezentralisierten Protokoll, das dafür ausgelegt ist, eine direkte Integration in Browser und native Unterstützung von E-Mail-Providern zu erlauben. Webseiten die Persona heute implementieren werden diese Verbesserungen automatisch in Erfahrung bringen, ohne irgendeinen Code ändern zu müssen.

+ +
Hinweis: Persona befindet sich in aktiver Entwicklung. Verfolge unseren Blog um von neuen Funktionen zu erfahren oder trete unserer Mailingliste bei und gib uns dein Feedback!
+ +

Verwenden von Persona auf Ihrer Webseite

+ + + + + + + + + + + + +
+

Der Einstieg

+ +
+
Warum Persona?
+
+ +

Sehen Sie, wieso Persona entwickelt wurde und warum es so toll ist! Und auch den Vergleich mit anderen Diensten scheuen wir uns nicht.

+ +
+
Schnellstart
+
Ein Schnellrundgang zeigt Ihnen, wie Sie Persona auf Ihrer Webseite integrieren können.
+
+
+

Persona API Referenz

+ +
+
Die navigator.id API-Referenz
+
Referenz für das navigator.id Objekt, welches Webentwickler nutzen können, um Persona in Webseiten einzubinden.
+
Verifikations-API-Referenz
+
Die Referenz für die remote verification API finden Sie auf https://verifier.login.persona.org/verify.
+
+
+

Leitfaden

+ +
+
Sicherheitsaspekte
+
Praktiken und Techniken um sicherzustellen, dass Ihre Persona-Einbindung sicher ist.
+
Browserkompatiblität
+
Erfahre ganau, welche Browser Persona unterstützen.
+
Internationalisierung
+
Erfahre, wie Persona mit unterschiedlichen Sprachen umgeht.
+
Leitfaden für Website-Entwickler
+
Tipps von Web-Seiten, die eine Unterstützung für PERSONA bereits anbieten
+
+
+

Ressourcen

+ +
+
Libraries und Plugins
+
Finde eine drop-in Bibliothek für deine bevorzugte Programmiersprache, Web-Framework, Blog oder Content-Management-System.
+
Das Persona Kochbuch
+
Beispiel Sourcecode für Persona-Seiten. Beinhaltet Schnipsel in PHP, Node.JS und mehr.
+
Branding resources
+
Anmelde-Buttons und andere Grafiken, die dabei helfen Persona Ihren Nutzern zu präsentieren.
+
+
+ +

 

+ + + + + + + + +
+

Informationen für Identitäts-Provider

+ +

Wenn du ein E-Mail Betreiber oder ein Idäntitäts-Provider bist, dann schau dir die folgenden Links an in denen man ein Persona Idäntitäts-Provider werden kann.

+ +
+
IdP Überblick
+
Ein hoher Rang von Persona Idäntitäts-Providern.
+
Implementieren eines IdP
+
Ein detaillierter Leitfaden zu den technischen Details, wie man ein IdP wird.
+
.well-known/browserid
+
Ein Überblick über die Struktur und den Zweck der .well-known/browserid Datei, welche IdPs benutzen, um auf deren Unterstützung für das Protokoll hinzuweisen.
+
+
+

Das Persona Projekt

+ +
+
Glossary
+
Die BrowserID und Persona Fachsprache.
+
FAQ
+
Antworten zu gängigen Fragen.
+
Überblick des Protokolls
+
Gewinnen Sie einen Überblick über das verwendete BrowserID-Protokoll.
+
Kryptographie
+
Ein Blick auf die kryptographischen Konzepte und Sicherheitsfunktionen hinter Persona und BrowserID.
+
Die Spezifikation
+
Tiefe technische Details gibt es hier.
+
Die Persona Webseite
+
Damit Persona perfekt funktionieren kann verwenden wir drei Dienste auf: https://login.persona.org: Eine Rückfall-System für die Anmeldun, eine browser- und systemunabhängige Implementierung der {{ domxref("navigator.id") }} APIs und natürlich einen Verifizierungs-Dienst.
+
Der Persona Quellcode
+
Der Code hinter der Persona-Webseite liegt in einem Repository bei GitHub. Helfer sind immer ❤ Willkommen!
+
+
+ +

 

diff --git a/files/de/mozilla/persona/protocol_overview/index.html b/files/de/mozilla/persona/protocol_overview/index.html new file mode 100644 index 0000000000..44c6eab3da --- /dev/null +++ b/files/de/mozilla/persona/protocol_overview/index.html @@ -0,0 +1,61 @@ +--- +title: Protokoll Überblick +slug: Mozilla/Persona/Protocol_Overview +translation_of: Archive/Mozilla/Persona/Protocol_Overview +--- +

Persona baut auf dem BrowserID Protokoll auf. Diese Seite beschreibt das BrowserID Protokoll auf hohem Niveau.

+

Akteure

+

Das Protokoll umfasst drei Akteure:

+ +

Persona und das BrowserID Protokoll benutzen E-mail Adressen als Identität, daher ist es üblich, dass der E-mail Provider die Rolle des IdPs einnimmt.

+

Mozilla betreibt einen "fallback IdP", so dass Benutzer jede E-mail Adresse für Persona benutzen können, sogar wenn eine Domain keinen IdP Status besitzt.

+

Protocol Steps

+

There are three distinct steps in the protocol:

+
    +
  1. User Certificate Provisioning
  2. +
  3. Assertion Generation
  4. +
  5. Assertion Verification
  6. +
+

As a prerequisite, the user should have an active identity (email address) that they wish to use when logging in to websites. The protocol does not require that IdP-backed identities are SMTP-routable, but it does require that identities follow the user@domain format.

+

User Certificate Provisioning

+

In order to sign into an RP, a user must be able to prove ownership of their preferred email address. The foundation of this proof is a cryptographically signed certificate from an IdP certifying the connection between a browser's user and a given identity within the IdP's domain.

+

Because Persona uses standard public key cryptography techniques, the user certificate is signed by the IdP's private key and contains:

+ +

The user's browser generates a different keypair for each of the user's email addresses, and these keypairs are not shared across browsers. Thus, a user must obtain a fresh certificate whenever one expires, or whenever using a new browser or computer. Certificates must expire within 24 hours of being issued.

+

When a user selects an identity to use when signing into an RP, the browser checks to see if it has a fresh user certificate for that address. If it does, this step is complete and the browser continues with the assertion generation step below. If the browser does not have a fresh certificate, it attempts to obtain one from the domain associated with the chosen identity.

+
    +
  1. The browser fetches the /.well-known/browserid support document over SSL from the identity's domain.
  2. +
  3. Using information from the support document, the browser passes the user's email address and associated public key to the IdP and requests a signed certificate.
  4. +
  5. If necessary, the user is asked to sign into the IdP before provisioning proceeds.
  6. +
  7. The IdP creates, signs, and gives a user certificate to the user's browser.
  8. +
+

With the certificate in hand, the browser can continue with generating an identity assertion and signing into an RP.

+

user-certificate-provisioning.png

+

Assertion Generation

+

The user certificate establishes a verifiable link between an email address and a public key. However, this is alone not enough to log into a website: the user still has to show their connection to the certificate by proving ownership of the private key.

+

In order to prove ownership of a private key, the user's browser creates and signs a new document called an "identity assertion." It contains:

+ +

The browser then presents both the user certificate and the identity assertion to the RP for verification.

+

Assertion Verification

+

The combination of user certificate and identity assertion is sufficient to confirm a user's identity.

+

First, the RP checks the domain and expiration time in the assertion. If the assertion is expired or intended for a different domain, it's rejected. This prevents malicious re-use of assertions.

+

Second, the RP validates the signature on the assertion with the public key inside the user certificate. If the key and signature match, the RP is assured that the current user really does possess the key associated with the certificate.

+

Last, the RP fetches the IdP's public key from its /.well-known/browserid document and verifies that it matches the signature on the user certificate. If it does, then the RP can be certain that the certificate really was issued by the domain in question.

+

Once verifying that this is a current login attempt for the proper RP, that the user certificate matches the current user, and that the user certificate is legitimate, the RP is done and can authenticate the user as the identity contained in the certificate.

+

assertion-generation-and-verify.png

+

The Persona Fallback IdP

+

What if a user's email provider doesn't support Persona? In that case, the provisioning step would fail. By convention, the user's browser handles this by asking a trusted third party, https://login.persona.org/, to certify the user's identity on behalf of the unsupported domain. After demonstrating ownership of the address, the user would then receive a certificate issued by the fallback IdP, login.persona.org, rather than the identity's domain.

+

RPs follow a similar process when validating the assertion: the RP would ultimately request the fallback IdP's public key in order to verify the certificate.

diff --git a/files/de/mozilla/persona/schnellstart/index.html b/files/de/mozilla/persona/schnellstart/index.html new file mode 100644 index 0000000000..31a45b7553 --- /dev/null +++ b/files/de/mozilla/persona/schnellstart/index.html @@ -0,0 +1,201 @@ +--- +title: Schnellstart +slug: Mozilla/Persona/Schnellstart +translation_of: Archive/Mozilla/Persona/Quick_Setup +--- +

Sie benötigen nur 5 Schritte um Persona ihrer Webseite hinzuzufügen:

+
    +
  1. Binden Sie die Persona JavaScript Bibliothek in ihre Webseite ein.
  2. +
  3. Fügen Sie jeweils einen "Login" und "Logout" Button hinzu.
  4. +
  5. Achten Sie auf die Aktionen der Nutzer.
  6. +
  7. Überprüfen Sie die Informationen des Nutzers.
  8. +
  9. Beachten Sie die Informationen für Sicheres Einbinden.
  10. +
+

Sie sollten in der Lage sein, Persona an einem einzigen Nachmittag zu implementieren. Zuvor sollten Sie sich allerdings in den Persona notices Newsletter eintragen. Der Newsletter versendet nur sicherheitsrelevante E-Mails.

+

Schritt 1: Einbinden der Persona Bibliothek

+

Persona ist Browser-neutral programmiert und unterstützt alle großen Desktop- und Mobilbrowser.

+

Wir erwarten für die Zukunft, dass die Browser Persona direkt und ohne externe Bibliothek unterstützten. Solange dies nicht der Fall ist, stellen wir eine JavaScript Bibliothek bereit, die die Benutzeroberfläche und den Client-seitigen Teil des Persona-Protokolls übernimmt. Durch die Einbindung dieser Bibliothek kann sich jeder Nutzer anmelden, egal, ob sein Browser Persona direkt unterstützt, oder nicht.

+

Sobald die Bibliothek in der Seite geladen ist, sind die Persona Funktionen ({{ domxref("navigator.id.watch()", "watch()") }}, {{ domxref("navigator.id.request()", "request()") }}, und {{ domxref("navigator.id.logout()", "logout()") }}) im globalen navigator.id Knoten vorhanden.

+

Um die Persona JavaScript Bibliothek einzubinden plazieren Sie diesen script Tag am Ende der HTML-Seite:

+
<script src="https://login.persona.org/include.js"></script>
+
+

Sie müssen dies am Ende jeder Seite einfügen, die {{ domxref("navigator.id") }}  benutzen soll. Da sich Persona immer noch in der Entwicklung befindet, sollten Sie die Persona include.js Datei nicht selber bereitstellen.

+

Unterdrückung des Kompatibilitätsmodus

+

Damit Persona auch im Internet Explorer funktioniert, sollten Sie dessen Kompatibilitätsmodus unterdrücken. Dies kann auf zwei Wegen geschehen:

+ +

Für weitere Informationen schauen Sie bitte bei IE Compatibility Mode und "IE8 and IE9 Complications" vorbei.

+

Schritt 2: Hinzufügen der Login und Logout Buttons

+

Da Persona als Bestandteil der DOM API entwickelt wurde, müssen Sie Funktionen ausführen, sobald ein Nutzer auf einen der beiden Button klickt. Um den Anmelden Dialog auszuführen, sollten sie {{ domxref("navigator.id.request()") }} aufrufen. Für den Logout starten Sie bitte {{ domxref("navigator.id.logout()") }}. Notiz: Der Aufruf von {{ domxref("navigator.id.logout()", "logout()") }} muss in dem Click-Handler des Logout-Buttons ausgeführt werden.

+

Als Beispiel:

+
var signinLink = document.getElementById('signin');
+if (signinLink) {
+  signinLink.onclick = function() { navigator.id.request(); };
+}
+
+var signoutLink = document.getElementById('signout');
+if (signoutLink) {
+  signoutLink.onclick = function() { navigator.id.logout(); };
+}
+
+

Wie sollten diese Buttons aussehen? Betrachte unsere Branding Resources Seite für vorgefertigte Persona-Bilder und CSS-basierte Buttons.

+

Schritt 3: Warte auf Login und Logout Aktionen

+

Damit Persona funktioniert, musst du ihm mitteilen, wenn sich ein Nutzer an- bzw. abmeldet. Dies geschieht durch Übergabe dreier Parameter an die Funktion {{ domxref("navigator.id.watch()") }}. Die drei Parameter sind:

+
    +
  1. +

    Die E-Mail Adresse des momentan angemeldeten Nutzers, oder aber, wenn niemand angemeldet ist null Beispielsweise kannst du den Cookie auslesen, um herauszufinden, wer angemeldet ist.

    +
  2. +
  3. +

    Eine Funktion für den Fall, dass onlogin ausgelöst wird. This function is passed a single parameter, an “identity assertion,” which must be verified.

    +
  4. +
  5. +

    Eine Funktion, die aufzurufen ist, wenn onlogout ausgelöst wird. Dieser Funktion werden keine Parameter mitgegeben.

    +
  6. +
+
+
+

Beachte: Sie müssen immer beide, onlogin und onlogout übergeben, wenn Sie {{ domxref("navigator.id.watch()") }} aufrufen.

+
+
+

Wenn beispielsweise Bob angemeldet ist, müssen Sie folgendes tun:

+
var currentUser = 'bob@example.com';
+
+navigator.id.watch({
+  loggedInUser: currentUser,
+  onlogin: function(assertion) {
+    // Ein Nutzer hat sich angemeldete. Hier müssen Sie:
+    // 1. Send the assertion to your backend for verification and to create a session.
+    // 2. Aktualisiere die Oberfläche
+    $.ajax({ /* <-- This example uses jQuery, but you can use whatever you'd like */
+      type: 'POST',
+      url: '/auth/login', // This is a URL on your website.
+      data: {assertion: assertion},
+      success: function(res, status, xhr) { window.location.reload(); },
+      error: function(xhr, status, err) {
+        navigator.id.logout();
+        alert("Login failure: " + err);
+      }
+    });
+  },
+  onlogout: function() {
+    // A user has logged out! Here you need to:
+    // Tear down the user's session by redirecting the user or making a call to your backend.
+    // Also, make sure loggedInUser will get set to null on the next page load.
+    // (That's a literal JavaScript null. Not false, 0, or undefined. null.)
+    $.ajax({
+      type: 'POST',
+      url: '/auth/logout', // This is a URL on your website.
+      success: function(res, status, xhr) { window.location.reload(); },
+      error: function(xhr, status, err) { alert("Logout failure: " + err); }
+    });
+  }
+});
+
+

In this example, both onlogin and onlogout are implemented by making an asynchronous POST request to your site’s backend. The backend then logs the user in or out, usually by setting or deleting information in a session cookie. Then, if everything checks out, the page reloads to take into account the new login state.

+

Note that if the identity assertion can't be verified, you should call {{ domxref("navigator.id.logout()") }}: this has the effect of telling Persona that none is currently logged in. If you don't do this, then Persona may immediately call onlogin again with the same assertion, and this can lead to an endless loop of failed logins.

+

You can, of course, use AJAX to implement this without reloading or redirecting, but that’s beyond the scope of this tutorial.

+

Here is another example, this time not using jQuery.

+
function simpleXhrSentinel(xhr) {
+    return function() {
+        if (xhr.readyState == 4) {
+            if (xhr.status == 200){
+                // reload page to reflect new login state
+                window.location.reload();
+              }
+            else {
+                navigator.id.logout();
+                alert("XMLHttpRequest error: " + xhr.status);
+              }
+            }
+          }
+        }
+
+function verifyAssertion(assertion) {
+    // Your backend must return HTTP status code 200 to indicate successful
+    // verification of user's email address and it must arrange for the binding
+    // of currentUser to said address when the page is reloaded
+    var xhr = new XMLHttpRequest();
+    xhr.open("POST", "/xhr/sign-in", true);
+    // see http://www.openjs.com/articles/ajax_xmlhttp_using_post.php
+    var param = "assertion="+assertion;
+    xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+    xhr.setRequestHeader("Content-length", param.length);
+    xhr.setRequestHeader("Connection", "close");
+    xhr.send(param); // for verification by your backend
+
+    xhr.onreadystatechange = simpleXhrSentinel(xhr); }
+
+function signoutUser() {
+    // Your backend must return HTTP status code 200 to indicate successful
+    // sign out (usually the resetting of one or more session variables) and
+    // it must arrange for the binding of currentUser to 'null' when the page
+    // is reloaded
+    var xhr = new XMLHttpRequest();
+    xhr.open("GET", "/xhr/sign-out", true);
+    xhr.send(null);
+    xhr.onreadystatechange = simpleXhrSentinel(xhr); }
+
+// Go!
+navigator.id.watch( {
+    loggedInUser: currentUser,
+         onlogin: verifyAssertion,
+        onlogout: signoutUser } );
+
+

You must call navigator.id.watch() on every page with a login or logout button. To support Persona enhancements like automatic login and global logout for your users, you should call this function on every page of your site.

+

Persona will compare the email address you've passed into loggedInUser with its own knowledge of whether a user is currently logged in, and who they are. If these don't match, it may automatically invoke onlogin or onlogout on page load.

+

 

+

Step 4: Verify the user’s credentials

+

Instead of passwords, Persona uses “identity assertions,” which are kind of like single-use, single-site passwords combined with the user’s email address. When a user wants to log in, your onlogin callback will be invoked with an assertion from that user. Before you can log them in, you must verify that the assertion is valid.

+

It’s extremely important that you verify the assertion on your server, and not in JavaScript running on the user’s browser, since that would be easy to forge. The example above handed off the assertion to the site’s backend by using jQuery’s $.ajax() helper to POST it to /auth/login.

+

Once your server has an assertion, how do you verify it? The easiest way is to use a helper service provided by Mozilla. Simply POST the assertion to https://verifier.login.persona.org/verify with two parameters:

+
    +
  1. assertion: The identity assertion provided by the user.
  2. +
  3. audience: The hostname and port of your website. You must hardcode this value in your backend; do not derive it from any data supplied by the user.
  4. +
+

For example, if you’re example.com, you can use the command line to test an assertion with:

+
$ curl -d "assertion=<ASSERTION>&audience=https://example.com:443" "https://verifier.login.persona.org/verify"
+
+

If it’s valid, you’ll get a JSON response like this:

+
{
+  "status": "okay",
+  "email": "bob@eyedee.me",
+  "audience": "https://example.com:443",
+  "expires": 1308859352261,
+  "issuer": "eyedee.me"
+}
+
+

You can learn more about the verification service by reading The Verification Service API. An example /auth/login implementation, using Python, the Flask web framework, and the Requests HTTP library might look like this:

+
@app.route('/auth/login', methods=['POST'])
+def login():
+    # The request has to have an assertion for us to verify
+    if 'assertion' not in request.form:
+        abort(400)
+
+    # Send the assertion to Mozilla's verifier service.
+    data = {'assertion': request.form['assertion'], 'audience': 'https://example.com:443'}
+    resp = requests.post('https://verifier.login.persona.org/verify', data=data, verify=True)
+
+    # Did the verifier respond?
+    if resp.ok:
+        # Parse the response
+        verification_data = json.loads(resp.content)
+
+        # Check if the assertion was valid
+        if verification_data['status'] == 'okay':
+            # Log the user in by setting a secure session cookie
+            session.update({'email': verification_data['email']})
+            return 'You are logged in'
+
+    # Oops, something failed. Abort.
+    abort(500)
+
+

For examples of how to use Persona in other languages, have a look at the cookbook.

+

The session management is probably very similar to your existing login system. The first big change is in verifying the user’s identity by checking an assertion instead of checking a password. The other big change is ensuring that the user’s email address is available for use as the loggedInUser parameter to {{ domxref("navigator.id.watch()") }}.

+

Logout is simple: you just need to remove the user’s session cookie.

+

Step 5: Review best practices

+

Once everything works and you’ve successfully logged into and out of your site, you should take a moment to review best practices for using Persona safely and securely.

+

If you're making a production site, have a look at the implementor's guide, where we've collected tips for adding the kind of features often needed in real-world login systems.

+

Lastly, don’t forget to sign up for the Persona notices mailing list so you’re notified of any security issues or backwards incompatible changes to the Persona API. The list is extremely low traffic: it’s only used to announce changes which may adversely impact your site.

+

 

diff --git a/files/de/mozilla/persona/warum_persona/index.html b/files/de/mozilla/persona/warum_persona/index.html new file mode 100644 index 0000000000..337a84a544 --- /dev/null +++ b/files/de/mozilla/persona/warum_persona/index.html @@ -0,0 +1,31 @@ +--- +title: Warum Persona? +slug: Mozilla/Persona/Warum_Persona +translation_of: Archive/Mozilla/Persona/Why_Persona +--- +

 

+

Das existierende System von Benutzernamen und Paswörtern ist inakzeptabel: Von den Nutzern wird erwartet, dass sie ein neues, komplexes Passwort für jede Site und jeden Dienst erstellen und sich an dieses erinnern. Und jede Site muss das Passwort sicher speichern. Allerdings zeigen Hacker-Angriffe gerade in letzter Zeit, dass sogar namhafte Unternehmen Lücken in der Passwortsicherheit haben und die Daten ihrer Nutzer damit in Gefahr bringen.

+

Persona ist ein offenes, verteiltes, webweites Identitätssystem, das die Passworteingabe für jede Site ersetzt.  Es orientiert sich an der Benutzerfreundlichkeit und begegnet den Datenschutzmängeln von Systemen wie OpenID, ohne dabei auf die zentrale Infrastruktur zurückzugreifen wie sie beispielsweise Facebook Connect nutzt.

+

Persona macht Passwörter für jede Site überflüssig

+

Anstatt eines Passworts für jede einzelne Site, erlaubt Persona die Anmeldung mit nur zwei Klicks, nach Abschluß eines einfachen, einmaligen Vorgangs für jede Identität.  Das ist sicher, geschützt und basiert auf einem öffentlichen Schlüssel modernster Kryptografie. Statt eines Passworts erzeugt der Browser des Nuzers eine kryptografische "Idenditätserklärung", die nach wenigen Minuten abläuft und nur für eine einzelne Site gültig ist. Weil es keine seitenspezifischen Passwörter gibt, brauchen sich Websites, die Persona nutzen, nicht um die sichere Speicherung oder den potentiellen Verlust der Passwortdatenbank kümmern.

+

Der schnelle Registriervorgang reduziert außerdem den "Nutzerwiderstand" beim Besuch neuer Sites.

+

Persona Identitäten sind Email-Addressen

+

Anstatt eines freien Usernamens verwendet Persona Email-Addressen als Identitäten. Dies hat zahlreiche Vorteile sowohl für den Nutzer als auch den Entwickler:

+

Nutzervorteile bei Verwendung von Email-Adressen

+ +

Vorteile für Entwickler bei Verwendung von Email-Addressen

+ +

Ganz zu schweigen davon, dass Email ein bereits bestehendes, ausgereiftes System mit Milliarden von Konten unzähliger Anbieter darstellt.

+

Worin unterscheidet sich Persona von anderen Einmal-Zugangsanbietern?

+

Persona ist sicher, geschützt und einfach. Es schützt die Privatspähre, die Kontrolle und die Wahlfreiheit der Nutzer in einer Art, wie es andere Anbieter nicht tun oder nicht können.

+

Viele soziale Netzwerke wie Facebook and Google+ benötigen Nutzer die ihren realen Namen verwenden und schränken die Nutzer auf ein einziges Konto ein. Dadurch, dass Persona auf Email-Adressen beruht, erlaubt es den Nutzern ihre verschiedenen Arbeits-, Heim-, Schul- und andere Identitäten zu trennen.

+

Persona ist offen und dezentral: Jeder mit einer Email-Adresse kann sich bei Sites anmelden, die Persona verwenden. Zudem kann jeder seine eigene Identität hosten oder delegieren - eben genau wie Emails. Dies steht im Gegensatz zu Zugangsdiensten sozialer Netzwerke, die ein einziges, zentrales Konto benötigen.

+

Persona bietet außerdem einen neuen Ansatz um die Privatspähre der Nutzer zu schützen, indem es den Browser des Nutzers in den Mittelpunkt des Authentifzierungsprozesses stellt: Der Browser erhält Anmeldeinformationen vom Email-Anbieter des Nutzers und stellt diese Informationen der Website zur Verfügung. Der Email-Anbieter kann den Nutzer nicht nachverfolgen ("tracken"), aber Websiten können dennoch durch die kryptografisches Verifikation der Anmeldeinformationen der Identität des Nutzers vertrauen. Die meisten anderen Systeme, selbst dezentrale wie OpenID, verlangen, dass die Site "nach Hause telefoniert" bevor sie dem Nutzer die Anmeldung gestatten.

diff --git a/files/de/mozilla/preferences/eine_kurze_anleitung_zu_mozilla_einstellungen/index.html b/files/de/mozilla/preferences/eine_kurze_anleitung_zu_mozilla_einstellungen/index.html new file mode 100644 index 0000000000..ac734def51 --- /dev/null +++ b/files/de/mozilla/preferences/eine_kurze_anleitung_zu_mozilla_einstellungen/index.html @@ -0,0 +1,10 @@ +--- +title: Eine kurze Anleitung zur Mozilla- Einstellungen +slug: Mozilla/Preferences/Eine_kurze_Anleitung_zu_Mozilla_Einstellungen +tags: + - Favoriten +translation_of: Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences +--- +

Dieser Artikel ist für Mozilla viel Nutzer und Systemadministratoren, das darauf abzielt einen allgemeinen Überblick in den Mozilla- Einstellungen zu gewährleisten.
+ Insbesondere über das speichern

+

Datei-für-Datei so wie das Bearbeiten der Ladesequenz dieser

diff --git a/files/de/mozilla/preferences/index.html b/files/de/mozilla/preferences/index.html new file mode 100644 index 0000000000..1169ecabf1 --- /dev/null +++ b/files/de/mozilla/preferences/index.html @@ -0,0 +1,48 @@ +--- +title: Preferences +slug: Mozilla/Preferences +tags: + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Preferences +--- +

The preference system makes it possible to store data for Mozilla applications using a key/value pairing system. These articles provide information about how to use the preference system.

+ + + + + + + +
+

Documentation

+
+
Preferences system
+
An introduction to using the preference system in Mozilla.
+
XUL School: Handling preferences
+
The XUL School tutorial chapter on preferences.
+
Mozilla preference reference
+
A reference guide to all Mozilla preferences; currently a work in progress.
+
A brief guide to Mozilla preferences
+
An introductory guide to where preferences are stored and other useful information about the core preference system.
+
Using preferences from application code {{gecko_minversion_inline("6.0")}}
+
Firefox 6 introduced static functions for accessing preferences efficiently from within application code. This API is not available for add-ons, but if you're working on a Gecko application, this API is the preferred way to access preferences.
+
Mozilla networking preferences
+
A guide to key networking-related preferences.
+
Mozilla preferences for uber-geeks
+
A guide to preferences that only truly elite geeks should play with.
+
+

View all pages tagged with "Preferences"...

+
+

Examples

+
+
Code snippets
+
Preference-related code snippets.
+
Adding preferences to an extension
+
How to add preferences to an existing extension.
+
+ + +
diff --git a/files/de/mozilla/projects/deutsch/index.html b/files/de/mozilla/projects/deutsch/index.html new file mode 100644 index 0000000000..e422dcde65 --- /dev/null +++ b/files/de/mozilla/projects/deutsch/index.html @@ -0,0 +1,35 @@ +--- +title: Emscripten +slug: Mozilla/Projects/Deutsch +translation_of: Mozilla/Projects/Emscripten +--- +
+

Emscripten is an LLVM to JavaScript compiler. It takes LLVM bytecode (e.g. generated from C/C++ using Clang, or from another language) and compiles that into JavaScript, which can be run on the Web.

+
+
+

The resources here provide you with all you need to know to get up and running with Emscripten at a basic level, allowing you to take your first steps with Emscripten, and discover how Emscripten can be leveraged to produce more powerful web apps. For a more detailed set of documentation, you should consult the official Emscripten Wiki.

+

Using Emscripten, you can

+ +

If you are new to Emscripten you start off by installing Emscripten on your system, and working through our Introducing Emscripten section.

+
+

Note: the current release version of Emscripten is 1.7.8.

+
+
+ +
    +
  1. Introducing Emscripten +
      +
    1. Emscripten beginner's tutorial
    2. +
    3. What is Emscripten and how does it work?
    4. +
    5. The nature of Emscripten-compiled JavaScript
    6. +
    7. Putting Emscripten in your toolchain
    8. +
    +
  2. +
  3. Web abilities and limitations
  4. +
  5. Download and install
  6. +
  7. Workflow and tools
  8. +
  9. Emscripten Techniques
  10. +
diff --git a/files/de/mozilla/projects/index.html b/files/de/mozilla/projects/index.html new file mode 100644 index 0000000000..6291137b31 --- /dev/null +++ b/files/de/mozilla/projects/index.html @@ -0,0 +1,14 @@ +--- +title: Projects +slug: Mozilla/Projects +tags: + - Mozilla + - NeedsContent + - NeedsTranslation + - Projects + - TopicStub +translation_of: Mozilla/Projects +--- +

{{ draft() }}

+

This page needs to become a pretty index to Mozilla projects whose documentation is located under it.

+

{{ LandingPageListSubpages() }}

diff --git a/files/de/mozilla/projects/nss/index.html b/files/de/mozilla/projects/nss/index.html new file mode 100644 index 0000000000..f69cd1dab7 --- /dev/null +++ b/files/de/mozilla/projects/nss/index.html @@ -0,0 +1,186 @@ +--- +title: Network Security Services +slug: Mozilla/Projects/NSS +tags: + - JSS + - NSS + - NeedsMigration + - NeedsTranslation + - TopicStub +translation_of: Mozilla/Projects/NSS +--- +

Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards.

+ +

For detailed information on standards supported, see Overview of NSS. For a list of frequently asked questions, see the FAQ.

+ +

NSS is available under the Mozilla Public License. For information on downloading NSS releases as tar files, see Download PKI Source.

+ +

If you're a developer and would like to contribute to NSS, you might want to read the documents highlevel overview of internal details of NSS and getting started with NSS.

+ + + + + + + + +
+

Documentation

+ +

Background Information

+ +
+
Overview of NSS
+
Provides a brief summary of NSS and its capabilities.
+
NSS FAQ
+
Answers basic questions about NSS.
+
Introduction to Public-Key Cryptography
+
Explains the basic concepts of public-key cryptography that underlie NSS.
+
Introduction to SSL
+
Introduces the SSL protocol, including information about cryptographic ciphers supported by SSL and the steps involved in the SSL handshake.
+
+ +

Getting Started

+ +
+
NSS Releases
+
This page contains information about the current and past releases of NSS.
+
Get the source code and Build it
+
Instructions on how to build NSS on the different supported platforms.
+
Get Mozilla Source Code Using Mercurial
+
Information about with working with Mercurial.
+
Get Mozilla Source Code Using CVS (deprecated)
+
Old deprecated CVS documentation.
+
+ +

NSS APIs

+ +
+
Introduction to Network Security Services
+
Provides an overview of the NSS libraries and what you need to know to use them.
+
NSS Public Functions
+
Summarizes the APIs exported by the NSS shared libraries.
+
NSS Reference
+
API used to invoke SSL operations.
+
NSS API Guidelines
+
Explains how the libraries and code are organized, and guidelines for developing code (naming conventions, error handling, thread safety, etc.)
+
NSS Technical Notes
+
Links to NSS technical notes, which provide latest information about new NSS features and supplementary documentation for advanced topics in programming with NSS.
+
+ +

Tools, testing, and other technical details

+ +
+
Build Instructions for NSS
+
Describe how to check out and build NSS releases.
+
+ +
+
NSS Developer Tutorial
+
How to make changes in NSS. Coding style, maintaining ABI compatibility.
+
+ +
+
NSS Tools
+
Tools for developing, debugging, and managing applications that use NSS.
+
Sample Code
+
Demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc.
+
NSS 3.2 Test Suite
+
Archived version. Describes how to run the standard NSS tests.
+
NSS Performance Reports
+
Archived version. Links to performance reports for NSS 3.2 and later releases.
+
Encryption Technologies Available in NSS 3.11
+
Archived version. Lists the cryptographic algorithms used by NSS 3.11.
+
NSS 3.1 Loadable Root Certificates
+
Archived version. Describes the scheme for loading root CA certificates.
+
cert7.db
+
Archived version. General format of the cert7.db database.
+
+ +

PKCS #11 information

+ + + +
+
+ +

CA certificates pre-loaded into NSS

+ + + +
+
+ +

NSS is built on top of Netscape Portable Runtime (NSPR)

+ +
+
Netscape Portable Runtime
+
NSPR project page.
+
NSPR Reference
+
NSPR API documentation.
+
+ +

Additional Information

+ + + +

Testing

+ + + +

Planning

+ +

Information on NSS planning can be found at wiki.mozilla.org, including:

+ + +
+

Community

+ +
    +
  • View Mozilla Security forums...
  • +
+ +

{{ DiscussionList("dev-security", "mozilla.dev.security") }}

+ +
    +
  • View Mozilla Cryptography forums...
  • +
+ +

{{ DiscussionList("dev-tech-crypto", "mozilla.dev.tech.crypto") }}

+ + + + +
+ +

 

diff --git a/files/de/mozilla/projects/nss/nss_3.33_release_notes/index.html b/files/de/mozilla/projects/nss/nss_3.33_release_notes/index.html new file mode 100644 index 0000000000..6bcaf94043 --- /dev/null +++ b/files/de/mozilla/projects/nss/nss_3.33_release_notes/index.html @@ -0,0 +1,78 @@ +--- +title: NSS 3.33 release notes +slug: Mozilla/Projects/NSS/NSS_3.33_release_notes +translation_of: Mozilla/Projects/NSS/NSS_3.33_release_notes +--- +

Einführung

+ +

Das Network Security Services (NSS) Team hat NSS 3.33 veröffentlicht, was eine Nebenversion darstellt.

+ +

Distribution information

+ +

The hg tag is NSS_3_33_RTM. NSS 3.33 requires Netscape Portable Runtime (NSPR) 4.17 or newer.

+ +

NSS 3.33 source distributions are available on ftp.mozilla.org for secure HTTPS download:

+ + + +

Bedeutende Änderungen in NSS 3.33

+ + + +

Neu in NSS 3.33

+ +

Neue Funktionalität

+ + + +

Neue Funktionen

+ + + +

Fehler behoben in NSS 3.33

+ +

This Bugzilla query returns all the bugs fixed in NSS 3.33:

+ +

https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.33

+ +

Kompatibilität

+ +

NSS 3.33 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.33 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.

+ +

Rückmeldung

+ +

Entdeckte Fehler sollten durch das Ausfüllen eines Fehlerberichts mithilfe von bugzilla.mozilla.org gemeldet werden (Produkt NSS).

diff --git a/files/de/mozilla/projects/nss/nss_sample_code/index.html b/files/de/mozilla/projects/nss/nss_sample_code/index.html new file mode 100644 index 0000000000..a765114f0b --- /dev/null +++ b/files/de/mozilla/projects/nss/nss_sample_code/index.html @@ -0,0 +1,25 @@ +--- +title: NSS Beispielcode +slug: Mozilla/Projects/NSS/NSS_Sample_Code +translation_of: Mozilla/Projects/NSS/NSS_Sample_Code +--- +

NSS Beispielcode

+ +

Die Sammlung an Beispielcode demonstriert wie NSS für Kryptographische Operationen, Zertifikat Handhabung, SSL, etc. verwendet werden kann. Außerdem werden einige "best practices" in der Anwendung von Kryptographie demonstriert.

+ +
    +
  1. Beispielcode 1: Schlüsselgenerierung und Transport zwischen Servern
  2. +
  3. Beispielcode 2: Symmetrische Verschlüsselung
  4. +
  5. Beispielcode 3: Hashing, MAC
  6. +
  7. Beispielcode 4: PKI Verschlüsselung
  8. +
  9. Beispielcode 5: PKI Verschlüsselung mit rohem öffentlichem & privatem Schlüssel im DER Format
  10. +
  11. Beispielcode 6: Konstante Symmetrische Schlüssel in der NSS Datenbank
  12. +
+ +


+ Dies sind sehr alte Code Beispiele die ersetzt werden müssen. Siehe https://bugzilla.mozilla.org/show_bug.cgi?id=490238

+ +

Die Beispiele können wie folgt heruntergeladen werden:

+ +
hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH
+
diff --git a/files/de/mozilla/projects/nss/pkcs11/index.html b/files/de/mozilla/projects/nss/pkcs11/index.html new file mode 100644 index 0000000000..1bb5996d30 --- /dev/null +++ b/files/de/mozilla/projects/nss/pkcs11/index.html @@ -0,0 +1,20 @@ +--- +title: PKCS11 +slug: Mozilla/Projects/NSS/PKCS11 +tags: + - NSS + - NeedsTranslation + - Security + - TopicStub +translation_of: Mozilla/Projects/NSS/PKCS11 +--- +

 

+ +

PKCS #11 information for implementors of cryptographic modules:

+ + diff --git a/files/de/mozilla/projects/nss/pkcs11/module_installation/index.html b/files/de/mozilla/projects/nss/pkcs11/module_installation/index.html new file mode 100644 index 0000000000..158c1944b0 --- /dev/null +++ b/files/de/mozilla/projects/nss/pkcs11/module_installation/index.html @@ -0,0 +1,32 @@ +--- +title: Installation des PKCS11-Moduls +slug: Mozilla/Projects/NSS/PKCS11/Module_Installation +translation_of: Mozilla/Projects/NSS/PKCS11/Module_Installation +--- +

PKCS #11 Module sind externe Module, die Firefox-Unterstützung für Smartcard-Lesegeräte, biometrische Sicherheitsgeräte und externe Zertifikatspeicher ergänzen. Dieser Artikel behandelt die beiden Methoden zum Installieren von PKCS-#11 Modulen in Firefox. Benutzer können das Einstellungsdialogfeld verwenden, um PKCS #11-Modul zu installieren oder zu entfernen. Erweiterungen können PKCS-#11 Module nsIPKCS11 programmgesteuert verwalten.

+ +
Hinweis: Die Informationen in diesem Artikel sind spezifisch für Firefox 3.5 und neuer. Ältere Versionen von Firefox unterstützen möglicherweise die window.pkcs11-Eigenschaft für die Installation von PKCS #11 Modulen.
+ +

Verwenden der Firefox-Einstellungen zum Installieren von PKCS-#11 Modulen

+ +
    +
  1. Speichern des PKCS-#11-Moduls an einem dauerhaften Speicherort auf Ihrem lokalen Computer
  2. +
  3. Öffnen Sie das Dialogfeld Firefox-Einstellungen. Wählen Sie "Erweitert" > "Verschlüsselung" > "Sicherheitsgeräte"
  4. +
  5. Wählen Sie "Load"
  6. +
  7. Geben Sie einen Namen für das Sicherheitsmodul ein, z. B. "Meine Clientdatenbank". HINWEIS: Es gibt derzeit einen Fehler in Firefox, bei dem internationale Zeichen Probleme verursachen können.
  8. +
  9. Wählen Sie "Durchsuchen..." , um den Speicherort des PKCS-#11-Moduls auf Ihrem lokalen Computer zu finden, und wählen Sie "OK", wenn Sie fertig sind.
  10. +
+ +

Bereitstellen von PKCS-#11-Modulen mithilfe der pkcs11-API

+ +

Ab Firefox 58 können Erweiterungen die Browsererweiterungs-API verwenden, um PKCS-#11 Module aufzuzählen und sie dem Browser als Schlüssel- und Zertifikatquellen zugänglich zu machen.pkcs11

+ +

Siehe auch

+ + diff --git a/files/de/mozilla/projects/thunderbird/thunderbird_lokalisation/index.html b/files/de/mozilla/projects/thunderbird/thunderbird_lokalisation/index.html new file mode 100644 index 0000000000..5b4c9e60d8 --- /dev/null +++ b/files/de/mozilla/projects/thunderbird/thunderbird_lokalisation/index.html @@ -0,0 +1,98 @@ +--- +title: Thunderbird Lokalisation +slug: Mozilla/Projects/Thunderbird/Thunderbird_Lokalisation +tags: + - Lokalisation + - thunderbird +translation_of: Mozilla/Projects/Thunderbird/Thunderbird_Localization +--- +

Diese Seite richtet sich an aktuelle und zukünftige Lokalisierer Thunderbirds, Mozilla Messagings E-Mail- und Usenet- Client. Sie deckt viele Aspekts ab, die ein Lokalisierer Thunderbirds kennen sollte, wie, notwendige Werkzeuge und wie man Informationen über lokalisationsrelevante Veranstaltungen und verschiedene andere interessante Angelegenheiten bekommt.

+ +

Erstellen einer Thunderbird-Lokalisation

+ +

Eine neue Lokalisation erstellen (Mercurial) - Dieser Artikel beschreibt, wie du eine neue Lokalisation Thunderbirds erstellen kannst.

+ +

Über Repostorien und Entwicklungszweige

+ +

Es gibt 3 aktive Repositorien für die Thunderbird-Entwicklung. Der Entwicklungsfortschritt Thunderbirds wird von einem Zweig zum nächsten alle sechs Wochen zusammengeführt.

+ + + +

Most locales will being working on comm-aurora. This repository/branch is stable with respect to strings for each six week period. Completing work here means it is ready for the first beta, and you won't need to work on beta branch. Your work will also automatically be carried forward.

+ +

Lokalisationsanforderungen

+ +

There are not significant restrictions on what locales can change. However, we need to work together on providing search engines for Thunderbird users to use to get the right balance of search engines and the correct options set. For further information see this page.

+ +

Lokalisationsübersicht

+ +

Die Lokalisations-Übersicht für Thunderbird gibt Lokalisierern eine präzise Übersicht über den aktuellen Zustand ihrer Lokalisationen. Weitere Informationen gibt es auf der  L10n Übersichts-Seite.

+ +

A localization will added to the l10n dashboard on request when it has reached a high-level of completion (> 80%) as shown by the compare-locales output. To request the addition of your locale to the dashboard, file a bug in the Thunderbird product/Build Config component.

+ +

L10n-relevante Informationen erhalten

+ +

Nachrichtengruppen & E-Mail-Verteiler

+ +

Localizers of Thunderbird should read the localization newsgroups (mozilla.dev.l10n.announce mozilla.dev.l10n) to stay informed of Thunderbird-specific and general l10n-related items of interest to them. They are further encouraged to read the Thunderbird development newsgroup (mozilla.dev.apps.thunderbird) to stay informed of recent Thunderbird-related developments.

+ +

These newsgroups can also be accessed via the dev-l10n-announce@lists.mozilla.org, dev-l10n@lists.mozilla.org (localization mailinglist) or dev-apps-thunderbird@lists.mozilla.org (Thunderbird development mailinglist) mailinglists, which mirror the newsgroups mentioned above. You can subscribe to or unsubscribe from these mailinglists via the web interface at lists.mozilla.org.

+ +

Bugzilla

+ +

Localizers should watch the thunderbird@localization.bugs mail address (or its alias :tb-l10n) to stay current on bugs that might affect Thunderbird localizers. This can be done by adding this mail address to the "User Watching" section of your Email preferences in bugzilla.

+ + + + + +

Sprachumgebungsschichten

+ +

Locale tiers reflect locales that we need to have in a good state for release. There are 10 locales in tier 1, which are the most important for Thunderbird, because of their number of Thunderbird users or potential for growth.

+ +

These locales are being treated as first-class citizens, as important as en-US, which is to say that any Tier 1 locale that does not meet the requirements may block a final release of Thunderbird.

+ +

Schicht 1

+ +

The following are P1 (Priorität 1) locales in order of priority:

+ +
* de             -  Deutsch
+* fr             -  Französisch
+* ja, ja-JP-mac  -  Japanisch
+* en-GB          -  Britisches Englisch
+* es-ES          -  Spanisch (kontinentaleuropäisch)
+* it             -  Italienisch
+* pl             -  Polnisch
+* ru             -  Russisch
+* nl             -  Niederländisch
+* pt-BR          -  Brasilianisches Portugiesisch
+
+ +

Schicht 2

+ +

Alle anderen unterstützten Sprachumgebungen befinden sich in der Schicht 2.

diff --git a/files/de/mozilla/qa/index.html b/files/de/mozilla/qa/index.html new file mode 100644 index 0000000000..b6efbed387 --- /dev/null +++ b/files/de/mozilla/qa/index.html @@ -0,0 +1,70 @@ +--- +title: 'QA: Quality assurance at Mozilla' +slug: Mozilla/QA +tags: + - NeedsTranslation + - QA + - Testing + - TopicStub +translation_of: Mozilla/QA +--- +

Es gibt viele Dinge, die im Bereich der Qualitätssicherung erledigt werden müssen und dabei muss man nicht zwingend programmieren können. Einige Aufgaben erfordern nicht mal Kenntnisse in HTML oder andren Webtechnologien. Wenn Sie interessiert sind uns beim Testen von Anwendungen oder anderen Aufgaben der Qualitätssicherung zu unterstützen, können Sie zunächst einmal auf den Seiten von quality.mozilla.org vorbei schauen.

+ + + + + + + + + + +
+

Dokumentation

+ +
+
Richtlinien zum Schreiben eines Bugreports
+
Je besser ein Bug gemeldet worden ist, umso besser wird ein Entwickler ihn sofort beseitigen. Wenn Sie diesen Leitfaden befolgen, können Sie helfen, dass ihre Bugs an oberster Stelle der Entwicklerliste stehen, und sie umso schneller beseitigt werden können.
+
Unbestätigte Bugs bestätigen
+
Nützliche Fehlermeldungen identifizieren und restliche Meldungen schließen.
+
Doppelte Fehlermeldungen aussortieren
+
Helfen Sie uns Fehler schneller zu beseitigen, indem Sie vermeiden doppelte Fehlermeldungen zu senden oder doppelte Einträge auszusortieren.
+
Reduzierte Testfällen
+
Verbessern Sie ihre Fehlermeldungen in dem Sie fehlerhafte Webseiten auf einfache Testseiten reduzieren, welche Entwicklern schnell helfen den Fehler zu verstehen und außerdem für automatisierte Tests verwendet werden können.
+
Tests entwickeln
+
Tests sichern, dass zukünftige Veränderungen an Mozilla nichts kaputt machen, was vorher korrekt funktioniert hat.
+
+ +

Alles anzeigen...

+
+

Community

+ + + + + + + +

Tools

+ + + +

Verwandte Themen

+ +
+
Mozilla entwickeln
+
+
diff --git a/files/de/mozilla/tech/index.html b/files/de/mozilla/tech/index.html new file mode 100644 index 0000000000..f9682e62e1 --- /dev/null +++ b/files/de/mozilla/tech/index.html @@ -0,0 +1,14 @@ +--- +title: Mozilla technologies +slug: Mozilla/Tech +tags: + - Landing + - Mozilla + - NeedsTranslation + - Reference + - TopicStub + - XUL +translation_of: Mozilla/Tech +--- +

Mozilla has several technologies used as components of its projects. These are documented here. (flesh out this text).

+

{{LandingPageListSubpages}}

diff --git a/files/de/mozilla/tech/xpcom/guide/empfang_von_benachrichtigungen_zum_startprozess/index.html b/files/de/mozilla/tech/xpcom/guide/empfang_von_benachrichtigungen_zum_startprozess/index.html new file mode 100644 index 0000000000..a81f28519f --- /dev/null +++ b/files/de/mozilla/tech/xpcom/guide/empfang_von_benachrichtigungen_zum_startprozess/index.html @@ -0,0 +1,56 @@ +--- +title: Empfang von Benachrichtigungen zum Startprozeß +slug: Mozilla/Tech/XPCOM/Guide/empfang_von_benachrichtigungen_zum_startprozess +translation_of: Mozilla/Tech/XPCOM/Guide/Receiving_startup_notifications +--- +

Manchmal brauchen XPCOM Komponenten Benachrichtigungen über den Fortschritt beim Hochfahren der Anwendung, zum Beispiel um neue Dienste zur passenden Zeit starten können

+

Empfang von Benachrichtigungen zum Startprozeß ab Gecko 2.0 (Firefox 4)

+

Der XPCOM Startprozeß wurde verändert um die zum Hochfahren benötigte Zeit zu verbessern. Siehe Der Startprozeß für Details über die Funktionsweise, wenn dich die Einzelheiten interessieren.

+

Die entscheidende Änderung ist, daß man jetzt entsprechende Zeilen zum chrome.manifest hinzufügt damit die Anwendung sich darum kümmert, anstelle die Registrierung programmatisch mit dem Category Manager durchzuführen wie früher. Zum Beispiel:

+
category profile-after-change MyComponent @foobar/mycomponent;1
+
+ Wichtig: Bisher begann die Contract ID des Kategorie-EIntrags mit "service," wenn die Komponente als Dienst (Service) implementiert war. Das ist nicht länger der Fall, dieses muß bei der Codemigration entfernt werden..
+

Hinzu kommt, daß die früheste Benachrichtigung beim Startprozeß, die man erhalten kann, jetzt  profile-after-change ist. Dein Add-On wird keine xpcom-startup oder app-startup Benachrichtigungen mehr erhalten.

+

Der Startprozeß

+

Während des Startprozesses wird aus dem Manifest der Anwendung die Liste der Komponenten ausgelesen, die registriert werden müssen, und diese Komponenten werden dann gestartet. Damit sind dann XPCOM und die Anwendung soweit hochgefahren, daß der Erweiterungs-Manager geladen werden kann, um sich um Installation, Deinstallation und Aktualisierung von Erweiterungen zu kümmern.

+

Sobald dieser Prozess abgeschlossen ist, können Erweiterungen einfach dadurch geladen werden, daß ihr Manifest gelesen, ihre Komponenten geladen und der Anwendungsstart fortgesetzt wird, ohne den Browser neu starten zu müssen.

+

Empfang von Benachrichtigungen zum Startprozeß vor Gecko 2.0 (Firefox 4)

+

Um Benachrichtigungen zum Startprozeß zu empfangen muß man {{ interface("nsICategoryManager") }} benutzen um sich für die "app-startup" Kategorie zu registrieren. Damit wird die Komponente dann unter anderem folgende Benachrichtigungen zum Anwendungsstart erhalten:

+
+
+ xpcom-startup
+
+ Wird gesendet, wenn XPCOM fertig mit dem Hochfahren ist. Die meisten Anwendungsdienste sind dann noch nicht verfügbar, aber XPCOM selbst steht bereit.
+
+ app-startup
+
+ Wird gesendet, wenn die Anwendung mit dem Startprozess fertig ist.
+
+ final-ui-startup
+
+ Wird gesendet eben bevor das erste Anwendungsfenster dargestellt wird.
+
+

Registrierung am Kategorien-Manager

+

Um sich beim Kategorien-Manager anzumelden, muß man nur dessen Methode {{ ifmethod("nsICategoryManager", "AddCategoryEntry") }} aufrufen:

+
categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
+                                  "mycomponentname",
+                                  "contract-id",
+                                  PR_TRUE, PR_TRUE,
+                                  getter_Copies(previous));
+
+

Das bewirkt, daß die Komponente mit {{ ifmethod("nsIComponentManager","createInstance") }} instanziiert wird.

+

Wenn die Komponente als Dienst (Service) laufen soll, laß die Contract ID mit "service," beginnen:

+
categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
+                                  "mycomponentname",
+                                  "service,contract-id",
+                                  PR_TRUE, PR_TRUE,
+                                  getter_Copies(previous));
+

Wenn "service," angegeben ist, wird die Komponente mit {{ ifmethod("nsIComponentManager","getService") }} instanziiert.

+

In beiden Fällen braucht man keine weitere Registrierung für die Benachrichtigungen zum Startprozeß, die Registrierung am Kategorien-Manager reicht dazu aus.

+

Wie es weitergeht

+

Nachdem die Registrierung am Kategorien-Manager erfolgt ist, wird zum Zeitpunkt des Starts von Mozilla (oder wenn bei einer eingebetteten Anwendung die Funktion NS_InitEmbedding() aufgerufen wurde) die AppStartupNotifier Komponente instanziiert und ihre Observe() Methode aufgerufen; Diese wiederum läuft über alle Komponenten in der app-startup Kategorie und sendet ihnen die passenden Benachrichtigungen.

+

Siehe auch

+ diff --git a/files/de/mozilla/tech/xpcom/guide/index.html b/files/de/mozilla/tech/xpcom/guide/index.html new file mode 100644 index 0000000000..781a596b2e --- /dev/null +++ b/files/de/mozilla/tech/xpcom/guide/index.html @@ -0,0 +1,13 @@ +--- +title: XPCOM guide +slug: Mozilla/Tech/XPCOM/Guide +tags: + - Landing + - Mozilla + - NeedsTranslation + - TopicStub + - XPCOM +translation_of: Mozilla/Tech/XPCOM/Guide +--- +

These articles provide tutorials and usage documentation for XPCOM, including how to use it in your own projects and how to build XPCOM components for your Firefox add-ons and the like.

+

{{LandingPageListSubpages}}

diff --git a/files/de/mozilla/tech/xpcom/reference/index.html b/files/de/mozilla/tech/xpcom/reference/index.html new file mode 100644 index 0000000000..29d07953d6 --- /dev/null +++ b/files/de/mozilla/tech/xpcom/reference/index.html @@ -0,0 +1,27 @@ +--- +title: XPCOM reference +slug: Mozilla/Tech/XPCOM/Reference +tags: + - Add-ons + - Extensions + - Landing + - Mozilla + - NeedsTranslation + - Reference + - TopicStub + - XPCOM +translation_of: Mozilla/Tech/XPCOM/Reference +--- +

This reference describes the interfaces and functions provided by the XPCOM library. In addition, it details the various helper classes and functions, as well as the components, provided by the XPCOM glue library. The contents herein are oriented primarily toward extension developers and people embedding XPCOM in other projects.

+ +
+

WebExtensions are becoming the new standard for creating add-ons. Eventually support for XPCOM add-ons will be deprecated, so you should begin to investigate porting your add-ons to use the WebExtensions API, and report any missing functionality so we can be sure to address your concerns. Work is ongoing on WebExtension capabilities, so your input will help prioritize and plan the work. To learn more about the kinds of changes that will be needed, see Comparison with XUL/XPCOM extensions. In addition, any binaries you use will then need to be converted for use with the WebExtensions native messaging API, or compiled using WebAssembly or Emscripten.

+
+ +
+

If you're working on a module in the Mozilla codebase that's compiled with the MOZILLA_INTERNAL_API flag set, some of these APIs -- the string functions and classes in particular -- are not the ones you should be using. See the XPCOM internal string guide for documentation of the internal string API used within the Mozilla codebase.

+
+ +

{{LandingPageListSubpages}}

+ +

Many XPCOM pages return an nsresult. Prior to Gecko 19 {{geckoRelease(19)}}, this was an integer that simply returned an error code. It is now a strongly typed enum when XPCOM is built using a C++11 compiler. This causes compile-time errors to occur when improper values are returned as nsresult values, thereby making it easier to catch many bugs.

diff --git a/files/de/mozilla/tech/xpcom/reference/interface/index.html b/files/de/mozilla/tech/xpcom/reference/interface/index.html new file mode 100644 index 0000000000..d098cf8402 --- /dev/null +++ b/files/de/mozilla/tech/xpcom/reference/interface/index.html @@ -0,0 +1,19 @@ +--- +title: XPCOM Interface Reference +slug: Mozilla/Tech/XPCOM/Reference/Interface +tags: + - NeedsTranslation + - TopicStub + - XPCOM + - XPCOM Interface Reference +translation_of: Mozilla/Tech/XPCOM/Reference/Interface +--- +

This is a reference to the XPCOM interfaces provided by the Mozilla platform.

+ +
{{tree('','1')}}
+ +

See also

+ + diff --git a/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/index.html b/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/index.html new file mode 100644 index 0000000000..2c354b2b2b --- /dev/null +++ b/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/index.html @@ -0,0 +1,420 @@ +--- +title: nsILoginManager +slug: Mozilla/Tech/XPCOM/Reference/Interface/nsILoginManager +tags: + - Firefox 3 + - Interfaces + - 'Interfaces:Scriptable' + - Login Manager + - NeedsTranslation + - Thunderbird 3 + - TopicStub + - XPCOM + - XPCOM API Reference + - thunderbird +translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsILoginManager +--- +

+
toolkit/components/passwordmgr/public/nsILoginManager.idlScriptable
+ + +Used to interface with the built-in Password Manager + + +
+ +
1.0
+ +
66
+ +
+ +
+ +
Introduced
+
Gecko 1.9
+ +
+ +
+ +
+Inherits from: nsISupports +Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)
+

+ +

Replaces nsIPasswordManager which was used in older versions of Gecko.

+ +

Implemented by: @mozilla.org/login-manager;1. To create an instance, use:

+ +
var loginManager = Components.classes["@mozilla.org/login-manager;1"]
+                   .getService(Components.interfaces.nsILoginManager);
+
+ +

Method overview

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void addLogin(in nsILoginInfo aLogin);
nsIAutoCompleteResult autoCompleteSearch(in AString aSearchString, in nsIAutoCompleteResult aPreviousResult, in nsIDOMHTMLInputElement aElement);
unsigned long countLogins(in AString aHostname, in AString aActionURL, in AString aHttpRealm);
boolean fillForm(in nsIDOMHTMLFormElement aForm);
void findLogins(out unsigned long count, in AString aHostname, in AString aActionURL, in AString aHttpRealm, [retval, array, size_is(count)] out nsILoginInfo logins);
void getAllDisabledHosts([optional] out unsigned long count, [retval, array, size_is(count)] out wstring hostnames);
void getAllLogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsILoginInfo logins);
boolean getLoginSavingEnabled(in AString aHost);
void modifyLogin(in nsILoginInfo oldLogin, in nsISupports newLoginData);
void removeAllLogins();
void removeLogin(in nsILoginInfo aLogin);
void searchLogins(out unsigned long count, in nsIPropertyBag matchData, [retval, array, size_is(count)] out nsILoginInfo logins);
void setLoginSavingEnabled(in AString aHost, in boolean isEnabled);
+ +

Methods

+ +

addLogin()

+ +

Stores a new login in the Login Manager.

+ +

Hinweis: Default values for the nsILoginMetaInfo properties are created if the specified login doesn't explicitly specify them.

+ +
void addLogin(
+  in nsILoginInfo aLogin
+);
+
+ +
Parameters
+ +
+
aLogin
+
The login to store.
+
+ +
Exceptions thrown
+ +
+
 
+
An exception is thrown if the login information is already stored in the Login Manager. To change a login, you have to use modifyLogin().
+
+ +

autoCompleteSearch()

+ +

Generates results for a user field autocomplete menu.

+ +

Hinweis: This method is provided for use only by the FormFillController, which calls it directly. It should not be used for any other purpose.

+ +
nsIAutoCompleteResult autoCompleteSearch(
+  in AString aSearchString,
+  in nsIAutoCompleteResult aPreviousResult,
+  in nsIDOMHTMLInputElement aElement
+);
+
+ +
Parameters
+ +
+
aSearchString
+
Missing Description
+
aPreviousResult
+
Missing Description
+
aElement
+
Missing Description
+
+ +
Return value
+ +

Missing Description

+ +

countLogins()

+ +

Returns the number of logins matching the specified criteria. Called when only the number of logins is needed, and not the actual logins (which avoids prompting the user for a Master Password, as the logins don't need to be decrypted).

+ +
unsigned long countLogins(
+  in AString aHostname,
+  in AString aActionURL,
+  in AString aHttpRealm
+);
+
+ +
Parameters
+ +
+
aHostname
+
The hostname to which to restrict searches, formatted as a URL. For example, "http://www.bar.com". To match all hostnames, specify "" (empty string). A value of null will cause countLogins() to not match any logins.
+
aActionURL
+
For form logins, this parameter should specify the URL to which the form will be submitted. To match any form login, specify "" (empty string). To not match any form logins (For example when interested in protocol logins only), specify null.
+
aHttpRealm
+
For protocol logins, specify the HTTP Realm for which the login applies; this is obtained from the WWW-Authenticate header (see RFC 2617). To match any protocol login, specify "" (empty string). To not match any protocol logins (For example when interested in form logins only), specify null.
+
+ +
Return value
+ +

The number of logins matching the parameters passed.

+ +

fillForm()

+ +

Fills out a form with login information, if appropriate information is available.

+ +

Hinweis: This method will attempt to fill out the form regardless of the setting of the signon.autofillForms preference.

+ +
boolean fillForm(
+  in nsIDOMHTMLFormElement aForm
+);
+
+ +
Parameters
+ +
+
aForm
+
The HTMLform to attempt to fill out.
+
+ +
Return value
+ +

true if the form was successfully filled out; otherwise false.

+ +

findLogins()

+ +

Searches for logins matching the specified criteria. Called when looking for logins that might be applicable to a given form or authentication request.

+ +
void findLogins(
+  out unsigned long count,
+  in AString aHostname,
+  in AString aActionURL,
+  in AString aHttpRealm,
+  [retval, array, size_is(count)] out nsILoginInfo logins
+);
+
+ +
Parameters
+ +
+
count
+
The number of elements in the returned array. JavaScript callers can simply use the array's length property and supply a dummy argument for this parameter.
+
aHostname
+
The hostname to restrict searches to, formatted as a URL. For example, "http://www.bar.com".
+
aActionURL
+
For form logins, this parameter should specify the URL to which the form will be submitted. For protocol logins, specify null. An empty string ("") will match any value (except null).
+
aHttpRealm
+
For protocol logins, specify the HTTP Realm for which the login applies; this is obtained from the WWW-Authenticate header (see RFC 2617). For form logins, this parameter should be null. An empty string ("") will match any value (except null).
+
logins
+
An array of nsILoginInfo objects.
+
+ +
Example
+ +

This method can be called from JavaScript like this:

+ +
 var logins = myLoginMgr.findLogins({}, 'https://bugzilla.mozilla.org', '', '', {});
+
+ +

getAllDisabledHosts()

+ +

Returns a list of all hosts for which login saving is disabled.

+ +
void getAllDisabledHosts(
+  [optional] out unsigned long count,
+  [retval, array, size_is(count)] out wstring hostnames
+);
+
+ +
Parameters
+ +
+
count
+
The number of elements in the returned array. JavaScript callers can simply use the array's length property and supply a dummy argument for this parameter.
+
hostnames
+
An array of hostname strings in URL format without a pathname. For example: "https://www.site.com".
+
+ +
Example
+ +

You can call this method from JavaScript like this:

+ +
 var disabledHosts = myLoginMgr.getAllDisabledHosts({});
+
+ +

getAllLogins()

+ +

Returns an array containing all logins recorded by the Login Manager.

+ +

If you just want to see if any logins are stored, use countLogins() instead. It's more efficient, and avoids the possibility of the user being prompted for their master password.

+ +
void getAllLogins(
+  [optional] out unsigned long count,
+  [retval, array, size_is(count)] out nsILoginInfo logins
+);
+
+ +
Parameters
+ +
+
count
+
The number of elements in the returned array. JavaScript callers can simply use the array's length property and supply a dummy argument for this parameter.
+
logins
+
An array of nsILoginInfo objects containing all the logins the Login Manager has on record.
+
+ +
Example
+ +

You can call this method from JavaScript like this:

+ +
 var logins = myLoginMgr.getAllLogins({});
+
+ +

getLoginSavingEnabled()

+ +

Reports whether or not saving login information is enabled for a host.

+ +
boolean getLoginSavingEnabled(
+  in AString aHost
+);
+
+ +
Parameters
+ +
+
aHost
+
The hostname to check. This argument should be in the origin URL format, with no pathname. For example: "https://www.site.com".
+
+ +
Return value
+ +

true if login saving is enabled for the host, otherwise false.

+ +

modifyLogin()

+ +

Modifies an existing login by replacing it with a new one.

+ +

If newLoginData is a nsILoginInfo, all of the old login's nsILoginInfo properties are changed to the values from newLoginData (but the old login's nsILoginMetaInfo properties are unmodified).

+ +

If newLoginData is a nsIPropertyBag, only the specified properties will be changed. The nsILoginMetaInfo properties of oldLogin can be changed in this manner.

+ +

If the propertybag contains an item named "timesUsedIncrement", the login's timesUsed property will be incremented by the item's value.

+ +
void modifyLogin(
+  in nsILoginInfo oldLogin,
+  in nsISupports newLoginData
+);
+
+ +
Parameters
+ +
+
oldLogin
+
The login to be modified.
+
newLoginData
+
The login information to replace the oldLogin with. This may be specified as either an nsILoginInfo or an nsIPropertyBag2 object.
+
+ +

removeAllLogins()

+ +

Removes all logins known by the Login Manager. This works without a need for the master password, if one is set.

+ +
void removeAllLogins();
+
+ +
Parameters
+ +

None.

+ +

removeLogin()

+ +

Removes a login from the Login Manager.

+ +

Hinweis: The specified login must exactly match a stored login. However, the values of any nsILoginMetaInfo properties are ignored.

+ +
void removeLogin(
+  in nsILoginInfo aLogin
+);
+
+ +
Parameters
+ +
+
aLogin
+
The login to remove from the Login Manager. Only a login that is an exact match is deleted.
+
+ +

searchLogins()

+ +

Searches for logins in the login manager's data store, returning an array of matching logins. If there are no matching logins, an empty array is returned.

+ +
void searchLogins(
+  out unsigned long count,
+  in nsIPropertyBag matchData,
+  [retval, array, size_is(count)] out nsILoginInfo logins
+);
+
+ +
Parameters
+ +
+
count
+
The number of elements in the returned array.
+
matchData
+
The data used for the search. This does not follow the same requirements as findLogins() for those fields; wildcard matches are not specified.
+
logins
+
An array of matching nsILoginInfo objects.
+
+ +
Example
+ +

This method can be called from JavaScript like this:

+ +
 var logins = myLoginMgr.searchLogins({}, matchData);
+ var numLogins = logins.length;
+
+ +

setLoginSavingEnabled()

+ +

Enables or disables storing logins for a specified host. When login storing is disabled, the Login Manager won't prompt the user to store logins for that host. Existing logins are not affected.

+ +
void setLoginSavingEnabled(
+  in AString aHost,
+  in boolean isEnabled
+);
+
+ +
Parameters
+ +
+
aHost
+
The hostname to adjust the setting for. This argument should be in the origin URL format, with no pathname. For example: "https://www.site.com".
+
isEnabled
+
If true, login saving is enabled for the specified host. If false, login saving is disabled.
+
+ +

See also

+ + diff --git a/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/using_nsiloginmanager/index.html b/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/using_nsiloginmanager/index.html new file mode 100644 index 0000000000..2cc68a291f --- /dev/null +++ b/files/de/mozilla/tech/xpcom/reference/interface/nsiloginmanager/using_nsiloginmanager/index.html @@ -0,0 +1,212 @@ +--- +title: Using nsILoginManager +slug: Mozilla/Tech/XPCOM/Reference/Interface/nsILoginManager/Using_nsILoginManager +translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsILoginManager/Using_nsILoginManager +--- +
{{ Gecko_minversion_header("1.9") }}
+ +

Den Login-Manager verwenden

+ +

Extensions speichern oftmals - auch wenn es eigentlich gar nicht wirklich nötig wäre - Paßwörter zu Webseiten, web-apps und so weiter. To do so securely, they can use nsILoginManager, which provides for secure storage of sensitive password information and nsILoginInfo, which provides a way of storing login information.

+ +

Getting nsILoginManager

+ +

To get a component implementing nsILoginManager, use the following:

+ +
+
var passwordManager = Components.classes["@mozilla.org/login-manager;1"].getService(
+	Components.interfaces.nsILoginManager
+);
+
+ +

Most Login Manager functions take an nsILoginInfo object as a parameter. An nsILoginInfo object contains the following attributes: hostname, form submit URL, HTTP realm, username, username field, password, and password field. The hostname, username and password attributes are mandatory, while the other fields are set based on whether the login is for a web page form or an HTTP/FTP authentication site login. See the nsILoginInfo attribute definitions for more details. Defining an nsILoginInfo object is simple:

+ +
+
var nsLoginInfo = new Components.Constructor(
+	"@mozilla.org/login-manager/loginInfo;1",
+	Components.interfaces.nsILoginInfo,
+	"init"
+);
+
+var loginInfo = new nsLoginInfo(
+	hostname, formSubmitURL, httprealm, username, password, usernameField, passwordField
+);
+
+
+ +

Examples

+ +

Creating a login for a web page

+ +
var formLoginInfo = new nsLoginInfo(
+	'http://www.example.com',
+	'http://login.example.com',
+	null,
+	'joe',
+	'SeCrEt123',
+	'uname',
+	'pword'
+);
+ +

This login would correspond to a HTML form such as:

+ +
<form action="http://login.example.com/foo/authenticate.cgi">
+	<div>Please log in.</div>
+	<label>Username:</label> <input type="text" name="uname">
+	<label>Password:</label> <input type="password" name="pword">
+</form>
+
+ +

Creating a site authentication login

+ +
var authLoginInfo = new nsLoginInfo(
+	'http://www.example.com',
+	null,
+	'ExampleCo Login',
+	'alice',
+	'SeCrEt321',
+	"",
+	""
+);
+
+ +

This would correspond to a login on http://www.example.com when the server sends a reply such as:

+ +
 HTTP/1.0 401 Authorization Required
+ Server: Apache/1.3.27
+ WWW-Authenticate: Basic realm="ExampleCo Login"
+
+
+ +

Creating a local extension login

+ +
var extLoginInfo = new nsLoginInfo(
+	'chrome://firefoo',
+	null,
+	'User Registration',
+	'bob',
+	'123sEcReT',
+	"",
+	""
+);
+ +

From a component creating a new info block is done slightly differently:

+ +
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo, "init");
+var extLoginInfo = new nsLoginInfo('chrome://firefoo', null, 'User Registration', 'bob', '123sEcReT', '', '');
+//var extLoginInfo = new nsLoginInfo(aHostname, aFormSubmitURL, aHttpRealm, aUsername, aPassword, aUsernameField, aPasswordField)
+
+ +

The Login Manager treats this as if it was a web site login. You should use your extension's chrome:// URL to prevent conflicts with other extensions, and a realm string which briefly denotes the login's purpose.

+ +

Storing a password

+ +

To store a password in the Login Manager, you first need to create an nsILoginInfo object as defined above. Then you simply need to call the nsILoginManager method addLogin().

+ +
myLoginManager.addLogin(loginInfo);
+
+ +

{{ Note("This will throw an exception if both the httprealm and formSubmitURL parameters are NULL. One must be specified when storing a password. The hostname, username and password parameters are also mandatory.") }}

+ +

Retrieving a password

+ +

Retrieving a password from the Login Manager is slightly more difficult. In order to locate a password, the hostname, formSubmitURL and httprealm must match exactly what is stored for the password to be found. The only exception is that if the stored formSubmitURL is blank, in which case the formSubmitURL parameter is ignored. Note that the hostname and formSubmitURL arguments should not include the path from the full URL. The example below should serve as a starting point for matching form logins:

+ +
var hostname = 'http://www.example.com';
+var formSubmitURL = 'http://www.example.com';  // not http://www.example.com/foo/auth.cgi
+var httprealm = null;
+var username = 'user';
+var password;
+
+try {
+	// Get Login Manager
+	var myLoginManager = Components.classes["@mozilla.org/login-manager;1"].
+		getService(Components.interfaces.nsILoginManager);
+
+	// Find users for the given parameters
+	var logins = myLoginManager.findLogins({}, hostname, formSubmitURL, httprealm);
+
+	// Find user from returned array of nsILoginInfo objects
+	for (var i = 0; i < logins.length; i++) {
+		if (logins[i].username == username) {
+			password = logins[i].password;
+			break;
+		}
+	}
+}
+
+catch(ex) {
+	// This will only happen if there is no nsILoginManager component class
+}
+ +

Note that the user will be prompted for their master password if they have chosen to set one to secure their passwords.

+ +

Removing a password

+ +

Removing a password is simple:

+ +
myLoginManager.removeLogin(loginInfo);
+
+ +

When removing a password the specified nsILoginInfo object must exactly match what was stored or an exception will be thrown. This includes the password attribute. Here's an example on how to remove the password without actually knowing what the password is:

+ +
// example values
+var hostname = 'http://www.example.com';
+var formSubmitURL = 'http://www.example.com';
+var httprealm = null;
+var username = 'user';
+
+try {
+	// Get Login Manager
+	var passwordManager = Components.classes["@mozilla.org/login-manager;1"].
+		getService(Components.interfaces.nsILoginManager);
+
+	// Find users for this extension
+	var logins = passwordManager.findLogins({}, hostname, formSubmitURL, httprealm);
+
+	for (var i = 0; i < logins.length; i++) {
+		if (logins[i].username == username) {
+			passwordManager.removeLogin(logins[i]);
+			break;
+		}
+	}
+}
+catch(ex) {
+	// This will only happen if there is no nsILoginManager component class
+}
+ +

Changing stored login information

+ +

Changing a password is rather simple. Since all this does is make a removeLogin() call followed by an addLogin() call, it has the same caveats as both of them: namely that the oldLogin must match an existing login exactly (see above) and that the newLogin attributes must be set correctly.:

+ +
myLoginManager.modifyLogin(oldLogin, newLogin);
+ +

Login Manager notifications

+ +

{{ fx_minversion_note("3.5", "The Login Manager notifications were added in Firefox 3.5.") }}

+ +

Firefox 3.5 and later send assorted notifications when various Login Manager related events occur, including when form autofill does not occur for various reasons, as well as when changes are made to the Login Manager's database. See the Login Manager section of the article on observer notifications for details.

+ +

Debugging

+ +

The login manager implementation has the ability to send debug messages to the Error Console, which can provide some visibility into what it's doing. To enable the debug logging, see http://wiki.mozilla.org/Firefox:Pass...ager_Debugging.

+ +

Supporting older versions of Gecko

+ +

If you want your extension to support both Gecko 1.9 (Firefox 3, Thunderbird 3, SeaMonkey 2) and older versions it will need to implement both the nsILoginManager and nsIPasswordManager components. A simple method to do this is as follows:

+ +
if ("@mozilla.org/passwordmanager;1" in Components.classes) {
+	// Password Manager exists so this is not Firefox 3 (could be Firefox 2, Netscape, SeaMonkey, etc).
+	// Password Manager code
+} else if ("@mozilla.org/login-manager;1" in Components.classes) {
+	// Login Manager exists so this is Firefox 3
+	// Login Manager code
+}
+ +

See also

+ + diff --git a/files/de/mozilla/tech/xpcom/reference/interface/nsixmlhttprequest/index.html b/files/de/mozilla/tech/xpcom/reference/interface/nsixmlhttprequest/index.html new file mode 100644 index 0000000000..3907d126bd --- /dev/null +++ b/files/de/mozilla/tech/xpcom/reference/interface/nsixmlhttprequest/index.html @@ -0,0 +1,89 @@ +--- +title: nsIXMLHttpRequest +slug: Mozilla/Tech/XPCOM/Reference/Interface/nsIXMLHttpRequest +translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsIXMLHttpRequest +--- +
+

Obsolete since Gecko 60 (Firefox 60 / Thunderbird 60 / SeaMonkey 2.57)
+ This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

+
+ + + +

nsIXMLHttpRequest along with nsIJSXMLHttpRequest and nsIXMLHttpRequestEventTarget are Mozilla's implementation details of the DOM XMLHttpRequest object.

+ +
Note: If you're a web developer or a Mozilla add-on developer, please refer to the XMLHttpRequest documentation instead.
+ +

This page contains documentation, specific to Mozilla application and add-on developers.

+ +

The interface definition: https://dxr.mozilla.org/mozilla-central/source/dom/xhr/nsIXMLHttpRequest.idl

+ +

Elevated Privileges

+ +

As mentioned in the "Non-Standard Properties" the property of channel was read-only. When using the XPCOM interface, as seen below in Example 2, we can get access to this. The most obvious benefit is that we can set nsiRequest - Constants in the xhr.channel.loadFlags. For instance, as done in Example 2, the flag of LOAD_ANONYMOUS is added, this strips all user data (cookies, tokens, etc).

+ +

Using event handlers from native code

+ +

(Not sure if it's up-to-date)

+ +

From native code, the way to set up onload and onerror handlers is a bit different. Here is a comment from Johnny Stenback <jst@netscape.com>:

+ +
The mozilla implementation of nsIXMLHttpRequest implements the interface nsIDOMEventTarget and that's how you're supported to add event listeners. Try something like this: nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(myxmlhttpreq)); target->AddEventListener(NS_LITERAL_STRING("load"), mylistener, PR_FALSE) where mylistener is your event listener object that implements the interface nsIDOMEventListener. The 'onload', 'onerror', and 'onreadystatechange' attributes moved to nsIJSXMLHttpRequest, but if you're coding in C++ you should avoid using those.
+ +

Though actually, if you use addEventListener from C++ weird things will happen too, since the result will depend on what JS happens to be on the stack when you do it....

+ +

Conclusion: Do not use event listeners on XMLHttpRequest from C++, unless you're aware of all the security implications. And then think twice about it.

+ +

Example code

+ +

This is a simple example code for opening a simple HTTP request from a xul application (like a Mozilla extension) without using observers:

+ +
 var req = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
+ req.open('POST', "http://www.foo.bar:8080/nietzsche.do", true);
+ req.send('your=data&and=more&stuff=here');
+
+ +

Example 2

+ +
var {Cu: utils, Cc: classes, Ci: instances} = Components;
+Cu.import('resource://gre/modules/Services.jsm');
+function xhr(url, cb) {
+    let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
+
+    let handler = ev => {
+        evf(m => xhr.removeEventListener(m, handler, !1));
+        switch (ev.type) {
+            case 'load':
+                if (xhr.status == 200) {
+                    cb(xhr.response);
+                    break;
+                }
+            default:
+                Services.prompt.alert(null, 'XHR Error', 'Error Fetching Package: ' + xhr.statusText + ' [' + ev.type + ':' + xhr.status + ']');
+                break;
+        }
+    };
+
+    let evf = f => ['load', 'error', 'abort'].forEach(f);
+    evf(m => xhr.addEventListener(m, handler, false));
+
+    xhr.mozBackgroundRequest = true;
+    xhr.open('GET', url, true);
+    xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS | Ci.nsIRequest.LOAD_BYPASS_CACHE | Ci.nsIRequest.INHIBIT_PERSISTENT_CACHING;
+    xhr.responseType = "arraybuffer"; //dont set it, so it returns string, you dont want arraybuffer. you only want this if your url is to a zip file or some file you want to download and make a nsIArrayBufferInputStream out of it or something
+    xhr.send(null);
+}
+
+xhr('https://www.gravatar.com/avatar/eb9895ade1bd6627e054429d1e18b576?s=24&d=identicon&r=PG&f=1', data => {
+    Services.prompt.alert(null, 'XHR Success', data);
+    var file = OS.Path.join(OS.Constants.Path.desktopDir, "test.png");
+    var promised = OS.File.writeAtomic(file, new UInt8Array(data));
+    promised.then(
+        function() {
+            alert('succesfully saved image to desktop')
+        },
+        function(ex) {
+             alert('FAILED in saving image to desktop')
+        }
+    );
+});
diff --git a/files/de/mozilla/thunderbird/autokonfiguration/index.html b/files/de/mozilla/thunderbird/autokonfiguration/index.html new file mode 100644 index 0000000000..300c47d686 --- /dev/null +++ b/files/de/mozilla/thunderbird/autokonfiguration/index.html @@ -0,0 +1,146 @@ +--- +title: Automatische Konfiguration in Thunderbird +slug: Mozilla/Thunderbird/Autokonfiguration +tags: + - Administration + - enterprise +translation_of: Mozilla/Thunderbird/Autoconfiguration +--- +

Author: Ben Bucksch
+ Bitte nehmen Sie keine Änderungen an diesem Dokument vor ohne den Autor zu kontaktieren

+ +

Thunderbird 3.1 und neuer (sowie 3.0 zu einem gewissen Grad) beinhalten eine Funktion zur automatischen Konfiguration des E-Mail Kontos. Das Ziel der Autokonfiguration ist es, den Nutzern die Herstellung einer Verbindung zwischen Thunderbird und den Mail-Servern zu erleichtern. In den meisten Fällen sollten Nutzer in der Lage sein Thunderbird herunterzuladen und zu installieren sowie anschließend ihren Namen, E-Mail Adresse und Passwort in dem Einrichtungsassistenten einzugeben, wodurch sie einen voll funktionsfähigen E-Mail Client erhalten und ihre Mails so sicher wie möglich verschicken können. 

+ +

Siehe auch:

+ + + +

Dieses Dokument beschreibt wie die automatische Konfiguration in Thunderbird funktioniert und wie man E-Mail Servern die Autokonfiguration ermöglicht.

+ +

Mechanismen

+ +

Thunderbird erhält die Server-Einstellungen über verschiedene Wege, wovon jeder für einen bestimmten Fall geeignet ist:

+ + + +

All the lookup mechanisms use the email address domain as base for the lookup. For example, for the email address fred@example.com , the lookup is performed as (in this order):

+ +
    +
  1. tb-install-dir/isp/example.com.xml on the harddisk
  2. +
  3. check for autoconfig.example.com
  4. +
  5. look up of "example.com" in the ISPDB
  6. +
  7. look up "MX example.com" in DNS, and for mx1.mail.hoster.com, look up "hoster.com" in the ISPDB
  8. +
  9. try to guess (imap.example.com, smtp.example.com etc.)
  10. +
+ +

We may in the future add DNS SRV records as supported mechanism in the future, but we currently do not.

+ +

How to add support for your domain

+ +

Classification

+ +

If you are a big ISP (> 100,000 users) providing email addresses solely under a few domains like "example.com" and "example.de", you may either submit the configuration to the ISPDB or set up a configuration server.
+
+ If you support email aliases and the user's login name is not part of the email address (for example, users may have "hero@example.com" as email address, but the IMAP/POP/SMTP login name is neither "hero" nor "hero@example.com", but "u67578"), you need to set up a configuration server, which does the email address -> login name lookup.
+
+ If you host customer domains, i.e. you are "hoster.com", but your customers have "fred@flintstone.com" and "louis@kent.com" as domains, with only a few users per domain, you need to set up a configuration server (or rely on DNS MX).
+
+ If you are a small company installing Thunderbird on your employees' desktops, you can place a configuration file in the Thunderbird installation folder.

+ +

ISPDB

+ +

Database URL is <https://live.mozillamessaging.com/autoconfig/v1.1/>, append domain name, e.g. <https://live.mozillamessaging.com/autoconfig/v1.1/freenet.de>.
+
+ Current process: File a bug in Bugzilla, Product "Webtools", Component "ISPDB Database Entries", with a configuration file that matches the requirements described below.  The component is actively watched for new bugs (as of November 2015) so there is no need to request review on the file.

+ +

Configuration server at ISP

+ +

Given the email address "fred@example.com", Thunderbird first checks <http://autoconfig.example.com/mail/config-v1.1.xml?emailaddress=fred@example.com> and then <http://example.com/.well-known/autoconfig/mail/config-v1.1.xml>.

+ +

Small company

+ +

If you are a small company, you can put the XML configuration file on your web server, at URL <http://example.com/.well-known/autoconfig/mail/config-v1.1.xml>. (This is not yet finalized and subject to change.)

+ +

Domain hoster

+ +

If you are an ISP that hosts domains for your customers - for example, you are hoster.com and your customer registers fancy.com or example.com, and your servers accept and serve the mail for example.com -, you should set up an autoconfig server.

+ +

DNS

+ +

For each customer domain, you add a DNS record (in addition to the existing MX, A www etc. DNS records):
+ autoconfig IN A 10.2.3.4
+ or
+ autoconfig IN CNAME autoconfig.hoster.com.
+ ... where 10.2.3.4 and autoconfig.hoster.com are IP addresses / hostnames you own.
+ This allows Thunderbird to find you as hoster.

+ +

To make the Version without an autoconfig DNS Entry work you have to make sure that example.com points to the Webserver you will place the config-v1.1.xml on.

+ +

Example: example.com A 10.2.3.4

+ +

Web server

+ +

You set up a web server bound to a physical IP address. This may be on the same machine as other web servers, but the web server must be configured to the content to any requested domain.
+
+ You must use an virtual host that match all autoconfig.* domains of your customers. In Apache terms, you can use a "ip-based virtual host". In the Apache configuration files, that means something like: Listen 10.2.3.4:80 (of course, you use a public IP address that you own)

+ +
<VirtualHost 10.2.3.4:80> #Must be the first and only virtual host with this ip!
+    DocumentRoot /var/www/autoconfig/
+    ServerName autoconfig.hoster.com
+    <Directory /var/www/autoconfig>
+	Order allow,deny
+	allow from all
+    </Directory>
+</VirtualHost>
+ +

Place the configuration file at the URL /mail/config-v1.1.xml on that host.

+ +

All config files must be served as Content-Type: text/xml (or application/xml), otherwise the file will be ignored. Also, they must use charset UTF-8 (esp. if there are any non-ASCII-characters).

+ +

If you like to use name-based virtual hosts. You probably don't want to setup the autoconfig subdomain for every domain of your customers.
+ You can add a Rewriterule in the default virtual host (on debian /etc/apache2/sites-enabled/000-default)  to match all autoconfig.* subdomains:

+ +
<VirtualHost *:80> #Must be the first Virtual host
+	ServerAdmin webmaster@hoster.com
+	ServerName www
+	DocumentRoot /var/www
+	RewriteEngine On
+	RewriteCond %{HTTP_HOST} ^autoconfig\. [NC]
+	RewriteRule ^/(.*)	http://autoconfig.hoster.com/$1 [L,R=301,NE]
+        #...
+</VirtualHost>
+<VirtualHost *:80>
+    DocumentRoot /var/www/autoconfig/
+    ServerName autoconfig.hoster.com
+    <Directory /var/www/autoconfig>
+ 	Order allow,deny
+	allow from all
+    </Directory>
+</VirtualHost>
+
+ + + + + +

Configuration file

+ +

This is described at How to create a configuration file and defined on the sub-pages.

+ +

{{ languages( { "ja": "ja/Thunderbird/Autoconfiguration" } ) }}

diff --git a/files/de/mozilla/thunderbird/index.html b/files/de/mozilla/thunderbird/index.html new file mode 100644 index 0000000000..7bf0a47087 --- /dev/null +++ b/files/de/mozilla/thunderbird/index.html @@ -0,0 +1,75 @@ +--- +title: Thunderbird +slug: Mozilla/Thunderbird +translation_of: Mozilla/Thunderbird +--- +

Thunderbird ist Mozillas Mail- und Nachrichtenprogramm. Diese Seiten dokumentieren Thunderbird und bieten außerdem Links zu Dokumentationen über das MailNews-Backend, welches in weiteren Projekten wie Eudora/Penelope, Seamonkey und Correo genutzt wird.

+

Thunderbird ist das Geschwisterkind von Firefox und auf der gleichen technischen Platform aufgebaut wie der Web-Browser. Nach vielen Jahren der Entwicklung ist Thunderbird einer der meist genutzen, quelloffenen Mail-Clients und wird von Millionen von Menschen weltweilt genutzt, um alle ihre Mail-Accounts, Newsgroups und Nachrichtenfeeds in einer bekannten, hochproduktiven Umgebung zusammenzubringen. (Von Anfang 2007 bis Anfang 2011 wurde Thunderbird von Mozilla Messaging entwickelt, einer Tochtergesellschaft von Mozilla.)

+ + + + + + + +
+

Dokumentation

+
+
+ Thunderbird erstellen
+
+ Informationen über das Erstellen von Thunderbird-Builds mit dem comm-central Repository. Es gibt außerdem Infos darüber,  wie comm-central arbeitet, wie der Bewertungsprozess läuft  und wie der Mozilla Symbol-Server Hilfe zum Debuggen anbietet.
+
+ MailNews Protokolle
+
+ Eine - eher ungenaue - Dokumentation über Mailprotokolle...
+
+ Datenbankzugriffe
+
+ Informationen über das Backend von {{ Interface("nsIMsgDBView") }} und verwandten Schnittstellen...
+
+ Thunderbird API-Dokumentation
+
+ Die Dokumentation über Thunderbirds Programmierschnittstellen (APIs)
+
+ Dokumentationen von Erweiterungen
+
+ Einführungen und Tipps zum Erstellen von Erweiterungen für Thunderbird
+
+ Automatisiertes Testen
+
+ Details über automatisiertes Testen von Thunderbird
+
+ Thunderbird in Firmen
+
+ Hilfe beim Entwickeln von Thunderbird für große Organisationen
+
+

Alle anzeigen...

+
+

Community

+ +

Tools

+ + + +
+

 

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension/index.html new file mode 100644 index 0000000000..d6209dea6a --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension/index.html @@ -0,0 +1,57 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 1: Einleitung' +slug: Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension +tags: + - Addons + - Erweiterungen + - thunderbird +translation_of: Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension +--- +

{{AddonSidebar}}

+ +

Thunderbird ist eine von der community gemanagete Open-Source Emailanwendung. Sie verwendet viele der Technologien, die auch Mozilla Firefox verwendet, einschließlich  JavaScript, der Gecko Layout Engine, der XUL XML User Interface Language und dem XPCOM plattformübergreifenden Komponentenobjektmodell . Ähnlich wie bei Firefox kann die Funktionalität von Thunderbird durch Erweiterungen erweitert und angepasst werden.

+ +

Hinweis: Diese Dokumentationsserie ist noch nicht für die Firefox Version 60 aktualisiert.  Thunderbird 60, das im Sommer 2018 veröffentlicht wurde, führt Veränderungen bei Erweiterung ein, die im Thunderbird 57-60 add-ons guide dokumentiert sind.

+ +

Dieses Tutorial dient der Einführung in die Komponenten einer Thunderbird-Erweiterung und es wird gezeigt, wie man seine eigene Erweiterung entwickelt. Das Tutorial setzt sich aus folgenden Seiten zusammen:

+ +
    +
  1. Einleitung (Diese Seite)
  2. +
  3. Das Erweiterungsdateisystem (das lokale System vorbereiten und aufsetzen)
  4. +
  5. Installation des manifests (Die install.rdf Datei. Sie beinhaltet die Metainformationen der Erweiterung)
  6. +
  7. Chrome Manifest (Eine Liste von Packages und Overlays)
  8. +
  9. XUL (Die XML User Interface Language, die eingesetzt wird, um die Benutzeroberfläche von Thunderbird zu verändern)
  10. +
  11. Hinzufügen von JavaScript (beschreibt wie man seiner Thunderbird-Erweiterung simplen JavaScriptcode hinzufügen kann)
  12. +
  13. Lokale Installation (Aktivieren der Erweiterung in der lokalen Thunderbirdinstanz)
  14. +
  15. Packaging (Erstellen eines Distributionspakets, das die Erweiterung beinhaltet)
  16. +
  17. Veröffentlichung (auf der eigenen Website oder auf https://addons.mozilla.org/)
  18. +
+ +

Dieses Tutorial ist kompatibel mit den Thunderbirdversionen 2, 3 und 5. Alle Thunderbird Builds sind auf dieser FTP-Seite verfügbar.

+ +

Verweise und Ressourcen

+ +

Tools und Hilfserweiterungen

+ +

Es gibt viele Tools, die dabei helfen Thunderbird-Erweiterungen zu entwickeln. Das Mindeste, was benötigt wird:

+ + + +

Darüber hinaus gibt es eine große Zahl von Erweiterungen und Anwendungen, die nützlich sind zum Testen und Debuggen von Thunderbird-Erweiterungen, wie z. B. JavaScript-Konsolen und XPCOM Inspektoren. Diese werden auf der Seite "Aufsetzen einer Erweiterungs-Entwicklungsumgebung" beschrieben.

+ +

Dokumentation

+ + + +

Community

+ +

Die Thunderbird-Development-Community hat eine Mailing-Liste mit einem umfangreichen und durchsuchbaren Archiv. Es lässt sich auch mit der Community sprechen über den #maildev IRC channel.

+ +

{{ Next("Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_2:_Erweiterungs-Dateisystem") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_3_colon__install_manifest/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_3_colon__install_manifest/index.html new file mode 100644 index 0000000000..69c95d4d01 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_3_colon__install_manifest/index.html @@ -0,0 +1,61 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 3: Manifest installieren' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_3:_install_manifest +tags: + - Addons + - Erweiterungen + - thunderbird +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_3:_install_manifest +--- +

{{AddonSidebar}}

+ +

Die install.rdf Datei ist eine XML-Datei, die allgemeine Informationen zur Erweiterung enthält.

+ +

Öffne die Datei namens install.rdf, die du oben in der Erweiterungsverzeichnishierarchie erstellt haben, und füge den folgenden Text in die Datei ein:

+ +
<?xml version="1.0"?>
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>myfirstext@jen.zed</em:id>
+    <em:name>My First Extension</em:name>
+    <em:version>1.0</em:version>
+    <em:creator>jenzed</em:creator>
+
+    <em:targetApplication>
+      <Description>
+        <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+        <em:minVersion>1.5</em:minVersion>
+        <em:maxVersion>5.0.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+  </Description>
+</RDF>
+
+ +

 Die folgende Elemente (Fett markiert) sollten für deine Erweiterung verändert werden:

+ + + +

Es gibt weitere optionale Elemente, die in install.rdf angegeben werden können. Diese werden auf der Seite Installationsmanifeste beschrieben. Beachte, dass Elemente in beliebiger Reihenfolge angegeben werden können, solange sie dem Knoten <Description> untergeordnet sind.

+ +

{{ Previous("Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_2:_Erweiterungs-Dateisystem") }}

+ +

{{ Next("Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_4:_Chrome_Manifest") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_7_colon__installation/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_7_colon__installation/index.html new file mode 100644 index 0000000000..4448e0b311 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_7_colon__installation/index.html @@ -0,0 +1,58 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 7: Installation' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_7:_Installation +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_7:_Installation +--- +

{{AddonSidebar}}

+ +

Während du die Erweiterung entwickelst, gibt es zwei Möglichkeiten, wie du Thunderbird die Erweiterung laden lässt, um sie zu testen. Du kannst den Ordner mit den Erweiterungsdateien entweder direkt im Erweiterungsordner von Thunderbird ablegen oder eine Datei dort ablegen, die Thunderbird mitteilt, wo sich deine Erweiterung befindet. (In Schritt 8 erfährst Du, wie Du eine .xpi-Datei für die Veröffentlichung und Installation erstellst.)

+ +

Um den Erweiterungsordner von Thunderbird zu finden, navigiere zum Profilverzeichnis von Thunderbird und öffne den Ordner extensions /. Je nach Betriebssystem befindet es sich an einem der folgenden Speicherorte:

+ + + +
Um sicherzustellen, dass deine aktuellen E-Mails und Einstellungen während des Tests nicht durcheinander geraten, ist es sicherer, bei der Entwicklung von Erweiterungen ein Testprofil anstelle deines Standardprofils zu verwenden. In diesem Artikel der Mozilla-Knowledgedatenbank erfahren Sie, wie Sie mehrere Profile einrichten.
+ +
Wenn das Verzeichnis extensions/ noch nicht existiert, musst du es erstellen.
+ +

Verwenden einer Textdatei zum Verweisen auf deine Erweiterungsdateien (empfohlen):

+ +
    +
  1. Wenn Du deine Erweiterung in einem anderen Ordner entwickelst (z.B. "...\Dokumente\Code\Thunderbird Erweiterungen\myfirstext@jen.zed\"), kannst Du eine Textdatei im Ordner extensions/ erstellen, die auf deine Erweiterung verweist. Der Name der Textdatei muss genau dem Wert von <em:id> aus install.rdf entsprechen. In unserem Fall erhält die Datei den Namen myfirstext@jen.zed.
  2. +
  3. Die Datei muss eine einzige Zeile mit dem absoluten Pfad der Erweiterung enthalten. +
    +
    Der Ordner, auf den verwiesen wird, muss mit dem Wert von <em: id> von install.rdf identisch sein.
    + +
    .C:\Users\<Nutzername>\Documents\Code\Thunderbird Erweiterungen\myfirsttext@jen.zed\
    +
    +
  4. +
+ +

Die Erweiterungsdatei direkt in den Erweiterungsordner einfügen (Alternativ):

+ +
    +
  1. Nachdem du den Ordner extensions/ geöffnet hast, erstelle einen Unterordner mit dem Namen deiner Erweiterung. Dieser Name muss genau der ID des Feldes <em:id> in der Datei install.rdf entsprechen. In unserem Fall heißt der Ordner: myfirstext@jen.zed/. Je nach Format Ihrer ID kann der Ordnername auch eine GUID sein.
  2. +
+ +

Jetzt können Sie Thunderbird starten. Thunderbird wird die Erweiterung erkennen und versuchen, sie zu laden.

+ +

Informationen zum Einrichten eines Entwicklerprofils und zum Aktivieren von Debugging-Funktionen findest Du unter Setting up extension development environment.

+ +

Du kannst jetzt zurückgehen und Änderungen an der .xul-Datei vornehmen. Wenn Du Thunderbird schließst und neu startest, sollten sie angezeigt werden.

+ + + +
+
+
Es besteht auch die Möglichkeit, Thunderbird mit dem Firefox-Debugger zu Remote-debuggen. In diesem Artikel der Mozilla-Knowledgedatenbank erfährst du, wie du das Remote-Debugging einrichtest.
+
+
+ +

{{ PreviousNext("Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_6:_Javascript_hinzufuegen", "Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_8:_packaging") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_8_colon__packaging/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_8_colon__packaging/index.html new file mode 100644 index 0000000000..d33997f94e --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_8_colon__packaging/index.html @@ -0,0 +1,24 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 8: Packaging' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_8:_packaging +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_8:_packaging +--- +

{{AddonSidebar}}

+ +

Wenn Du mit den Funktionen deiner Erweiterung zufrieden bist, packe sie für die Bereitstellung und Installation.

+ +

Zipe den Inhalt des Erweiterungsordners (nicht den Erweiterungsordner selbst) und benenne die ZIP-Datei um, so dass sie die Endung .xpi hat. In Windows 7 wähle alle Dateien und Unterordner im Erweiterungsordner aus, klicke mit der rechten Maustaste und wähle "Senden an -> Komprimierter (gezippter) Ordner". Eine ZIP-Datei wird erstellt. Umbenennen und fertig!

+ +

Unter Mac OS X kannst Du mit der rechten Maustaste auf den Inhalt des Erweiterungsordners klicken und "Archiv erstellen ..." wählen, um die ZIP-Datei zu erstellen. Seit Mac OS X zum Verfolgen von Dateimetadaten ausgeblendete Dateien in Ordner hinzufügte, solltest Du stattdessen das Terminal verwenden, die versteckten Dateien löschen (deren Namen mit einem Punkt beginnen) und dann den Befehl zip in der Befehlszeile zum Erstellen der Zip-Datei verwenden. Die Dateien haben normalerweise den Namen .DS_Store.

+ +

Unter Linux solltest Du ebenfalls das Befehlszeilen-Zip-Tool verwenden.

+ +
 cd ~/Erweiterungen/Meine_Erweiterungen
+ zip -r ../sample.xpi *
+
+ +

Wenn er in das Verzeichnis (Benutzerprofil)/extension eingefügt wird, öffnet Thunderbird die xpi-Datei, überprüft die ID in der Datei install.rdf und erstellt dieses Verzeichnis für Ihr Package. Es wird dann in dieses Verzeichnis kopiert und die Dateien werden entpackt, wodurch eine Kopie deiner ~/Erweiterung/Meine_Erweiterungen-Verzeichnisstruktur und -Dateien erstellt wird.

+ +

{{ PreviousNext("Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_7:_Installation", "Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_9:_distributing") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_9_colon__distributing/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_9_colon__distributing/index.html new file mode 100644 index 0000000000..8177b45f65 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/building_a_thunderbird_extension_9_colon__distributing/index.html @@ -0,0 +1,24 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 9: Verbreitung' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_9:_distributing +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_9:_distributing +--- +

{{AddonSidebar}}

+ +

Verwenden von addons.mozilla.org

+ +

Die Website addons.mozilla.org ist eine Veröffentlichungssite, auf der Du deine Erweiterung kostenlos hosten kannst. Deine Erweiterung wird im Mirror-Netzwerk von Mozilla gehostet werden. Die Mozilla-Site bietet Benutzern eine einfachere Installation und stellt Benutzern deiner älteren Versionen automatisch neue Versionen zur Verfügung, wenn Du sie hochlädst. Darüber hinaus können Benutzer mit Mozilla Update deine Erweiterung kommentieren und Feedback geben.Es ist empfohlen, AMO zu verwenden.

+ +

Besuche http://addons.mozilla.org/developers/, um ein Konto zu erstellen und mit dem Veröffentlichen deiner Erweiterungen zu beginnen. Beachte, dass deine Erweiterung schneller genehmigt und häufiger heruntergeladen wird, wenn Du eine gute Beschreibung und Screenshots der Erweiterung in Aktion hast.

+ +

Installation von einer Webseite

+ +

Es gibt verschiedene Möglichkeiten, Erweiterungen von Webseiten zu installieren, einschließlich der direkten Verknüpfung mit den XPI-Dateien und der Verwendung des InstallTrigger-Objekts. Erweiterungs- und Web-Autoren sollten die InstallTrigger-Methode zum Installieren von XPIs verwenden, da sie den Benutzern die beste Benutzererfahrung bietet.

+ +

Registrieren von Erweiterungen in der Windows-Registry

+ +

Unter Windows können der Registry Informationen zu Erweiterungen hinzugefügt werden. Die Erweiterungen werden beim nächsten Start der Anwendung automatisch abgerufen. Auf diese Weise können Anwendungsinstallationsprogramme Integrations-Hooks als Erweiterungen hinzufügen. Weitere Informationen finden Sie unter Adding Extensions using the Windows Registry.

+ +

{{ Previous("Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_8:_packaging") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/ein_thunderbird_addon_programmieren_5_colon__xul/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/ein_thunderbird_addon_programmieren_5_colon__xul/index.html new file mode 100644 index 0000000000..4f227fe3d1 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/ein_thunderbird_addon_programmieren_5_colon__xul/index.html @@ -0,0 +1,43 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 5: XUL' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Ein_Thunderbird_Addon_programmieren_5:_XUL +tags: + - Addons + - Erweiterung + - thunderbird +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_5:_XUL +--- +

{{AddonSidebar}}

+ +

Thunderbirds Nutzerinterface ist in XUL und JavaScript geschrieben. XUL ist eine XML Art, die Nutzerinterfacewidgets wie Knöpfe, Menüs, Toolbars, Trees etc. bietet. Wir fügen Widgets hinzu, indem wir neue XUL DOM Elemente in das Programmfenster hinzufügen und sie mit Scripts und angehängten Event Handlern modifizieren. Während XUL die Elemente des Nutzerinterfaces bietet, sind die Aktionen in JavaScript geschrieben.

+ +

Bei unserer erster Erweiterung fügen wir Text in die Thunderbird Statusbar ein. Die Statusbar ist ist in einer XUL Datei namens messenger.xul implementiert, die sich im chrome/messenger/content/messenger  Ordner innerhalb des omni.ja Archives befindet. Um diese XUL Datei lesen zu können, nutze die DOM Inspector Erweiterung (Nicht mehr ünterstützt) oder schau in das omni.ja Archiv, welches sich im Thunderbird Programmordner befindet. omni.ja kann ganz einfach durchsucht werden, indem man die Datei an einen anderen Speicherplatz kopiert und sie in omni.zip umbenennt. Solltest du mit einem Zip Manager Probleme haben (wie 7Zip), nutze einen anderen (wie WinRAR). In messenger.xul finden wir die Statusbar, welche ungefähr so ausschaut:

+ +
<statusbar id="status-bar" ...>
+ ... <statusbarpanel>s ...
+</statusbar>
+
+ +

<statusbar id="status-bar"> ist ein "Zusammenführungspunkt" für ein XUL Overlay. XUL Overlays sind eine Methode, andere UI Widgets zu einem XUL Dokument anzuhängen, sobald die Erweiterung startet. Ein XUL Overlay ist eine .xul Datei die XUL-Fragmente spezifiziet, um sie bei bestimmten Zussamenführungspunkten innerhalb eines "Haupt"-Dokuments" einzufügen. Diese Fragmente können Widgets zum Einfügen, Entfernen oder Bearbeiten spezifizieren. In diesem Beispiel fügst du eine Linie der Statusbar hinzu. Deshalb wird es zu einem Element mit der ID "Statusleiste". Das zeigt, wie die Thunderbirdarchitektur Erweiterungen erlaubt, die Nutzererfahrung zu ändern, ohne dabei die Installationsdateien zu ändern. Das erlaubt auch Versionsunabhängigkeit zwischen Thunderbird und Thunderbird-Erweiterungen.

+ +

Beispiel XUL Overlay Dokument

+ +

Erstelle eine neue Datei namens myhelloworld.xul innerhalb des content Ordners, den du vorhin erstellt hast, mit folgendem Inhalt:

+ +
<?xml version="1.0"?>
+<overlay id="sample"
+xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <script type="application/javascript" src="chrome://myfirstext/content/overlay.js"/><!-- A reference to your JavaScript file -->
+ <statusbar id="status-bar">
+  <statusbarpanel id="my-panel" label="Date"/>
+ </statusbar>
+</overlay>
+
+ +

Das <statusbar> Widget names status-bar spezifiziert den Zusammenführungspunkt innerhalb des Programmfensters, das wir anhängen wollen. Wenn unsere Overlay Datei geparsed wird, nimmt die XUL Engine alle Unterelemente des <statusbar> Tags und führt die mit dem orginalen XUL Dokuments <statusbar> Tag zusammen. In dem Bespiel überhalb haben wir ein neues <statusbarpanel> Element definiert (Das als my-panel bezeichnet wird), das eine neue Instanz dieses Widgettyps erstellt und am Ende der Statusbar hinbaut. In Thunderbird erscheint es als Label auf der rechten Seite der Statusbar von Thunderbird und zeigt "Date" an.  Wir haben auch einen <script> Tag geschrieben, der eine Refezenz zur JavaScript Datei overlay.js beinhaltet. In der nächsten Sektion wirst du lernen, wie du JavaScript nutzt um dein Label so zu modifizieren, dass es das momentane Datum anzeigt.

+ +
Die overlay.js Datei wird in einer späteren Sektion erstellt. Deine Erweiterung wird auch ohne diese Datei funktionieren. Momentan kannst du diese Linie ignorieren, aber erinnere dich daran, dass das hier ist, wie du auf eine JavaScript Datei verweist.
+ +

{{ PreviousNext("Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_4:_Chrome_Manifest", "Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_6:_Javascript_hinzufuegen") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_2_colon__erweiterungs-dateisystem/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_2_colon__erweiterungs-dateisystem/index.html new file mode 100644 index 0000000000..f023c7b8c8 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_2_colon__erweiterungs-dateisystem/index.html @@ -0,0 +1,31 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 2: Erweiterungs-Dateisystem' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_2:_Erweiterungs-Dateisystem +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_2:_extension_filesystem +--- +

{{AddonSidebar}}

+ +

Erweiterungen sind in Archiv-Dateien (Auch Bundles genannt) mit der XPI ( “zippy” ausgesprochen)-Dateiendung gepackt und verteilt. Sie enthalten mindestens eine install.rdf, ein chrome.manifest und einen "chrome/ Ordner. Ein content/ Ordner enthält manchmal die eigentlichen Kontentdateien. Diese Dateien enthalten den Code, der deine Erweiterung etwas machen lässt. Wenn dieses Tutorial fertig ist, wird unsere Erweiterung so ausschauen:

+ +
myfirstext.xpi:                                //Erstellt in Schritt 8
+              /install.rdf                     //Erstellt in Schritt 3
+              /chrome.manifest                 //Erstellt in Schritt 4
+              /chrome/
+              /content/
+              /content/myhelloworld.xul        //Erstellt in Schritt 5
+              /content/overlay.js              //Erstellt in Schritt 6
+              /chrome/locale/*                 //Erstellen einer Erweiterungslokalisierung
+              /chrome/skin/
+              /defaults/preferences/           // Erstellen von Erweiterungs-Standarddateien
+
+ +

Die folgende Tutorialseiten werden erklären, wie man jede dieser Dateien schreibt (Außer locale/ und defaults/) und sie in eine XPI (zippy) Datei packt. Du kannst Informationen über die locale/ und defaults/ Ordner in der allgemeineren "Building an Extension" Dokumentation.

+ +

Um mit dem Tutorial zu starten, erstelle manuell die anfängliche Verzeichnisstruktur für die Erweiterung, wie sie oben in einem Ordner namens myfirstext@jen.zed dargestellt ist. Dieses Verzeichnis kann an einem beliebigen Ort im Dateisystem erstellt werden.

+ +


+ {{ Previous("Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension") }}

+ +

{{ Next("Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_3:_install_manifest") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_4_colon__chrome_manifest/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_4_colon__chrome_manifest/index.html new file mode 100644 index 0000000000..639204a1ef --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_4_colon__chrome_manifest/index.html @@ -0,0 +1,44 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 4: Chrome Manifest' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_4:_Chrome_Manifest +tags: + - Addons + - Extensions + - thunderbird +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_4:_chrome_manifest +--- +

{{AddonSidebar}}

+ +

Die Datei namens chrome.manifest teilt Thunderbird mit, welche Packages und Overlays von der Erweiterung bereitgestellt werden. Öffne die von dir erstellte Datei chrome.manifest und füge diesen Code hinzu:

+ +
content     myfirstext    content/
+
+ + + +

Diese Zeile besagt, dass wir für ein Chrome-Package myfirstext die Kontentdateien im Verzeichnis content/ finden können (das ist ein Pfad relativ zum Speicherort von chrome.manifest).

+ +

Um die Thunderbird-Benutzeroberfläche so zu ändern, dass sie die Erweiterung unterstützt, erstelle ein Overlay und führe es mit dem Standard Thunderbird-Interface zusammen. Im weiteren Verlauf des Tutorials werden wir eine XUL-Overlay-Datei erstellen, die mit der Standarddatei messenger.xul zusammengeführt wird. An dieser Stelle legen wir in chrome.manifest die Existenz des Overlays fest (das wir später erstellen werden).

+ +
+
 
+
+ +

Füge diese Zeile am Ende von chrome.manifest hinzu:

+ +
+
overlay chrome://messenger/content/messenger.xul chrome://myfirstext/content/myhelloworld.xul
+
+ +

Dies sagt Thunderbird, dass myhelloworld.xul beim Laden von messenger.xul mit messenger.xul zusammengeführt wird. Weitere Informationen zu Chrome-Manifesten und den unterstützten Eigenschaften findest du in der Chrome-Manifestreferenz.

+
+ +
Es kann hilfreich sein, eine Erweiterung wie den DOM Inspector zu installieren, um das Layout der vorhandenen XUL-Dateien besser zu verstehen und eigene Overlays zu debuggen. (nicht unterstützt ab Thunderbird 60)
+ +

{{ PreviousNext("Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_3:_install_manifest", "Mozilla/Thunderbird/Thunderbird_extensions/Ein_Thunderbird_Addon_programmieren_5:_XUL") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_6_colon__javascript_hinzufuegen/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_6_colon__javascript_hinzufuegen/index.html new file mode 100644 index 0000000000..959e9dc753 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/eine_thunderbird-erweiterung_programmieren_6_colon__javascript_hinzufuegen/index.html @@ -0,0 +1,53 @@ +--- +title: 'Eine Thunderbird-Erweiterung programmieren 6: JavaScript hinzufügen' +slug: >- + Mozilla/Thunderbird/Thunderbird_extensions/Eine_Thunderbird-Erweiterung_programmieren_6:_Javascript_hinzufuegen +translation_of: >- + Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_6:_Adding_Javascript +--- +

{{AddonSidebar}}

+ +

In diesem Schritt erstellen wir ein kleines Stück JavaScript-Code, der das aktuelle Datum ins Statusleisten-Widget einfügt. Die Statusleiste wird normalerweise am unteren Rand des Thunderbird-Fensters angezeigt. Je nach installiertem Theme sieht das Ergebnis etwa so aus:

+ +

current_date.png

+ +

XUL Elemente mit JavaScript modifizieren

+ +
+
Speichere den folgenden JavaScript-Code im content/ Ordner neben der Datei myhelloworld.xul und nenne ihn overlay.js.
+
+ +
window.addEventListener("load", function(e) {
+	startup();
+}, false);
+
+window.setInterval(
+	function() {
+		startup();
+	}, 60000); //Aktualisiert das Datum jede Minute
+
+function startup() {
+	var myPanel = document.getElementById("my-panel");
+	var date = new Date();
+	var day = date.getDay();
+	var dateString = date.getFullYear() + "." + (date.getMonth()+1) + "." + date.getDate();
+	myPanel.label = "Date: " + dateString;
+}
+ +

Der erste Teil registriert einen neuen Ereignis-Listener, der beim Laden von Thunderbird automatisch ausgeführt wird. Der Ereignis-Listener ruft dann die Startup-Funktion auf, die unser <statusbarpanel> -Element mit der ID my-panel aus dem DOM-Tree des Dokuments erhält.Dann verwendet es die Date-Klasse von JavaScript, um das aktuelle Datum abzurufen, das in eine String konvertiert wird, der das Format YYYY.MM.DD hat.Da der Monat nullbasiert ist, müssen wir beim Monat eins addieren. Schließlich wird das Label unseres Panels auf "Date:" gesetzt und mit der Datums-String verkettet, die das formatierte Datum enthält.

+ +

Wir verwenden die Funktion window.setInterval, um das Datum zu aktualisieren, falls Thunderbird länger als einen Tag läuft.. Dadurch können wir die Startup-Funktion wiederholt mit einem Intervall von 60000 ms (jede Minute) aufrufen.

+ +

Weitere Dokumentation

+ +

Weitere Funktionen für die DOM-Objekte findest du unter:

+ + + +

Das Javascript Cheat Sheet kann auch sehr nützlich sein.

+ +

{{ PreviousNext("Mozilla/Thunderbird/Thunderbird_extensions/Ein_Thunderbird_Addon_programmieren_5:_XUL", "Mozilla/Thunderbird/Thunderbird_extensions/Building_a_Thunderbird_extension_7:_Installation") }}

diff --git a/files/de/mozilla/thunderbird/thunderbird_extensions/index.html b/files/de/mozilla/thunderbird/thunderbird_extensions/index.html new file mode 100644 index 0000000000..8dba5ff294 --- /dev/null +++ b/files/de/mozilla/thunderbird/thunderbird_extensions/index.html @@ -0,0 +1,138 @@ +--- +title: Thunderbird extensions +slug: Mozilla/Thunderbird/Thunderbird_extensions +tags: + - Add-ons + - Extensions + - NeedsTranslation + - TopicStub + - thunderbird +translation_of: Mozilla/Thunderbird/Thunderbird_extensions +--- +
Entwickeln einer Thunderbird Erweiterung
+Schritt-für-Schritt Anleitung zur Erstellung einer Erweiterung für Thunderbird.
+ +
+

{{AddonSidebar}}

+Die nachfolgende Dokumentation dient als Hilfestellung zur Entwicklung von Erweiterungen für den Thunderbird email client. Ähnlichkeiten zu den Firefox extensions sind vorhanden, jedoch ebenso Unterschiede die den zukünftigen Thunderbird Entwickler verwirren können. Diese Dokumentenreihe beschäftigt sich mit Thunderbird.
+ +

+Sie benötigen Hilfe zu einem spezifischen Thema? Fragen Sie die Community / Communications.
+ +
+ +
Bitte helfen Sie! Sie können ein how-to (eine Frage, eine Antwort, ein Codeschnipsel), eine relevante newsgroup Diksussion zusammenfassen und verlinken oder ein Tutorial verfassen.
+ +
+ + + + + + + + +
+

Dokumentation

+ +

Erste Schritte mit Thunderbird

+ +

Ein mutiger, junger Entwickler möchte eine eine Erweiterung für Thunderbird entwickeln. Nachfolgende Links helfen ihm auf dieser Reise.  Hinweis: Diese Dokumentation wurde noch nicht für Version 60 aktualisiert.

+ +
    +
  • Beginnen Sie mit dem Studium des Tutorials und lernen Sie, wie Sie eine Thunderbird Erweiterung erstellen können.  Beachten Sie auch den Thunderbird 57-60 add-ons guide für mit Thunderbird 60 eingeführte Änderungen.
  • +
  • Erfahren Sie mehr über die Hauptfenster und lernen Sie die « thread pane », « preview pane », und « folder pane » kennen.
  • +
  • Spielen Sie mit einem demo add-on welches erweiterte Thunderbird-spezifische features bietet.
  • +
  • Sie möchten mehr tun?  Erfinden Sie nicht das Rad neu: bedienen Sie sich bei dem thunderbird-stdlib Projekt (Doku hier). Funktionen zum Umgang mit Nachrichten (löschen, archivieren, tags ändern, etc.) sind hier enthalten. MailUtils.js.
  • +
  • Nicht das gefunden, was Sie benötigen? Lesen Sie die Thunderbird how-tos; sie enthalten viele Vorgehensweisen für Dinge, die Erweiterungen tun möchten.
  • +
  • Sie hängen fest?  Fragen Sie in einem Kommunikationskanal (auf der rechten Seite) nach.
  • +
  • Richtig mutig? Lesen Sie den source in einer ausgefallenen Oberfläche fancy interface (der Link ist tot); Sie können oftmals Tests finden, die zeigen was Sie versuchen zu erreichen.
  • +
+ +

Die Gloda Datenbank

+ +

Thunderbird verfügt über ein subsystem Namens Gloda. Gloda steht für « Global Database », und erzeugt Thunderbird-weite Beziehungen zwischen Objekten. Gloda stellt Konzepte wie Unterhaltungen, Nachrichten, Identitäten, Kontakte zur Verfügung. Alles diese Konzepte sind verbunden: Eine Unterhaltung enthält Nachrichten, die mit Identitäten verknüpft sind (from Feld, to Feld), die widerum selbst Teil eines Kontaktes sind. Tatsächlich: ein Kontakt hat mehrere Identitäten.

+ +

Typischer Anwendungsfall für Gloda: Finde alle Nachrichten deren Betreff übereinstimmt [Suchbegriff], finde alle Nachrichten von [Person], finde alle Nachrichten im gleichen Thread wie [eine vorgegebene Nachricht], finde alle Nachrichten mit [Person] etc. etc.

+ +

Gloda ist extrem mächtig und wird sehr stark von add-ons wie z. B. Thunderbird Conversations genutzt.
+ Erfahren Sie mehr über Gloda:

+ + + + + +

Manche Links können veraltet sein, jedoch stellten sie immer noch wertvolle Informationen zur codebase zur Verfügung.

+ + + + + + +
+

Community / Communications

+ +

Thunderbird spezifisch :

+ + + +

Mehr allgemein :

+ + + +

Tools

+ + + +

... weitere Tools ...

+ +

Alle anzeigen...

+ + + +
+
XUL, JavaScript, XPCOM, Themes, Developing Mozilla
+
+
+ +

Categori

diff --git a/files/de/mozilla/verbinden/index.html b/files/de/mozilla/verbinden/index.html new file mode 100644 index 0000000000..a103f9d5f9 --- /dev/null +++ b/files/de/mozilla/verbinden/index.html @@ -0,0 +1,94 @@ +--- +title: Mit Mozilla verbinden +slug: Mozilla/Verbinden +tags: + - Landung +translation_of: Mozilla/Connect +--- +
+

Ermöglichen, inspirieren und zusammenarbeiten damit das Internet die primäre Plattform wird um auf allen verbundenen Endgeräten Erlebnisse zu erschaffen.

+
+ + +
+
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+

Mit Mozilla verbinden

+Entwickler erschaffen die Zukunft indem Sie Dienste und Apps für Menschen auf der ganzen Welt aufbauen. Das Ziel der Mozilla Entwickler Beziehung ist es Entwickler dabei zu unterstützen offene und standardisierte Web Technologien zu verwenden um damit erfolgreich Ihre Ziele zu erreichen. Zusätzlich zu der Dokumentation hier auf MDN bieten wir auf verschiedenen anderen Kanälen Hilfe und Ressourcen an um dieses Ziel zu erreichen. Wir laden Sie ein sich zu beteiligen, zu lernen und Ihr eigenes Wissen zu teilen.
+Um spezielle technische Fragen und Herausforderungen zu beantworten, bieten wir Hilfe über Q&A auf Stack Overflow. Unser Newsletter hält Sie über die neusten Ereignisse in der Webszene rund um Web Apps und andere Themen auf dem Laufenden.
+Wir haben viele Pläne und Ideen um unsere Entwickler Beziehungen iterativ auszubauen, wir möchten dich beteiligen genau wie wir es sind.  Folgen Sie den Tags auf Stack Overflow, Abonnieren Sie den Hacks blog, und Melden Sie sich für einen Account an!
+ +
+
+

Q&A auf Stack Overflow Ansicht aller Q&A...

+ +

Wir haben ein Q&A um Herausforderungen und Fragen beim Entwickeln zu diskutieren. Insbesondere für Firefox OS und open Web auf Handys. Zu finden auf Stack Overflow unter der einfachen URL http://stackoverflow.com/r/mozilla.

+ + +
Stack Formular
+ +

Neuste Q&A Themen

+
+ +
 
+
+ +

Developers at a Firefox OS workshop in Madrid.

+ +
+
+

Wo ist Mozilla? Sehen Sie Teilnehmer und Einzelheiten auf unserer Veranstaltungseite...

+ +

Hier ist eine Liste von Mozilla Repräsentanten die auf einer Veranstaltung in Ihrer Nähe sprechen. Sprechen Sie mit Ihnen!

+
+ + +
+
+ +

 

diff --git "a/files/de/mozilla/\303\274ber_colon_omni.ja_(ehemals_omni.jar)/index.html" "b/files/de/mozilla/\303\274ber_colon_omni.ja_(ehemals_omni.jar)/index.html" new file mode 100644 index 0000000000..381dc0e052 --- /dev/null +++ "b/files/de/mozilla/\303\274ber_colon_omni.ja_(ehemals_omni.jar)/index.html" @@ -0,0 +1,62 @@ +--- +title: Über omni.ja (ehemals omni.jar) +slug: 'Mozilla/Über:omni.ja_(ehemals_omni.jar)' +tags: + - Firefox + - Gecko + - Guide + - Mozilla +translation_of: Mozilla/About_omni.ja_(formerly_omni.jar) +--- +

{{ gecko_minversion_header("2.0") }}

+ +

Firefox und Thunderbird erreichen Verbesserungen der Performance, indem sie viele ihrer internen Teile, bestehend aus einzelnen Dateien oder mehreren  JAR-Dateien in eine einzige JAR-Datei,  omni.ja genannt, auslagern; dies reduziert die I/O-Menge, die benötigt wird, um die Anwendung zu laden. Seit Firefox und Thunderbird 10 wird die Dateierweiterung .ja genutzt, weil die Windows Systemwiederherstellung Dateien mit der .jar Erweiterung nicht sichert,  .ja Dateien dagegen schon.

+ +

omni.ja inspizieren

+ +
Hinweis: Während der Extrahierung von omni.ja könnten Fehlmeldungen einiger Antivirenprogramme auftreten.
+ +

Einige Kompressionsprogramme und Archive ( jede Version von 7-Zip mit einbezogen) können omni.ja aufgrund der Optimierungen, die in der Datei angewendet wurden, zurzeit nicht lesen. Windows 7 Nutzern wird empfohlen die Datei zu entpacken, indem sie in omni.zip umbenannt wird und sie mit Windows Explorer zu extrahieren. Nutzer älterer Versionen von Windows können das InfoZip's UnZip tool verwenden, um Dateien zu entpacken - fertigen sie eine Kopie von omni.ja an und bewegen sie es per Drag n' Drop auf unzip.exe.

+ +

omni.ja ist auch aus der anderen Richtung mit Zip-Dateien inkompatibel; das Bearbeiten extrahierter Dateien wird Firefox nicht beeinflussen und wieder zurückgepackte editierte Dateien könnten Firefox zum Absturz bringen, wenn sie während des Packens nicht die richtigen Einstellungen nutzen. Der korrekte Befehl, um Dateien in omni.ja zu packen, ist:

+ +
zip -qr9XD omni.ja *
+ +
Hinweis: Vor dem Erscheinen von Firefox 10 und Thunderbird 10, wurde die omni.ja  noch omni.jar genannt.
+ +

Die Inhalte von omni.ja

+ +

omni.ja enthält ausgewählte Programmressourcen:

+ +
+
chrome.manifest
+
Das chrome Manifest.
+
/chrome/
+
UI-Dateien der Anwendung
+
/chrome/localized.manifest
+
Manifest für lokalisierten Inhalt; bezieht sich auf das chrome Manifest.
+
/chrome/nonlocalized.manifest
+
Manifest für nicht lokalisierten Inhalt; bezieht sich auf das chrome Manifest.
+
/components/
+
XPCOM-Komponenten, auf die sich die Anwendung stützt.
+
/defaults/
+
Standarddateien.
+
/modules
+
JavaScript Codemodule.
+
/res/
+
Verschiedene Ressourcen.
+
+ +

Siehe auch

+ + + +
+

{{ languages( { "ja": "ja/About_omni.jar" } ) }}

+
-- cgit v1.2.3-54-g00ecf