aboutsummaryrefslogtreecommitdiff
path: root/files/de/codeschnipsel
diff options
context:
space:
mode:
Diffstat (limited to 'files/de/codeschnipsel')
-rw-r--r--files/de/codeschnipsel/cookies/index.html45
-rw-r--r--files/de/codeschnipsel/index.html28
-rw-r--r--files/de/codeschnipsel/on_page_load/index.html124
-rw-r--r--files/de/codeschnipsel/scrollbar/index.html32
-rw-r--r--files/de/codeschnipsel/tabbed_browser/index.html517
-rw-r--r--files/de/codeschnipsel/tree/index.html69
-rw-r--r--files/de/codeschnipsel/windows/index.html60
7 files changed, 0 insertions, 875 deletions
diff --git a/files/de/codeschnipsel/cookies/index.html b/files/de/codeschnipsel/cookies/index.html
deleted file mode 100644
index 555505f616..0000000000
--- a/files/de/codeschnipsel/cookies/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: Cookies
-slug: Codeschnipsel/Cookies
-tags:
- - Add-ons
- - Codeschnipsel
- - Cookies
- - Erweiterungen
-translation_of: Archive/Add-ons/Code_snippets/Cookies
----
-<h3 id="Reading_existing_cookies" name="Reading_existing_cookies">Existierende Cookies lesen</h3>
-
-<p>Cookies für einen gegebenen Host, repräsentiert als <code><a href="https://developer.mozilla.org/de/docs/Codeschnipsel/Cookies" title="">nsICookie2</a></code> Objekte, können so nummeriert werden:</p>
-
-<pre class="brush: js">let enum = Services.cookies.getCookiesFromHost("example.com");
-while (enum.hasMoreElements()) {
- var cookie = e.getNext().QueryInterface(Ci.nsICookie2);
- dump(cookie.host + ";" + cookie.name + "=" + cookie.value + "\n");
-}
-</pre>
-
-<p>Alle Cookies, regardless vom Host, kann man mit <code>Services.cookies.enumerator</code> rather than <code>getCookiesFromHost()</code>.</p>
-
-<p>nummerieren.</p>
-
-<h3 id="Setting_a_cookie" name="Setting_a_cookie">Ein Cookie einstellen</h3>
-
-<p>Der folgende Code zeigt, wie man in Firefox ein Cookie einstellt.</p>
-
-<pre class="brush: js">Services.cookies.add(".host.example.com", "/cookie-path", "cookie_name", "cookie_value", is_secure, is_http_only, is_session, expiry_date);
-</pre>
-
-<h3 id="See_also" name="See_also">Siehe auch</h3>
-
-<ul>
- <li>{{ Domxref("document.cookie") }}</li>
- <li>{{ Interface("nsICookie") }}</li>
- <li>{{ Interface("nsICookie2") }}</li>
- <li>{{ Interface("nsICookieService") }}</li>
- <li>{{ Interface("nsICookieManager") }}</li>
- <li>{{ Interface("nsICookieManager2") }}</li>
- <li><a href="/en/Web_Development/HTTP_cookies" title="HTTP cookies">HTTP cookies</a></li>
-</ul>
-
-<p>{{ languages( { "fr": "fr/Extraits_de_code/Cookies", "ja": "ja/Code_snippets/Cookies", "pl": "pl/Fragmenty_kodu/Ciasteczka" } ) }}</p>
diff --git a/files/de/codeschnipsel/index.html b/files/de/codeschnipsel/index.html
deleted file mode 100644
index 31c6bc8bf3..0000000000
--- a/files/de/codeschnipsel/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: Codeschnipsel
-slug: Codeschnipsel
-tags:
- - Add-ons
- - Erweiterungen
-translation_of: Archive/Add-ons/Code_snippets
----
-<p>Dies ist eine Liste mit nützlichen Codeschnipseln (kleine Code-Beispiele) für Entwickler von Erweiterungen für verschiedene Mozilla Anwendungen. Viele dieser Beispiele können sowohl in XULRunner als auch im aktuellen Mozilla-Code benutzt werden.</p>
-<p>Diese Beispiele zeigen, wie grundlegende Aufgaben bewältigt werden können, deren Lösung nicht offensichtlich ist.</p>
-<h3 id="Allgemein">Allgemein</h3>
-<dl> <dt><a href="/de/Codeschnipsel/Windows" title="de/Codeschnipsel/Windows">Windows</a></dt> <dd><small>Fenster öffnen und bearbeiten.</small></dd> <dt><a href="/de/Codeschnipsel/Toolbar" title="de/Codeschnipsel/Toolbar">Toolbar</a></dt> <dd><small>Code im Bezug zur Toolbar.</small></dd> <dt><a href="/de/Codeschnipsel/Sidebar" title="de/Codeschnipsel/Sidebar">Sidebar</a></dt> <dd><small>Code im Bezug zur Sidebar.</small></dd> <dt><a href="/de/Codeschnipsel/XML" title="de/Codeschnipsel/XML">XML</a></dt> <dd><small>Beispielcode, um XML zu parsen, zu schreiben und zu verändern.</small></dd> <dt><a href="/de/Codeschnipsel/File_IO" title="de/Codeschnipsel/File_IO">File I/O</a></dt> <dd><small>Beispielcode, um Dateien zu lesen und zu schreiben.</small></dd> <dt><a href="/de/Codeschnipsel/Drag_und_Drop" title="de/Codeschnipsel/Drag_und_Drop">Drag &amp; Drop</a></dt> <dd><small>Beispielcode, um "Drag und Drop" Ereignisse zu verwalten</small></dd> <dt><a href="/de/Codeschnipsel/Dialoge_und_Prompts" title="de/Codeschnipsel/Dialoge_und_Prompts">Dialoge</a></dt> <dd><small>Beispielcode, um Dialogboxen und Eingabeaufforderungen anzuzeigen.</small></dd> <dt><a href="/de/Codeschnipsel/Warnungen_und_Meldungen" title="de/Codeschnipsel/Warnungen_und_Meldungen">Warnungen und Meldungen</a></dt> <dd><small>Modale und nicht-modale Wege den Benutzer zu benachrichtigen.</small></dd> <dt><a href="/de/Codeschnipsel/Einstellungen" title="de/Codeschnipsel/Einstellungen">Einstellungen</a></dt> <dd><small>Beispielcode, um Einstellungen zu lesen, zu schreiben und zu verändern.</small></dd> <dt><a href="/de/Codeschnipsel/JS_XPCOM" title="de/Codeschnipsel/JS_XPCOM">JS XPCOM</a></dt> <dd><small>Beispielcode, um XPCOM Komponenten in JavaScript aufzurufen</small></dd> <dt><a href="/de/Codeschnipsel/Anwendungen_starten" title="de/Codeschnipsel/Anwendungen_starten">Anwendungen starten</a></dt> <dd><small>Beispielcode, um andere Anwendungen zu starten.</small></dd> <dt><a href="/de/Codeschnipsel/Canvas" title="de/Codeschnipsel/Canvas"><code>&lt;canvas&gt;</code></a></dt> <dd><small>Auf <a href="/de/HTML/Canvas" title="de/HTML/Canvas">Canvas</a> bezogener Code.</small></dd> <dt><a href="/de/Codeschnipsel/Signierung_einer_XPI" title="de/Codeschnipsel/Signierung_einer_XPI">Signierung einer XPI</a></dt> <dd><small>Wie eine XPI mit PKI signiert wird.</small></dd> <dt><a href="/de/Codeschnipsel/Threads" title="de/Codeschnipsel/Threads">Threads</a></dt> <dd><small>Hintergrundoperationen ausführen und die Ausführung verzögern, während Hintergrundoperationen beendet werden.</small></dd> <dt><a href="/de/Codeschnipsel/Diverses" title="de/Codeschnipsel/Diverses">Diverses</a></dt> <dd><small>Diverse nützliche Codefragmente.</small></dd> <dt><a href="/de/Codeschnipsel/HTML_zu_DOM" title="de/Codeschnipsel/HTML_zu_DOM">HTML zu DOM</a></dt> <dd><small>Verwendung eines versteckten Browserelements, um HTML zu DOM zu parsen.</small></dd>
-</dl>
-<h3 id="Browser-orientierter_Code">Browser-orientierter Code</h3>
-<dl> <dt><a href="/de/Codeschnipsel/Tabbed_browser" title="de/Codeschnipsel/Tabbed_browser">Tabbed Browser</a> (Firefox/SeaMonkey)</dt> <dd><small>Grundlegende Operationen, wie das Laden von Seiten mit dem Tabbed Browser, welche das Herz von Mozilla's Browser Anwendungen darstellen.</small></dd> <dt><a href="/de/Codeschnipsel/Cookies" title="de/Codeschnipsel/Cookies">Cookies</a></dt> <dd><small>Lesen, Schreiben, Verändern und Entfernen von Cookies.</small></dd> <dt><a href="/de/Codeschnipsel/Seitenaufbau" title="de/Codeschnipsel/Seitenaufbau">Seitenaufbau</a></dt> <dd><small>Beispielcode, um Seiten zu laden und neu zu laden.</small></dd> <dt><a href="/de/Codeschnipsel/Interaktion_zwischen_priviligierten_und_nicht-priviligierten_Seiten" title="de/Codeschnipsel/Interaktion_zwischen_priviligierten_und_nicht-priviligierten_Seiten">Interaktion zwischen priviligierten und nicht-priviligierten Seiten</a></dt> <dd><small>Wie man zwischen Erweiterungen und Webseiten kommuniziert.</small></dd> <dt><a href="/de/Codeschnipsel/Dateien_herunterladen" title="de/Codeschnipsel/Dateien_herunterladen">Dateien herunterladen</a></dt> <dd><small>Beispielcode, um Dateien und Bilder herunter zu laden und den Downloadfortschritt zu überwachen.</small></dd> <dt><a href="/de/Codeschnipsel/Passwort_Manager" title="de/Codeschnipsel/Passwort_Manager">Passwort Manager</a></dt> <dd><small>Beispielcode, um Passwörter aus/zum integriertem Passwortmanager zu speichern oder auszulesen.</small></dd> <dt><a href="/de/Codeschnipsel/Lesezeichen" title="de/Codeschnipsel/Lesezeichen">Lesezeichen</a></dt> <dd><small>Beispielcode, um Lesezeichen auszulesen und zu speichern.</small></dd> <dt><a href="/de/Codeschnipsel/JavaScript_Debugger_Service" title="de/Codeschnipsel/JavaScript_Debugger_Service">JavaScript Debugger Service</a></dt> <dd><small>Interaktionen mit dem JavaScript Debugger Service</small></dd>
-</dl>
-<h3 id="SVG">SVG</h3>
-<dl> <dt><a href="/de/Codeschnipsel/SVG_Allgemein" title="de/Codeschnipsel/SVG_Allgemein">Allgemein</a></dt> <dd><small>Allgemeine Informationen und Werkzeuge.</small></dd> <dt><a href="/de/Codeschnipsel/SVG_Animation" title="de/Codeschnipsel/SVG_Animation">SVG Animation</a></dt> <dd><small>Animiertes SVG über JavaScript und SMIL</small></dd> <dt><a href="/de/Codeschnipsel/Interaktives_SVG_mit_JavaScript" title="de/Codeschnipsel/Interaktives_SVG_mit_JavaScript">Interaktives SVG mit JavaScript</a></dt> <dd><small>Verwendung von JavaScript und DOM Ereignissen, um interaktives SVG zu erstellen.</small></dd> <dt><a href="/de/Codeschnipsel/SVG_einbetten" title="de/Codeschnipsel/SVG_einbetten">SVG in HTML und XUL einbetten</a></dt> <dd><small>Verwendung von SVG, um HTML oder XUL Markup aufzuwerten.</small></dd>
-</dl>
-<h3 id="XUL_Widgets">XUL Widgets</h3>
-<dl> <dt><a href="/de/Codeschnipsel/HTML_Tooltips_in_XUL" title="de/Codeschnipsel/HTML_Tooltips_in_XUL">HTML Tooltips in XUL</a></dt> <dd><small>Dynamische Einbettung von HTML in ein XUL Element, um einen Tooltip mit Markup zu versehen.</small></dd> <dt><a href="/de/Codeschnipsel/Beschriftungen_und_Beschreibungen" title="de/Codeschnipsel/Beschriftungen_und_Beschreibungen">Beschriftungen und Beschreibungen</a></dt> <dd><small>Spezielle Verwendungen und Beispiele zu Zeilenumbrüchen.</small></dd> <dt><a href="/de/Codeschnipsel/Tree" title="de/Codeschnipsel/Tree">Tree</a></dt> <dd><small>Erstellung und Veränderung von Trees mit XUL und JS.</small></dd> <dt><a href="/de/Codeschnipsel/Scrollbar" title="de/Codeschnipsel/Scrollbar">Scrollbar</a></dt> <dd><small>Das Aussehen der Scrollbar vom Browser sowie Iframes verändern.</small></dd> <dt><a href="/de/Codeschnipsel/Autovervollständigung" title="de/Codeschnipsel/Autovervollständigung">Autovervollständigung</a></dt> <dd><small>Beispielcode, um Autovervollständigung im Browser zu aktivieren.</small></dd> <dt><a href="/de/Codeschnipsel/Boxen" title="de/Codeschnipsel/Boxen">Boxen</a></dt> <dd><small>Tipps und Tricks zur Verwendung von Boxen als Container.</small></dd> <dt><a href="/de/Codeschnipsel/Tabbox" title="de/Codeschnipsel/Tabbox">Tabbox</a></dt> <dd><small>Entfernen und Verändern von Tabs in Tabboxen.</small></dd>
-</dl>
-<h3 id="Windows-spezifisch">Windows-spezifisch</h3>
-<dl> <dt><a href="/de/Codeschnipsel/Window_Handler_auffinden" title="de/Codeschnipsel/Window_Handler_auffinden">Window Handler (HWND) auffinden</a> (Firefox)</dt> <dd><small>Wie man die Windows API aufruft, um Mozilla Window Handler zu finden. Window Handler können für IPC und Zugänglichkeit gebraucht werden.</small></dd> <dt><a href="/de/Zugang__zur_Windows_Registrierung_über_XPCOM" title="de/Zugang__zur_Windows_Registrierung_über_XPCOM">Zugang zur Windows Registrierung über XPCOM</a></dt> <dd><small>Wie man Registrierungschlüssel und -werte auslesen, schreiben, verändern, löschen, aufzählen, und beobachten kann.</small></dd>
-</dl>
-<h3 id="Externe_Links">Externe Links</h3>
-<p>Die Inhalte auf <a class="external" href="http://kb.mozillazine.org/Category:Example_code">MozillaZine Example Code</a> werden nach und nach auf diese Seite umgezogen, aber es gibt dort noch einige nützliche Beispiele.</p>
-<p>{{ languages( { "en": "en/Code_snippets", "fr": "fr/Extraits_de_code", "ja": "ja/Code_snippets", "ko": "ko/Code_snippets", "pl": "pl/Fragmenty_kodu" } ) }}</p>
diff --git a/files/de/codeschnipsel/on_page_load/index.html b/files/de/codeschnipsel/on_page_load/index.html
deleted file mode 100644
index ffc64be436..0000000000
--- a/files/de/codeschnipsel/on_page_load/index.html
+++ /dev/null
@@ -1,124 +0,0 @@
----
-title: On page load
-slug: Codeschnipsel/On_page_load
-translation_of: Archive/Add-ons/Code_snippets/On_page_load
----
-<p><font><font>Dieser Artikel ist für </font></font><a href="/en/XUL" title="en / XUL"><font><font>XUL</font></font></a><font><font> / </font></font><a href="/en/JavaScript" title="en / JavaScript"><font><font>JavaScript-Entwickler, die benutzerdefinierte Code haben wollen jedes Mal eine neue Seite wird im Browser / Mail geladen ausgeführt. </font></font></a><font><font>Wenn Sie genauere Kontrolle über benutzerdefinierte Code-Ausführung, zum Beispiel benötigen, wie Dokumente Laden oder wenn Registerkarten schalteten sehen </font></font><a href="/en/Code_snippets/Progress_Listeners" title="en / Code_snippets / Progress_Listeners"><font><font>Fortschritt </font></font></a><font><font>Hörer.</font></font></p>
-
-<p><font><font>Fortschritte Zuhörern ermöglichen Erweiterungen der Ereignisse mit Dokumenten Laden in den Browser und mit Tab Umschalten Ereignissen benachrichtigt werden. </font><font>Fortschritte Zuhörer Umsetzung der </font></font><a href="/en-US/docs/XPCOM_Interface_Reference/nsIWebProgressListener" title="/ en-US / docs / XPCOM_Interface_Reference / nsIWebProgressListener"><font><font>nsIWebProgressListener</font></font></a><font><font> Schnittstelle.</font></font></p>
-
-<h3 id="Creating_an_overlay" name="Creating_an_overlay"><font><font>Erstellen eines Overlays</font></font></h3>
-
-<p><font><font>Zuerst müssen Sie einen erstellen, </font></font><a href="/en/XUL_Overlays" title="en / XUL_Overlays"><font><font>Überlagerung, um eine (oder mehrere, je nachdem, welche Anwendungen Sie zielen) der folgenden XUL-Dokumente:</font></font></a></p>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th><font><font>Anwendung</font></font></th>
- <th><font><font>URI zu überlagern</font></font></th>
- </tr>
- <tr>
- <td><font><font>Firefox</font></font></td>
- <td><code><a class="external" rel="freelink"><font><font>chrome: //browser/content/browser.xul</font></font></a></code></td>
- </tr>
- <tr>
- <td><font><font>Thunderbird</font></font></td>
- <td><code><a class="external" rel="freelink"><font><font>chrome: //messenger/content/messenger.xul</font></font></a></code></td>
- </tr>
- <tr>
- <td><font><font>Navigator von SeaMonkey</font></font></td>
- <td><code><a class="external" rel="freelink"><font><font>chrome: //navigator/content/navigator.xul</font></font></a></code></td>
- </tr>
- </tbody>
-</table>
-
-<h3 id="Attaching_a_script" name="Attaching_a_script"><font><font>Anbringen eines Skripts</font></font></h3>
-
-<p><font><font>Bringen Sie ein Skript, um Ihre einblenden (siehe </font></font><a href="/en/XUL_Overlays#Attaching_a_Script_to_an_Overlay" title="en / XUL Overlays"><font><font>"Anbringen eines Skripts zum Erstellen einer </font></font></a><font><font>Overlay"), </font><font>die eine fügt </font></font><code><font><font>Last</font></font></code><font><font> Ereignis-Listener </font></font><code><font><font>APPCONTENT</font></font></code><font><font> Element (Browser) oder </font></font><code><font><font>messagepane</font></font></code><font><font> (mail):</font></font></p>
-
-<pre class="brush: js"><font><font>window.addEventListener("load", function load(event) {
-    window.removeEventListener("load", load, false); // Listener entfernen, da nicht mehr benötigt
-    myExtension.init();  </font></font><font><font>
-}, false);</font></font>
-<font><font>
-var myextension = {</font></font><font><font>
- init: function() {</font></font><font><font>
- var APPCONTENT = document.getElementById("APPCONTENT"); </font><font>// Browser</font></font><font><font>
- if (APPCONTENT) {</font></font><font><font>
- appcontent.addEventListener("DOMContentLoaded", myExtension.onPageLoad, true);</font></font><font><font>
- }</font></font><font><font>
- var messagepane = document.getElementById("messagepane"); </font><font>// Mail</font></font><font><font>
- if (messagepane) {</font></font><font><font>
- messagepane.addEventListener("load", function(event) { myExtension.onPageLoad(event); }, true);</font></font><font><font>
- }</font></font><font><font>
- }</font></font>
-<font><font>
- onPageLoad: function(aEvent) {</font></font><font><font>
- var doc = aEvent.originalTarget; </font><font>// doc ist das Dokument, das den "onload" Event ausgelöst hat
- // Tu etwas mit der geladenen Seite.
- // doc.location ist ein Location-Objekt (siehe Link unten).
- // Man kann es verwenden, um Code nur auf bestimmten Seiten auszuführen.
- if (doc.location.href.search ("forum")&gt; -1)
- alert("Eine Forum-Seite, wird geladen");</font></font>
- <font><font>
- // Füge Ereignis-Listener für page "unload" hinzu
- aEvent.originalTarget.defaultView.addEventListener ("unload", function(event) { myExtension.onPageUnload (event); }, true);
- }</font></font>
-<font><font>
- onPageUnload: function(Aevent) {</font></font><font><font>
- // Tu etwas</font></font><font><font>
- }</font></font><font><font>
-};</font></font>
-</pre>
-
-<p><font><font>Aktuelle Firefox Stamm Night die onPageLoad Funktion nicht nur für Dokumente, Feuer, aber </font></font><code><font><font>xul: Bilder</font></font></code><font><font> (Favicons in Tabbrowser). </font><font>Wenn Sie nur wollen, Dokumente zu verarbeiten, zu gewährleisten </font></font><code><font><font>aEvent.originalTarget.nodeName == </font></font></code><font><font>"#document".</font></font></p>
-
-<p><font><font>Wenn Sie mit Code auf einer Seite zu laden, ist es wahrscheinlich, würden Sie wollen, um etwas Bereinigungscode auf Seite Entladen laufen. </font><font>Um in das Unload-Ereignis im obigen Beispiel können Sie den "pagehide" Veranstaltung wie diese verwenden zu befestigen:</font></font></p>
-
-<pre class="brush: js"><font><font>appcontent.addEventListener ("pagehide", myExtension.onPageUnload, false);
-</font></font></pre>
-
-<p><font><font>für </font></font><code><font><font>APPCONTENT</font></font></code><font><font> und ähnlich für </font></font><code><font><font>messagepane</font></font></code></p>
-
-<pre class="brush: js"><font><font>messagepane.addEventListener ("pagehide", myExtension.onPageUnload, false);</font></font></pre>
-
-<p><font><font>und fügen Sie den Code zur </font></font><code><font><font>onPageUnload</font></font></code><font><font> Methode.</font></font></p>
-
-<p> </p>
-
-<p> </p>
-
-<h3 id="Basis_onPageLoad_für_ein_Browser-Fenster"><font><font>Basis onPageLoad für ein Browser-Fenster</font></font></h3>
-
-<pre class="brush: js"><font><font>var myextension = {</font></font><font><font>
- init: function () {</font></font><font><font>
- // Das Ereignis kann DOMContentLoaded werden, pageshow, pagehide, laden oder entladen.</font></font><font><font>
- if (gBrowser) gBrowser.addEventListener ("DOMContentLoaded", this.onPageLoad, false);</font></font><font><font>
- }</font></font><font><font>
- onPageLoad: function (Aevent) {</font></font><font><font>
- var doc = aEvent.originalTarget; </font><font>// Doc ist Dokument, das das Ereignis ausgelöst hat</font></font><font><font>
- var win = doc.defaultView; </font><font>// Sieg ist das Fenster für den doc</font></font><font><font>
- // Test gewünschten Bedingungen und etwas tun,</font></font><font><font>
- // If (doc.nodeName = "#document"!) Return; </font><font>// Nur Dokumente</font></font><font><font>
- // If (Sieg = win.top!) Return; </font><font>// nur Top-Fenster.</font></font><font><font>
- // If (win.frameElement) return; </font><font>// Überspringen iframes / Rahmen</font></font><font><font>
- alert ("Seite geladen wird \ n" + doc.location.href);</font></font><font><font>
- }</font></font><font><font>
-}</font></font><font><font>
-window.addEventListener ("load", Funktion load (event) {</font></font><font><font>
-    window.removeEventListener ("load", Last, false); </font><font>// Listener zu entfernen, nicht mehr benötigt</font></font><font><font>
-    myExtension.init ();  </font></font><font><font>
-},falsch);</font></font>
-</pre>
-
-<h3 id="References" name="References"><font><font>Referenzen</font></font></h3>
-
-<ul>
- <li><font><font>Wenn Sie brauchen, um eine kompliziertere Hörer (nicht nur onload) haben, verwenden </font></font><a href="/en/Code_snippets/Progress_Listeners" title="en / Code_snippets / Progress_Listeners"><font><font>Fortschritt </font></font></a><font><font>Hörer.</font></font></li>
-</ul>
-
-<h3 id="Sehe_auch"><font><font>Sehe auch</font></font></h3>
-
-<ul>
- <li><font><font>DOMContentLoaded Ereignis in </font></font><a href="/En/Listening_to_events_in_Firefox_extensions#Simple_DOM.c2.a0events" title="De / Hören Veranstaltungen # Einfache DOM.c2.a0events"><font><font>Anhören von Veranstaltungen: Einfache DOM-Ereignisse</font></font></a></li>
-</ul>
diff --git a/files/de/codeschnipsel/scrollbar/index.html b/files/de/codeschnipsel/scrollbar/index.html
deleted file mode 100644
index 3fa77ebaf7..0000000000
--- a/files/de/codeschnipsel/scrollbar/index.html
+++ /dev/null
@@ -1,32 +0,0 @@
----
-title: Scrollbar
-slug: Codeschnipsel/Scrollbar
-translation_of: Archive/Add-ons/Code_snippets/Scrollbar
----
-<p>Dieses Beispiel zeigt, wie die Scrollbars in einer XUL-Applikation verändert werden können.  Scrollbars im Browser werden auch gestylt. <br>
-(Auf Windows XP getestet)</p>
-<p>Das Beispiel setzt die folgende Struktur voraus:</p>
-<pre class="eval">app/chrome/chrome.manifest
-app/chrome/skin/global/
-</pre>
-<p>Kopieren Sie die scrollbars.css von <code>xulrunner/chrome/classic.jar/skin/classic/global</code> nach <code>app/chrome/skin/global/scrollbars.css</code></p>
-<p>Öffnen Sie <code>app/chrome/chrome.manifest</code> und fügen Sie folgende Zeilen hinzu:</p>
-<pre class="eval">skin app-global standard/1.0 skin/global/
-override <a class=" external" rel="freelink">chrome://global/skin/xulscrollbars.css</a> <a class=" external" rel="freelink">chrome://app-global/skin/scrollbars.css</a>
-</pre>
-<p><code>xulscrollbars.css</code> wird für Windows XP benutzt, <code>nativescrollbars.css</code> auf OSX. Für OSX, fügen Sie noch folgendes an:</p>
-<pre class="eval">override <a class=" external" rel="freelink">chrome://global/skin/nativescrollbars.css</a> <a class=" external" rel="freelink">chrome://app-global/skin/scrollbars.css</a>
-</pre>
-<p>Ändern Sie nun ein paar Farbwerte in <code>app/chrome/skin/global/scrollbars.css</code> um zu testen, ob das CSS benutzt wird.</p>
-<p>Beispielfenster in XUL:</p>
-<pre class="eval">&lt;?xml version="1.0"?&gt;
-&lt;?xml-stylesheet href="<a class=" external" rel="freelink">chrome://global/skin/</a>" type="text/css"?&gt;
-&lt;window id="sampleWindow" width="320" height="240"
- xmlns="<a class=" external" href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" rel="freelink">http://www.mozilla.org/keymaster/gat...re.is.only.xul</a>"&gt;
-&lt;hbox flex="1"&gt;
- &lt;browser type="content" src="<a class=" external" href="http://mozilla.org" rel="freelink">http://mozilla.org</a>" flex="1"/&gt;
- &lt;scrollbar orient="vertical"/&gt;
-&lt;/hbox&gt;
-&lt;/window&gt;
-</pre>
-<p>{{ languages( { "en": "en/Code_snippets/Scrollbar" } ) }}</p>
diff --git a/files/de/codeschnipsel/tabbed_browser/index.html b/files/de/codeschnipsel/tabbed_browser/index.html
deleted file mode 100644
index f08d80a7d4..0000000000
--- a/files/de/codeschnipsel/tabbed_browser/index.html
+++ /dev/null
@@ -1,517 +0,0 @@
----
-title: Tabbed browser
-slug: Codeschnipsel/Tabbed_browser
-translation_of: Archive/Add-ons/Tabbed_browser
----
-<p>Here you should find a set of useful code snippets to help you work with Firefox's tabbed browser. The comments normally mark where you should be inserting your own code.</p>
-<p>Each snippet normally includes some code to run at initialization, these are best run using a <a href="/en/Extension_Frequently_Asked_Questions#Why_doesn.27t_my_script_run_properly.3F" title="en/Extension_Frequently_Asked_Questions#Why_doesn.27t_my_script_run_properly.3F">load listener</a>. These snippets assume they are run in the context of a browser window. If you need to work with tabs from a non-browser window, you need to obtain a reference to one first, see <a href="/en/Working_with_windows_in_chrome_code" title="en/Working_with_windows_in_chrome_code">Working with windows in chrome code</a> for details.</p>
-<h3 id="Getting_access_to_the_browser" name="Getting_access_to_the_browser">Multiple meanings for the word 'browser'</h3>
-<p>The word 'browser' is used several ways. Of course the entire application Firefox is called "a browser". Within the Firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the XUL sense of a {{ XULElem("browser") }} element. Furthermore another meaning of 'browser' in this document and in some Firefox source is "the <a href="/en-US/docs/XUL/tabbrowser" title="/en-US/docs/XUL/tabbrowser">tabbrowser</a> element" in a Firefox XUL window.</p>
-<h3 id="Getting_access_to_the_browser" name="Getting_access_to_the_browser">Getting access to the browser</h3>
-<h4 id="From_main_window">From main window</h4>
-<p>Code running in Firefox's global ChromeWindow, common for extensions that overlay into <code>browser.xul</code>, can access the {{ XULElem("tabbrowser") }} element using the global variable <code>gBrowser.</code></p>
-<pre class="eval">// gBrowser is only accessible from the scope of
-// the browser window (browser.xul)
-gBrowser.addTab(...);
-</pre>
-<p>If <code>gBrowser</code> isn't defined your code is either not running in the scope of the browser window or running too early. You can access <code>gBrowser</code> only after the browser window is fully loaded. If you need to do something with <code>gBrowser</code> right after the window is opened, <a href="/en/DOM/element.addEventListener" title="en/DOM/element.addEventListener">listen</a> for the <code>load</code> event and use <code>gBrowser</code> in the event listener.</p>
-<p>If your code does not have access to the main window because it is run in a sidebar or dialog, you first need to get access to the browser window you need before you can use <code>gBrowser</code>. You can find more information on getting access to the browser window in <a href="/en/Working_with_windows_in_chrome_code" title="en/Working_with_windows_in_chrome_code">Working with windows in chrome code</a>.</p>
-<h4 id="From_a_sidebar">From a sidebar</h4>
-<p>Basically, if your extension code is a sidebar you can use:</p>
-<pre class="brush: js">var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation)
- .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIDOMWindow);
-
-mainWindow.gBrowser.addTab(...);
-</pre>
-<h4 id="From_a_dialog">From a dialog</h4>
-<p>If your code is running in a dialog opened directly by a browser window, you can use:</p>
-<pre class="eval">window.opener.gBrowser.addTab(...);
-</pre>
-<p>If <code>window.opener</code> doesn't work, you can get the most recent browser window using this code:</p>
-<pre class="brush: js">var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
-var mainWindow = wm.getMostRecentWindow("navigator:browser");
-mainWindow.gBrowser.addTab(...);
-</pre>
-<h3 id="Opening_a_URL_in_a_new_tab" name="Opening_a_URL_in_a_new_tab">Opening a URL in a new tab</h3>
-<pre class="brush: js">// Add tab
-gBrowser.addTab("http://www.google.com/");
-
-// Add tab, then make active
-gBrowser.selectedTab = gBrowser.addTab("http://www.google.com/");
-</pre>
-<h4 id="Manipulating_content_of_a_new_tab" name="Manipulating_content_of_a_new_tab">Manipulating content of a new tab</h4>
-<p>If you want to work on the content of the newly opened tab, you'll need to wait until the content has finished loading.</p>
-<pre class="brush: js">// WRONG WAY (the page hasn't finished loading yet)
-var newTabBrowser = gBrowser.getBrowserForTab(gBrowser.addTab("http://www.google.com/"));
-alert(newTabBrowser.contentDocument.body.innerHTML);
-
-// BETTER WAY
-var newTabBrowser = gBrowser.getBrowserForTab(gBrowser.addTab("http://www.google.com/"));
-newTabBrowser.addEventListener("load", function () {
- newTabBrowser.contentDocument.body.innerHTML = "&lt;div&gt;hello world&lt;/div&gt;";
-}, true);
-</pre>
-<p>(The event target in the onLoad handler will be a 'tab' XUL element). See <a href="/en/XUL/tabbrowser#m-getBrowserForTab" title="en/XUL/tabbrowser#m-getBrowserForTab">tabbrowser</a> for getBrowserForTab(). N<span style="line-height: 1.5;">ote that the code above does not work inside of the Electrolysis (e10s)</span><span style="line-height: 1.5;"> enabled tabs.</span></p>
-<h4 id="Opening_a_URL_in_the_correct_window.2Ftab" name="Opening_a_URL_in_the_correct_window.2Ftab">Opening a URL in the correct window/tab</h4>
-<p>There are methods available in <code><a class="external" href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/utilityOverlay.js" rel="external nofollow" title="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/utilityOverlay.js">chrome://browser/content/utilityOverlay.js</a></code> that make it easy to open URL in tabs such as <code>openUILinkIn</code> and <code>openUILink</code>.</p>
-<dl>
- <dt>
- <code>openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl ) </code></dt>
- <dd>
- where:
- <ul>
- <li>"current" current tab (if there aren't any browser windows, then in a new window instead)</li>
- <li>"tab" new tab (if there aren't any browser windows, then in a new window instead)</li>
- <li>"tabshifted" same as "tab" but in background if default is to select new tabs, and vice versa</li>
- <li>"window" new window</li>
- <li>"save" save to disk (with no filename hint!)</li>
- </ul>
- </dd>
- <dt>
- <code>openUILink( url, e, ignoreButton, ignoreAlt, allowKeywordFixup, postData, referrerUrl ) </code></dt>
- <dd>
-  </dd>
-</dl>
-<p>The following code will open a URL in a new tab, an existing tab, or an existing window based on which mouse button was pressed and which hotkeys (ex: Ctrl) are being held. The code given is for a {{ XULElem("menuitem") }}, but will work equally well for other XUL elements. This will only work in an overlay of browser.xul.</p>
-<p>XUL:</p>
-<pre class="eval">&lt;menuitem oncommand="myExtension.foo(event)" onclick="checkForMiddleClick(this, event)" label="Click me"/&gt;
-</pre>
-<p>JS:</p>
-<pre class="brush: js">var myExtension = {
- foo: function(event) {
- openUILink("http://www.example.com", event, false, true);
- }
-}</pre>
-<h4 id="Opening_a_URL_in_an_on_demand_tab">Opening a URL in an on demand tab</h4>
-<pre class="brush: js">var gSessionStore = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
-
-// Create new tab, but don't load the content.
-var url = "https://developer.mozilla.org";
-var tab = gBrowser.addTab(null);
-gSessionStore.setTabState(tab, JSON.stringify({
- entries: [
- { url: url, title: url }
- ],
- lastAccessed: 0,
- index: 1,
- hidden: false,
- attributes: {},
- image: null
-}));
-</pre>
-<h4 id="Reusing_tabs" name="Reusing_tabs">Reusing tabs</h4>
-<p>Rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which already displays the desired URL--if one is already open. Following this practice minimizes the proliferation of tabs and browsers created by your extension.</p>
-<h5 id="Reusing_by_URL.2FURI" name="Reusing_by_URL.2FURI">Reusing by URL/URI</h5>
-<p>A common feature found in many extensions is to point the user to <code>chrome://</code> URIs in a browser window (for example, help or about information) or external (on-line <code>http(s)://</code>) HTML documents when the user clicks an extension's button or link. The following code demonstrates how to re-use an existing tab that already displays the desired URL/URI. If no such tab exists, a new one is opened with the specified URL/URI.</p>
-<pre class="brush: js">function openAndReuseOneTabPerURL(url) {
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- var browserEnumerator = wm.getEnumerator("navigator:browser");
-
- // Check each browser instance for our URL
- var found = false;
- while (!found &amp;&amp; browserEnumerator.hasMoreElements()) {
- var browserWin = browserEnumerator.getNext();
- var tabbrowser = browserWin.gBrowser;
-
- // Check each tab of this browser instance
- var numTabs = tabbrowser.browsers.length;
- for (var index = 0; index &lt; numTabs; index++) {
- var currentBrowser = tabbrowser.getBrowserAtIndex(index);
- if (url == currentBrowser.currentURI.spec) {
-
- // The URL is already opened. Select this tab.
- tabbrowser.selectedTab = tabbrowser.tabContainer.childNodes[index];
-
- // Focus *this* browser-window
- browserWin.focus();
-
- found = true;
- break;
- }
- }
- }
-
- // Our URL isn't open. Open it now.
- if (!found) {
- var recentWindow = wm.getMostRecentWindow("navigator:browser");
- if (recentWindow) {
- // Use an existing browser window
- recentWindow.delayedOpenTab(url, null, null, null, null);
- }
- else {
- // No browser windows are open, so open a new one.
- window.open(url);
- }
- }
-}
-</pre>
-<h5 id="Reusing_by_other_criteria" name="Reusing_by_other_criteria">Reusing by other criteria</h5>
-<p>Sometimes you want to reuse a previously-opened tab regardless of which URL/URI it displays. This assumes the tab is opened by your extension, not by some other browser component. We can do re-use an arbitrary tab by attaching a custom attribute to it when we first open it. Later, when we want to re-use that tab, we iterate over all open tabs looking for one which has our custom attribute. If such a tab exists, we change its URL/URI and focus/select it. If no such tab exists (perhaps the user closed it or we never opened it in the first place), we create a new tab with our custom attribute.</p>
-<pre class="brush: js">function openAndReuseOneTabPerAttribute(attrName, url) {
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
- for (var found = false, index = 0, tabbrowser = wm.getEnumerator('navigator:browser').getNext().gBrowser;
- index &lt; tabbrowser.tabContainer.childNodes.length &amp;&amp; !found;
- index++) {
-
- // Get the next tab
- var currentTab = tabbrowser.tabContainer.childNodes[index];
-
- // Does this tab contain our custom attribute?
- if (currentTab.hasAttribute(attrName)) {
-
- // Yes--select and focus it.
- tabbrowser.selectedTab = currentTab;
-
- // Focus *this* browser window in case another one is currently focused
- tabbrowser.ownerDocument.defaultView.focus();
- found = true;
- }
- }
-
- if (!found) {
- // Our tab isn't open. Open it now.
- var browserEnumerator = wm.getEnumerator("navigator:browser");
- var tabbrowser = browserEnumerator.getNext().gBrowser;
-
- // Create tab
- var newTab = tabbrowser.addTab(url);
- newTab.setAttribute(attrName, "xyz");
-
- // Focus tab
- tabbrowser.selectedTab = newTab;
-
- // Focus *this* browser window in case another one is currently focused
- tabbrowser.ownerDocument.defaultView.focus();
- }
-}
-</pre>
-<p>The function can be called like so:</p>
-<pre class="eval"><span class="nowiki">openAndReuseOneTabPerAttribute("myextension-myattribute", "http://developer.mozilla.org/")</span>.
-</pre>
-<h3 id="Closing_a_tab" name="Closing_a_tab">Closing a tab</h3>
-<p>This example closes the currently selected tab.</p>
-<pre class="eval">gBrowser.removeCurrentTab();
-</pre>
-<p>There is also a more generic <code>removeTab</code> method, which accepts a XUL {{ XULElem("tab") }} element as its single parameter.</p>
-<h3 id="Changing_active_tab" name="Changing_active_tab">Changing active tab</h3>
-<p>This moves one tab forward (to the right).</p>
-<pre>gBrowser.tabContainer.advanceSelectedTab(1, true);
-</pre>
-<p>This moves one tab to the left.</p>
-<pre>gBrowser.tabContainer.advanceSelectedTab(-1, true);
-</pre>
-<h3 id="Detecting_page_load" name="Detecting_page_load">Detecting page load</h3>
-<p>See also <a href="/en/Code_snippets/On_page_load" title="en/Code_snippets/On_page_load">Code snippets:On page load</a></p>
-<pre class="brush: js">function examplePageLoad(event) {
- if (event.originalTarget instanceof Components.interfaces.nsIDOMHTMLDocument) {
- var win = event.originalTarget.defaultView;
- if (win.frameElement) {
- // Frame within a tab was loaded. win should be the top window of
- // the frameset. If you don't want do anything when frames/iframes
- // are loaded in this web page, uncomment the following line:
- // return;
- // Find the root document:
- win = win.top;
- }
- }
-}
-
-// do not try to add a callback until the browser window has
-// been initialised. We add a callback to the tabbed browser
-// when the browser's window gets loaded.
-window.addEventListener("load", function () {
- // Add a callback to be run every time a document loads.
- // note that this includes frames/iframes within the document
- gBrowser.addEventListener("load", examplePageLoad, true);
-}, false);
-
-...
-// When no longer needed
-gBrowser.removeEventListener("load", examplePageLoad, true);
-...
-</pre>
-<h3 id="Notification_when_a_tab_is_added_or_removed" name="Notification_when_a_tab_is_added_or_removed">Notification when a tab is added or removed</h3>
-<pre class="brush: js">function exampleTabAdded(event) {
- var browser = gBrowser.getBrowserForTab(event.target);
- // browser is the XUL element of the browser that's been added
-}
-
-function exampleTabMoved(event) {
- var browser = gBrowser.getBrowserForTab(event.target);
- // browser is the XUL element of the browser that's been moved
-}
-
-function exampleTabRemoved(event) {
- var browser = gBrowser.getBrowserForTab(event.target);
- // browser is the XUL element of the browser that's been removed
-}
-
-// During initialization
-var container = gBrowser.tabContainer;
-container.addEventListener("TabOpen", exampleTabAdded, false);
-container.addEventListener("TabMove", exampleTabMoved, false);
-container.addEventListener("TabClose", exampleTabRemoved, false);
-
-// When no longer needed
-container.removeEventListener("TabOpen", exampleTabAdded, false);
-container.removeEventListener("TabMove", exampleTabMoved, false);
-container.removeEventListener("TabClose", exampleTabRemoved, false);
-</pre>
-<div class="note">
- <p><strong>Note:</strong> Starting in {{Gecko("1.9.1") }}, there's an easy way to <a href="/En/Listening_to_events_on_all_tabs" title="https://developer.mozilla.org/en/Listening_to_events_on_all_tabs">listen on progress events on all tabs</a>.</p>
-</div>
-<p>{{ h2_gecko_minversion("Notification when a tab's attributes change", "2.0") }}</p>
-<p>Starting in Gecko 2.0, you can detect when a tab's attributes change by listening for the <code>TabAttrModified</code> event. The attributes to which changes result in this event being sent are:</p>
-<ul>
- <li>{{ xulattr("label") }}</li>
- <li>{{ xulattr("crop") }}</li>
- <li>{{ xulattr("busy") }}</li>
- <li>{{ xulattr("image") }}</li>
- <li>{{ xulattr("selected") }}</li>
-</ul>
-<pre class="brush: js">function exampleTabAttrModified(event) {
- var tab = event.target;
- // Now you can check what's changed on the tab
-}
-
-// During initialization
-var container = gBrowser.tabContainer;
-container.addEventListener("TabAttrModified", exampleTabAttrModified, false);
-
-// When no longer needed
-container.removeEventListener("TabAttrModified", exampleTabAttrModified, false);
-</pre>
-<p>{{ h2_gecko_minversion("Notification when a tab is pinned or unpinned", "2.0") }}</p>
-<p>Starting in Gecko 2.0, tabs can be "pinned"; that is, they become special application tabs ("app tabs"), which are pinned to the beginning of the tab bar, and show only the favicon. You can detect when a tab becomes pinned or unpinned by watching for the <code>TabPinned</code> and <code>TabUnpinned</code> events.</p>
-<pre class="brush: js">function exampleTabPinned(event) {
- var browser = gBrowser.getBrowserForTab(event.target);
- // browser is the XUL element of the browser that's been pinned
-}
-
-function exampleTabUnpinned(event) {
- var browser = gBrowser.getBrowserForTab(event.target);
- // browser is the XUL element of the browser that's been pinned
-}
-
-// Initialization
-
-var container = gBrowser.tabContainer;
-container.addEventListener("TabPinned", exampleTabPinned, false);
-container.addEventListener("TabUnpinned", exampleTabUnpinned, false);
-
-// When no longer needed
-
-container.removeEventListener("TabPinned", exampleTabPinned, false);
-container.removeEventListener("TabUnpinned", exampleTabUnpinned, false);
-</pre>
-<h3 id="Detecting_tab_selection" name="Detecting_tab_selection">Detecting tab selection</h3>
-<p>The following code allows you to detect when a new tab is selected in the browser:</p>
-<pre class="brush: js">function exampleTabSelected(event) {
- var browser = gBrowser.selectedBrowser;
- // browser is the XUL element of the browser that's just been selected
-}
-
-// During initialisation
-var container = gBrowser.tabContainer;
-container.addEventListener("TabSelect", exampleTabSelected, false);
-
-// When no longer needed
-container.removeEventListener("TabSelect", exampleTabSelected, false);
-</pre>
-<h3 id="Getting_document_of_currently_selected_tab" name="Getting_document_of_currently_selected_tab">Getting document of currently selected tab</h3>
-<p>The following code allows you to retrieve the document that is in the selected tab. This code will work in the scope of the browser window (e.g. you're working from an overlay to the browser window).</p>
-<pre class="eval">gBrowser.contentDocument;
-</pre>
-<p>or</p>
-<pre class="eval">content.document
-</pre>
-<p>If you're working from a window or dialog that was opened by the browser window, you can use this code to get the document displayed in the selected tab in the browser window that opened the new window or dialog.</p>
-<pre class="eval">window.opener.content.document
-</pre>
-<p>From windows or dialogs not opened by the browser window, you can use {{ interface("nsIWindowMediator") }} to get the document displayed in the selected tab of the most recently used browser window.</p>
-<pre class="brush: js">var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
-var recentWindow = wm.getMostRecentWindow("navigator:browser");
-return recentWindow ? recentWindow.content.document.location : null;
-</pre>
-<p>See also <a href="/en/Working_with_windows_in_chrome_code#Content_windows" title="en/Working_with_windows_in_chrome_code#Content_windows">Working with windows in chrome code</a>.</p>
-<h3 id="Enumerating_tabs" name="Enumerating_tabs">Enumerating browsers</h3>
-<p>To go through all browser in a tabbrowser, first get a reference to a browser's window. If your code is executed from a Firefox <code>browser.xul</code> overlay (for example, it is a toolbar button or menu <em>click</em> handler), you can access the current window with the <code>window</code> pre-defined variable. However, if your code is executed from its own window (for example, a settings/options dialog), you can use {{ interface("nsIWindowMediator") }} to get a browser's window.</p>
-<p>Next, get the <code>&lt;tabbrowser/&gt;</code> element. You can get it with <code>win.gBrowser</code>, where <code>win</code> is the browser's window from the previous step. You can use simply <code>gBrowser</code> instead of <code>window.gBrowser</code> if running in the context of a <code>browser.xul</code> overlay.</p>
-<p>Finally, use <code>gBrowser.browsers.length</code> to get the number of browsers and <code>gBrowser.getBrowserAtIndex()</code> to get a <code>&lt;browser/&gt;</code> element. For example:</p>
-<pre class="brush: js">var num = gBrowser.browsers.length;
-for (var i = 0; i &lt; num; i++) {
- var b = gBrowser.getBrowserAtIndex(i);
- try {
- dump(b.currentURI.spec); // dump URLs of all open tabs to console
- } catch(e) {
- Components.utils.reportError(e);
- }
-}</pre>
-<p>To learn what methods are available for <code>&lt;browser/&gt;</code> and <code>&lt;tabbrowser/&gt;</code> elements, use <a href="/en/DOM_Inspector" title="en/DOM_Inspector">DOM Inspector</a> or look in {{ source("toolkit/content/widgets/browser.xml","browser.xml") }} for corresponding XBL bindings (or just look at the current reference pages on {{ XULElem("browser") }} and {{ XULElem("tabbrowser") }}.</p>
-<h3 id="Getting_the_browser_that_fires_the_http-on-modify-request_notification">Getting the browser that fires the http-on-modify-request notification</h3>
-<p>See the <a href="/en/Observer_Notifications#HTTP_requests" title="en/Observer_Notifications#HTTP_requests">Observer notifications</a> page for information on http-on-* notifications.</p>
-<p>Note that some HTTP requests aren't associated with a tab; for example, RSS feed updates, extension manager requests, XHR requests from XPCOM components, etc. In those cases, the following code returns null.</p>
-<div class="warning">
- <strong>Warning:</strong> This code should be updated to use {{interface("nsILoadContext")}} instead of <code>getInterface(Components.interfaces.nsIDOMWindow)</code>, <a href="/en-US/docs/Updating_extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request" title="/en-US/docs/Updating_extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request">see this example</a>..<a href="#Getting_the_browser_that_fires_the_http-on-modify-request_notification_(example_code_updated_for_loadContext)">UPDATED EXAMPLE IS IN SECTION BELOW THIS</a></div>
-<pre class="brush: js">observe: function (subject, topic, data) {
- if (topic == "http-on-modify-request") {
- subject.QueryInterface(Components.interfaces.nsIHttpChannel);
- var url = subject.URI.spec; /* url being requested. you might want this for something else */
- var browser = this.getBrowserFromChannel(subject);
- if (browser != null) {
- /* do something */
- }
- }
-},
-
-getBrowserFromChannel: function (aChannel) {
- try {
- var notificationCallbacks =
- aChannel.notificationCallbacks ? aChannel.notificationCallbacks : aChannel.loadGroup.notificationCallbacks;
-
- if (!notificationCallbacks)
- return null;
-
- var domWin = notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow);
- return gBrowser.getBrowserForDocument(domWin.top.document);
- }
- catch (e) {
- dump(e + "\n");
- return null;
- }
-}
-</pre>
-<h3 id="Getting_the_browser_that_fires_the_http-on-modify-request_notification_(example_code_updated_for_loadContext)">Getting the browser that fires the http-on-modify-request notification (example code updated for loadContext)</h3>
-<p>Here an example of the previous section is shown. The previous section was left intact so people can see the old way of doing things.</p>
-<pre class="brush: js">Components.utils.import('resource://gre/modules/Services.jsm');
-Services.obs.addObserver(httpObs, 'http-on-modify-request', false);
-//Services.obs.removeObserver(httpObs, 'http-on-modify-request'); //uncomment this line, or run this line when you want to remove the observer
-
-var httpObs = {
-    observe: function (aSubject, aTopic, aData) {
-        if (aTopic == 'http-on-modify-request') {
-            /*start - do not edit here*/
-            var oHttp = aSubject.QueryInterface(Components.interfaces.nsIHttpChannel); //i used nsIHttpChannel but i guess you can use nsIChannel, im not sure why though
-            var interfaceRequestor = oHttp.notificationCallbacks.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
-            //var DOMWindow = interfaceRequestor.getInterface(Components.interfaces.nsIDOMWindow); //not to be done anymore because: https://developer.mozilla.org/en-US/docs/Updating_extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request //instead do the loadContext stuff below
-            var loadContext;
-            try {
-                loadContext = interfaceRequestor.getInterface(Components.interfaces.nsILoadContext);
-            } catch (ex) {
-                try {
-                    loadContext = aSubject.loadGroup.notificationCallbacks.getInterface(Components.interfaces.nsILoadContext);
-                    //in ff26 aSubject.loadGroup.notificationCallbacks was null for me, i couldnt find a situation where it wasnt null, but whenever this was null, and i knew a loadContext is supposed to be there, i found that "interfaceRequestor.getInterface(Components.interfaces.nsILoadContext);" worked fine, so im thinking in ff26 it doesnt use aSubject.loadGroup.notificationCallbacks anymore, but im not sure
-                } catch (ex2) {
-                    loadContext = null;
-                    //this is a problem i dont know why it would get here
-                }
-            }
-            /*end do not edit here*/
-            /*start - do all your edits below here*/
-            var url = oHttp.URI.spec; //can get url without needing loadContext
-            if (loadContext) {
-                var contentWindow = loadContext.associatedWindow; //this is the HTML window of the page that just loaded
-                //aDOMWindow this is the firefox window holding the tab
-                var aDOMWindow = contentWindow.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsIDocShellTreeItem).rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
-                var gBrowser = aDOMWindow.gBrowser; //this is the gBrowser object of the firefox window this tab is in
-                var aTab = gBrowser._getTabForContentWindow(contentWindow.top); //this is the clickable tab xul element, the one found in the tab strip of the firefox window, aTab.linkedBrowser is same as browser var above //can stylize tab like aTab.style.backgroundColor = 'blue'; //can stylize the tab like aTab.style.fontColor = 'red';
-                var browser = aTab.linkedBrowser; //this is the browser within the tab //this is what the example in the previous section gives
-                //end getting other useful stuff
-            } else {
-                Components.utils.reportError('EXCEPTION: Load Context Not Found!!');
-                //this is likely no big deal as the channel proably has no associated window, ie: the channel was loading some resource. but if its an ajax call you may end up here
-            }
-        }
-    }
-};
-</pre>
-<p>Here's a cleaner example of the same thing:</p>
-<pre><code>Cu.import('resource://gre/modules/Services.jsm');
-
-var httpRequestObserver = {
- observe: function (subject, topic, data) {
- var httpChannel, requestURL;
-
- if (topic == "http-on-modify-request") {
- httpChannel = subject.QueryInterface(Ci.nsIHttpChannel);
- requestURL = httpChannel.URI.spec;
-
- var newRequestURL, i;
-
- if (/someurl/.test(requestURL)) {
- var goodies = loadContextGoodies(httpChannel);
- if (goodies) {
- httpChannel.cancel(Cr.NS_BINDING_ABORTED);
- goodies.contentWindow.location = self.data.url('pages/test.html');
- } else {
- //dont do anything as there is no contentWindow associated with the httpChannel, liekly a google ad is loading or some ajax call or something, so this is not an error
- }
- }
-
- return;
- }
- }
-};
-Services.obs.addObserver(httpRequestObserver, "http-on-modify-request", false);
-
-
-
-
-
-//this function gets the contentWindow and other good stuff from loadContext of httpChannel
-function loadContextGoodies(httpChannel) {
- //httpChannel must be the subject of http-on-modify-request QI'ed to nsiHTTPChannel as is done on line 8 "httpChannel = subject.QueryInterface(Ci.nsIHttpChannel);"
- //start loadContext stuff
- var loadContext;
- try {
- var interfaceRequestor = httpChannel.notificationCallbacks.QueryInterface(Ci.nsIInterfaceRequestor);
- //var DOMWindow = interfaceRequestor.getInterface(Components.interfaces.nsIDOMWindow); //not to be done anymore because: https://developer.mozilla.org/en-US/docs/Updating_extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request //instead do the loadContext stuff below
- try {
- loadContext = interfaceRequestor.getInterface(Ci.nsILoadContext);
- } catch (ex) {
- try {
- loadContext = subject.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext);
- } catch (ex2) {}
- }
- } catch (ex0) {}
-
- if (!loadContext) {
- //no load context so dont do anything although you can run this, which is your old code
- //this probably means that its loading an ajax call or like a google ad thing
- return null;
- } else {
- var contentWindow = loadContext.associatedWindow;
- if (!contentWindow) {
- //this channel does not have a window, its probably loading a resource
- //this probably means that its loading an ajax call or like a google ad thing
- return null;
- } else {
- var aDOMWindow = contentWindow.top.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
- var gBrowser = aDOMWindow.gBrowser;
- var aTab = gBrowser._getTabForContentWindow(contentWindow.top); //this is the clickable tab xul element, the one found in the tab strip of the firefox window, aTab.linkedBrowser is same as browser var above //can stylize tab like aTab.style.backgroundColor = 'blue'; //can stylize the tab like aTab.style.fontColor = 'red';
- var browser = aTab.linkedBrowser; //this is the browser within the tab //this is where the example in the previous section ends
- return {
- aDOMWindow: aDOMWindow,
- gBrowser: gBrowser,
- aTab: aTab,
- browser: browser,
- contentWindow: contentWindow
- };
- }
- }
- //end loadContext stuff
-}</code></pre>
-<p>{{ languages( { "fr": "fr/Extraits_de_code/Onglets_de_navigation", "ja": "ja/Code_snippets/Tabbed_browser", "pl": "pl/Fragmenty_kodu/Przegl\u0105danie_w_kartach" } ) }}</p>
diff --git a/files/de/codeschnipsel/tree/index.html b/files/de/codeschnipsel/tree/index.html
deleted file mode 100644
index 95ae8ed107..0000000000
--- a/files/de/codeschnipsel/tree/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Tree
-slug: Codeschnipsel/Tree
-translation_of: Archive/Add-ons/Code_snippets/Tree
----
-<h3 id="AufklappenZuklappen_aller_Baumknoten">Aufklappen/Zuklappen aller Baumknoten</h3>
-<p>Um alle Baumknoten aufzuklappen:</p>
-<pre class="eval"> var treeView = tree.treeBoxObject.view;
- for (var i = 0; i &lt; treeView.rowCount; i++) {
- if (treeView.isContainer(i) &amp;&amp; !treeView.isContainerOpen(i))
- treeView.toggleOpenState(i);
- }
-</pre>
-<p>Um alle Baumknoten zu zuklappen, wird die Bedingung einfach umgekehrt:</p>
-<pre class="eval"> var treeView = tree.treeBoxObject.view;
- for (var i = 0; i &lt; treeView.rowCount; i++) {
- if (treeView.isContainer(i) &amp;&amp; treeView.isContainerOpen(i))
- treeView.toggleOpenState(i);
- }
-</pre>
-<h3 id="Text_der_ausgewählten_Zeile_abrufen">Text der ausgewählten Zeile abrufen</h3>
-<p>Ausgehend von gegebenem Baum:</p>
-<pre class="eval"> &lt;tree id="my-tree" seltype="single" onselect="onTreeSelected()"&gt;
-</pre>
-<p>Wird das folgende JavaScript verwendet:</p>
-<pre class="eval"> function onTreeSelected(){
- var tree = document.getElementById("my-tree");
- var cellIndex = 0;
- var cellText = tree.view.getCellText(tree.currentIndex, tree.columns.getColumnAt(cellIndex));
- alert(cellText);
- }
-</pre>
-<h3 id="Das_Baum-Item_einer_fokussierten_Zeile_abrufen">Das Baum-Item einer fokussierten Zeile abrufen</h3>
-<p>Ausgehend von <code>&lt;tree id="my-tree"&gt;</code>, kann der folgende Codeausschnitt verwendet werden, um das <a href="/en/XUL/treeitem" title="en/XUL/treeitem">tree item</a> abzurufen:</p>
-<pre class="eval">var view = document.getElementById("my-tree").view;
-var sel = view.selection.currentIndex; //returns -1 if the tree is not focused
-var treeItem = view.getItemAtIndex(sel);
-</pre>
-<p>Zu beachten ist, dass der aktuelle Index unter Umständen nicht ausgewählt sein (z.B. in einem Baum mit mehrfach-Auswahl).</p>
-<h3 id="Einen_treecell_von_einem_Mausklick_abrufen">Einen treecell von einem Mausklick abrufen</h3>
-<p>Die erste Wahl ist <code>&lt;treecell onclick="yourfunc();"/&gt;</code> oder etwas ähnliches auszuprobieren. das funktioniert nicht. Es können keine Event-Handler zum <code>&lt;treecell&gt;</code> Element hinzugefügt werden. Stattdessen kann ein Event-Handler zum <code>&lt;tree&gt;</code> Element hinzugefügt werden. Dann können <code>event-</code> und andere Methoden benutzt werden, um das <code>&lt;treecell&gt;</code> Element zu finden. Zum Beispiel, ausgehend von:</p>
-<pre class="eval">&lt;tree id="my-tree" onclick="onTreeClicked(event)"&gt;
-</pre>
-<p>Wird das folgende JavaScript verwendet:</p>
-<pre>function onTreeClicked(event){
- var tree = document.getElementById("my-tree");
- var tbo = tree.treeBoxObject;
-
- // get the row, col and child element at the point
- var row = { }, col = { }, child = { };
- tbo.getCellAt(event.clientX, event.clientY, row, col, child);
-
- var cellText = tree.view.getCellText(row.value, col.value);
- alert(cellText);
-}
-</pre>
-<h3 id="Ausgewählte_Indizes_eines_mehrfach_ausgewählten_Baumes_abrufen">Ausgewählte Indizes eines mehrfach ausgewählten Baumes abrufen</h3>
-<pre> var start = {}, end = {}, numRanges = tree.view.selection.getRangeCount(), selectedIndices = [];
-
- for (var t = 0; t &lt; numRanges; t++){
- tree.view.selection.getRangeAt(t, start, end);
- for (var v = start.value; v &lt;= end.value; v++)
- selectedIndices.push(v);
- }
-</pre>
-<h3 id="Weitere_Ressourcen">Weitere Ressourcen</h3>
-<ul> <li><a href="/de/XUL/tree" title="de/XUL/tree">XUL: Tree Dokumentation</a></li> <li><a href="/de/XUL_Tutorial/Tree_Auswahl" title="de/XUL_Tutorial/Tree_Auswahl">XUL Tutorial: Tree Auswahl</a></li>
-</ul>
-<p>{{ languages( { "fr": "fr/Extraits_de_code/Tree", "en": "en/Code_snippets/Tree" } ) }}</p>
diff --git a/files/de/codeschnipsel/windows/index.html b/files/de/codeschnipsel/windows/index.html
deleted file mode 100644
index 6da2289604..0000000000
--- a/files/de/codeschnipsel/windows/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
----
-title: Windows
-slug: Codeschnipsel/Windows
-tags:
- - Add-ons
- - Erweiterungen
-translation_of: Archive/Add-ons/Code_snippets/Windows
----
-<p>Diese Seite zeigt einige interessante Codebeispiele.</p>
-<h3 id="Neue_Browser-Fenster_öffnen">Neue Browser-Fenster öffnen</h3>
-<p>Um ein neues Browser-Fenster zu öffnen, wird einfach <code>window.open()</code> benutzt. Jedoch gibt <code>window.open()</code> ein <code>Window</code> Objekt für den Inhalt zurück, nicht für das Browser-Fenster selbst, deshalb sollte man sich das Chrome <code>Window</code> zuerst holen. Der einfachste Weg das zu machen, ist <a href="/de/XPCOM_Interface_Referenz/nsIWindowMediator" title="de/XPCOM Interface Referenz/nsIWindowMediator"><code>nsIWindowMediator</code></a> zu benutzen.</p>
-<h3 id="Beispiel">Beispiel</h3>
-<pre class="brush: js">window.open();
-var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
- .getService(Components.interfaces.nsIWindowMediator);
-var newWindow = wm.getMostRecentWindow("navigator:browser");
-var b = newWindow.getBrowser();
-// why did we do this? we never do anything with |b|
-</pre>
-<h3 id="Ziehbare_Fenster">Ziehbare Fenster</h3>
-<p>Um ein Fenster durch das Klicken auf die Fensterinhalte ziehbar zu machen, können die <code>mousedown</code> und <code>mousemove</code> Ereignisse verwendet werden. Der folgende Code berücksichtigt nicht, welches Element angeklickt wurde, sondern reagiert auf alle <code>mousedown</code> Ereignisse gleich. Dieser Code kann verbessert werden, indem das  Zielelements des Ereignisses überprüft wird und <code>startPos</code> nur festgelegt wird, wenn das Element den Kriterien entspricht.</p>
-<h4 id="Example_2" name="Example_2">Beispiel</h4>
-<pre class="brush: js">var startPos=0;
-var mouseDown = function(event) {
- startPos = [ event.clientX, event.clientY];
-}
-var mouseMove = function(event) {
- if (startPos != 0) {
- var newX = event.screenX-startPos[0];
- var newY = event.screenY-startPos[1];
- window.moveTo(newX,newY);
- }
-}
-var mouseUp = function(event) {
- startPos=0;
-}
-
-window.addEventListener("mousedown",mouseDown, false);
-window.addEventListener("mouseup",mouseUp, false);
-window.addEventListener("mousemove",mouseMove, false);
-</pre>
-<h4 id="XUL_Titelleistenelement">XUL Titelleistenelement</h4>
-<p>XUL Anwendungen können Vorteile aus dem <a href="/deXUL/titlebar">Titlebar</a> Element ziehen, um ein ähnliche Ergebnisse ohne extra JavaScript Code zu erzielen.</p>
-<h3 id="Re-using_and_focusing_named_windows" name="Re-using_and_focusing_named_windows">Wiederbenutzung und Fokussierung von benannten Fenstern</h3>
-<p>Dieser Abschnitt ist inkorrekt und muss neu geschrieben werden. Siehe <a href="/de/XPCOM_Interface_Referenz/nsIWindowMediator">nsIWindowMediator</a> für eine korrekte Dokumentation.</p>
-<div style="border: 1px solid black; color: rgb(170, 170, 170);">
-<p>Während eine Festlegung des <code>name</code> Parameters bei <a href="/en/DOM/window.open" title="en/DOM/window.open">window.open</a> oder <a href="/en/DOM/window.openDialog" title="en/DOM/window.openDialog">window.openDialog</a> verhindert, dass mehrere Fenster geöffnet werden, wird jeder Aufruf das Fenster Wiederinitialisieren und daher geht alles, was der Benutzer in diesem Fenster gerade getan hat, verloren. Zusätzlich wird es nicht im Vordergrund angezeigt, wenn das Fenster im Hintergrund ist. Dieser Code prüft, ob ein Fenster mit dem gegebenen Namen existiert. Wird eines gefunden, wird es fokussiert. Wenn nicht, wird ein Neues geöffnet.</p>
-<pre class="eval">var windowName = "yourWindowName";
-var windowsMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
-var win = windowsMediator.getMostRecentWindow(windowName);
-if (win)
- win.focus();
-else
- window.open("<a class=" external" rel="freelink">chrome://to/your/window.xul</a>", windowName, "features");
-</pre>
-</div>
-<h3 id="Siehe_auch">Siehe auch</h3>
-<ul> <li><a href="/de/Mit_Fenstern_im_chrome_Code_arbeiten">Mit Fenstern im chrome Code arbeiten</a>.</li>
-</ul>
-<p>{{ languages( {"en": "en/Code_snippets/Windows", "fr": "fr/Extraits_de_code/Fen\u00eatres", "ja": "ja/Code_snippets/Windows", "pl": "pl/Fragmenty_kodu/Okna" } ) }}</p>