Zum Inhalt springen

„Benutzer:P.Copp/scripts/Extra-Editbuttons.js“ – Versionsunterschied

aus Wikipedia, der freien Enzyklopädie
Inhalt gelöscht Inhalt hinzugefügt
P.Copp (Diskussion | Beiträge)
K fix und merge (https://de.wikipedia.org/w/index.php?diff=100635872&oldid=100635298)
P.Copp (Diskussion | Beiträge)
K sync
Zeile 16: Zeile 16:
return;
return;
}
}

// Defer registering the document.ready hook until after mediawiki.action.edit is loaded
mw.loader.using( 'mediawiki.action.edit', function() {


// By registering our dependency after document.ready, we make sure
// By registering our dependency after document.ready, we make sure
// that the toolbar is fully loaded before we manipulate it
// that the toolbar is fully loaded before we manipulate it
mw.loader.using( [ 'mediawiki.action.edit', 'user' ], function() { $( function() {
$( function() {


// Check that the toolbar is present on the page
// Check that the toolbar is present on the page
Zeile 28: Zeile 25:
return;
return;
}
}
mw.loader.using( ['mediawiki.action.edit', 'user'], function() {


// Define available buttons
// Define available buttons
var sig = window.usersignature || '--\~\~\~\~';
var sig = window.usersignature || '--\~\~\~\~';
var commonsUrl = "/media/wikipedia/commons/";
var commonsUrl = "/media/wikipedia/commons/";
var styleUrl = mw.config.get( 'stylepath' ) + '/common/images/';
var styleUrl = mw.config.get( 'stylepath' ) + '/common/images/';


var buttons = {
var buttons = {
'A' : [
'A' : [
commonsUrl + 'e/e9/Button_headline2.png',
commonsUrl + 'e/e9/Button_headline2.png',
'Sekundäre Überschrift',
'Sekundäre Überschrift',
'\n=== ',
'\n=== ',
' ===',
' ===',
'Sekundäre Überschrift'
'Sekundäre Überschrift'
],
],
'A3' : [
'A3' : [
commonsUrl + '/3/3a/Button_headline3.png',
commonsUrl + '/3/3a/Button_headline3.png',
'Untergeordnete Überschrift',
'Untergeordnete Überschrift',
'\n==== ',
'\n==== ',
' ====',
' ====',
'Untergeordnete Überschrift'
'Untergeordnete Überschrift'
],
],
'B' : [
'B' : [
commonsUrl + '1/13/Button_enter.png',
commonsUrl + '1/13/Button_enter.png',
'Zeilenumbruch',
'Zeilenumbruch',
'<br />',
'<br />',
'',
'',
''
''
],
],
'B1' : [
'B1' : [
commonsUrl + '6/62/Button_desambig.png',
commonsUrl + '6/62/Button_desambig.png',
'Begriffsklärungseite',
'Begriffsklärungseite',
'{{Begriffsklärung}}',
'{{Begriffsklärung}}',
'',
'',
''
''
],
],
'B2' : [
'B2' : [
commonsUrl + '5/5e/Button_disambig_small.png',
commonsUrl + '5/5e/Button_disambig_small.png',
'Dieser Artikel erläutert…',
'Dieser Artikel erläutert…',
'{{Dieser Artikel|',
'{{Dieser Artikel|',
'}}',
'}}',
'erläutert den Buchstaben X, zu anderen Bedeutungen siehe [[X (Begriffsklärung)]].'
'erläutert den Buchstaben X, zu anderen Bedeutungen siehe [[X (Begriffsklärung)]].'
],
],
'B3' : [
'B3' : [
commonsUrl + '5/5e/Button_disambig_small.png',
commonsUrl + '5/5e/Button_disambig_small.png',
'Begriffsklärungshinweis',
'Begriffsklärungshinweis',
'{{Begriffsklärungshinweis}}',
'{{Begriffsklärungshinweis}}',
'',
'',
''
''
],
],
'C' : [
'C' : [
commonsUrl + '5/5f/Button_center.png',
commonsUrl + '5/5f/Button_center.png',
'Zentriert',
'Zentriert',
'<div style="text-align: center;">\n',
'<div style="text-align: center;">\n',
'\n<\/div>',
'\n<\/div>',
'Zentriert'
'Zentriert'
],
],
'CF' : [
'CF' : [
commonsUrl + '3/37/Btn_toolbar_commentaire.png',
commonsUrl + '3/37/Btn_toolbar_commentaire.png',
'Chemische Formel',
'Chemische Formel',
':<math>\u005Cmathrm{',
':<math>\u005Cmathrm{',
'}</math>',
'}</math>',
''
''
],
],
'CO' : [
'CO' : [
commonsUrl + '6/6c/Button_commons.png',
commonsUrl + '6/6c/Button_commons.png',
'Commons',
'Commons',
'{{Commons|Category:',
'{{Commons|Category:',
'}}',
'}}',
'Seitenname'
'Seitenname'
],
],
'D' : [
'D' : [
commonsUrl + 'e/ea/Button_align_left.png',
commonsUrl + 'e/ea/Button_align_left.png',
'Left-Align',
'Left-Align',
'<div style="text-align: left; direction: ltr; margin-left: 1em;">\n',
'<div style="text-align: left; direction: ltr; margin-left: 1em;">\n',
'\n<\/div>',
'\n<\/div>',
'Left-aligned Text'
'Left-aligned Text'
],
],
'DS' : [
'DS' : [
commonsUrl + '4/4e/Button_romain.png',
commonsUrl + '4/4e/Button_romain.png',
'SORTIERUNG',
'SORTIERUNG',
'{{SORTIERUNG:',
'{{SORTIERUNG:',
'}}',
'}}',
'Sortierbegriff'
'Sortierbegriff'
],
],
'DO' : [
'DO' : [
commonsUrl + 'e/e9/Button_done.png',
commonsUrl + 'e/e9/Button_done.png',
'Erledigt (kurz)',
'Erledigt (kurz)',
'{{Erl.}}',
'{{Erl.}}',
'',
'',
''
''
],
],
'ER' : [
'ER' : [
commonsUrl + '9/9d/Button_fait.png',
commonsUrl + '9/9d/Button_fait.png',
'Erledigt (lang)',
'Erledigt (lang)',
'{{Erledigt|1=' + sig,
'{{Erledigt|1=' + sig,
'}}',
'}}',
''
''
],
],
'E' : [
'E' : [
commonsUrl + '0/04/Button_array.png',
commonsUrl + '0/04/Button_array.png',
'Tabelle',
'Tabelle',
'',
'',
'',
'',
'',
'',
'mw-editbutton-tablegenerator'
'mw-editbutton-tablegenerator'
],
],
'F' : [
'F' : [
commonsUrl + '8/8f/Button_poeme.png',
commonsUrl + '8/8f/Button_poeme.png',
'Farbiger Text',
'Farbiger Text',
'<span style="color: color">',
'<span style="color: color">',
'<\/span>',
'<\/span>',
'Farbig'
'Farbig'
],
],
'FS' : [
'FS' : [
commonsUrl + '1/1b/Button_miss_signature.png',
commonsUrl + '1/1b/Button_miss_signature.png',
'Fehlende Signatur',
'Fehlende Signatur',
'\{\{subst\:Unsigned|',
'\{\{subst\:Unsigned|',
'}}',
'}}',
'BENUTZER'
'BENUTZER'
],
],
'G' : [
'G' : [
commonsUrl + '9/9e/Btn_toolbar_gallery.png',
commonsUrl + '9/9e/Btn_toolbar_gallery.png',
'Bildergalerie',
'Bildergalerie',
'\n<gallery>\nDatei:M63.jpg|[[M63]]\nDatei:Mona Lisa.jpg|[[Mona Lisa]]\nDatei:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>',
'\n<gallery>\nDatei:M63.jpg|[[M63]]\nDatei:Mona Lisa.jpg|[[Mona Lisa]]\nDatei:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>',
'',
'',
''
''
],
],
'H' : [
'H' : [
commonsUrl + '7/74/Button_comment.png',
commonsUrl + '7/74/Button_comment.png',
'Versteckter Kommentar',
'Versteckter Kommentar',
'<!--',
'<!--',
'-->',
'-->',
'Versteckt'
'Versteckt'
],
],
'I' : [
'I' : [
commonsUrl + '4/41/Button_hr_halfwidth.png',
commonsUrl + '4/41/Button_hr_halfwidth.png',
'Gedankenstrich',
'Gedankenstrich',
'–',
'–',
'',
'',
''
''
],
],
'I1' : [
'I1' : [
commonsUrl + '6/6a/Button_sup_letter.png',
commonsUrl + '6/6a/Button_sup_letter.png',
'Hochgestellter Text (superscript)',
'Hochgestellter Text (superscript)',
'<sup>',
'<sup>',
'<\/sup>',
'<\/sup>',
'Hochgestellt'
'Hochgestellt'
],
],
'I2' : [
'I2' : [
commonsUrl + 'a/aa/Button_sub_letter.png',
commonsUrl + 'a/aa/Button_sub_letter.png',
'Tiefgestellter Text (subscript)',
'Tiefgestellter Text (subscript)',
'<sub>',
'<sub>',
'<\/sub>',
'<\/sub>',
'Tiefgestellt'
'Tiefgestellt'
],
],
'J1' : [
'J1' : [
commonsUrl + '5/58/Button_small.png',
commonsUrl + '5/58/Button_small.png',
'Kleingeschriebener Text (small)',
'Kleingeschriebener Text (small)',
'<small>',
'<small>',
'<\/small>',
'<\/small>',
'Klein'
'Klein'
],
],
'J2' : [
'J2' : [
commonsUrl + '5/56/Button_big.png',
commonsUrl + '5/56/Button_big.png',
'Größerer Text (big)',
'Größerer Text (big)',
'<big>',
'<big>',
'<\/big>',
'<\/big>',
'Groß'
'Groß'
],
],
'K' : [
'K' : [
commonsUrl + 'b/b4/Button_category03.png',
commonsUrl + 'b/b4/Button_category03.png',
'Kategorie',
'Kategorie',
'[[Kategorie:',
'[[Kategorie:',
']]',
']]',
'Name der Kategorie'
'Name der Kategorie'
],
],
'KR' : [
'KR' : [
commonsUrl + 'b/b1/Button_dagger.png',
commonsUrl + 'b/b1/Button_dagger.png',
'Kreuz',
'Kreuz',
'†',
'†',
'',
'',
''
''
],
],
'L' : [
'L' : [
commonsUrl + '8/8e/Button_shifting.png',
commonsUrl + '8/8e/Button_shifting.png',
'Setze Tab(s)',
'Setze Tab(s)',
':',
':',
'',
'',
':'
':'
],
],
'M' : [
'M' : [
commonsUrl + 'f/fd/Button_blockquote.png',
commonsUrl + 'f/fd/Button_blockquote.png',
'Markiert ein Zitat mit Absatz',
'Markiert ein Zitat mit Absatz',
'<blockquote style="border: 1px solid blue; padding: 2em;">\n',
'<blockquote style="border: 1px solid blue; padding: 2em;">\n',
'\n<\/blockquote>',
'\n<\/blockquote>',
'Text'
'Text'
],
],
'N' : [
'N' : [
commonsUrl + '4/4b/Button_nbsp.png',
commonsUrl + '4/4b/Button_nbsp.png',
'Geschütztes Leerzeichen (nonbreaking space)',
'Geschütztes Leerzeichen (nonbreaking space)',
'&nbsp;',
'&nbsp;',
'',
'',
''
''
],
],
'NT' : [
'NT' : [
commonsUrl + 'b/bf/Button_thinsp.png',
commonsUrl + 'b/bf/Button_thinsp.png',
'Schmales geschütztes Leerzeichen',
'Schmales geschütztes Leerzeichen',
'&thinsp;',
'&thinsp;',
'',
'',
''
''
],
],
'O' : [
'O' : [
commonsUrl + '2/23/Button_code.png',
commonsUrl + '2/23/Button_code.png',
'Code einfügen',
'Code einfügen',
'<code>',
'<code>',
'<\/code>',
'<\/code>',
'Code'
'Code'
],
],
'P' : [
'P' : [
commonsUrl + '3/3c/Button_pre.png',
commonsUrl + '3/3c/Button_pre.png',
'Vorformatierter Text',
'Vorformatierter Text',
'<pre>',
'<pre>',
'<\/pre>',
'<\/pre>',
'Präformatierter Text'
'Präformatierter Text'
],
],
'P1' : [
'P1' : [
commonsUrl + '9/93/Button_sub_link.png',
commonsUrl + '9/93/Button_sub_link.png',
'Link zu einem Seiten-Abschnitt',
'Link zu einem Seiten-Abschnitt',
'[[Seite#',
'[[Seite#',
']]',
']]',
'Abschnitt'
'Abschnitt'
],
],
'PF' : [
'PF' : [
commonsUrl + 'f/ff/Button_arrow_right.png',
commonsUrl + 'f/ff/Button_arrow_right.png',
'Pfeil nach rechts',
'Pfeil nach rechts',
'\u2192',
'\u2192',
'',
'',
''
''
],
],
'PD' : [
'PD' : [
commonsUrl + 'e/ee/Button_vote_biblio.png',
commonsUrl + 'e/ee/Button_vote_biblio.png',
'Personendaten',
'Personendaten',
'{{Personendaten\n|NAME=\n|ALTERNATIVNAMEN=',
'{{Personendaten\n|NAME=\n|ALTERNATIVNAMEN=',
'\n|KURZBESCHREIBUNG=\n|GEBURTSDATUM=\n|GEBURTSORT=\n|STERBEDATUM=\n|STERBEORT=\n}}',
'\n|KURZBESCHREIBUNG=\n|GEBURTSDATUM=\n|GEBURTSORT=\n|STERBEDATUM=\n|STERBEORT=\n}}',
''
''
],
],
'PO' : [
'PO' : [
commonsUrl + 'c/c7/Button_polytonique.png',
commonsUrl + 'c/c7/Button_polytonique.png',
'Unicode-Sonderzeichen der altgriechischen Schrift',
'Unicode-Sonderzeichen der altgriechischen Schrift',
'{{Polytonisch|',
'{{Polytonisch|',
'}}',
'}}',
'Text'
'Text'
],
],
'Q' : [
'Q' : [
commonsUrl + 'd/d3/Button_definition_list.png',
commonsUrl + 'd/d3/Button_definition_list.png',
'Definitionsliste',
'Definitionsliste',
'\n; ',
'\n; ',
' : ',
' : ',
'Text'
'Text'
],
],
'Q1' : [
'Q1' : [
commonsUrl + '0/05/Button_Anf%C3%BChrung.png',
commonsUrl + '0/05/Button_Anf%C3%BChrung.png',
'Anführungszeichen',
'Anführungszeichen',
'„',
'„',
'“',
'“',
'Text'
'Text'
],
],
'Q2' : [
'Q2' : [
commonsUrl + '2/26/Button_latinas.png',
commonsUrl + '2/26/Button_latinas.png',
'Latinas',
'Latinas',
'«',
'«',
'»',
'»',
'Text'
'Text'
],
],
'Q3' : [
'Q3' : [
commonsUrl + 'b/bc/Button_guillemet.png',
commonsUrl + 'b/bc/Button_guillemet.png',
'Guillemets',
'Guillemets',
'»',
'»',
'«',
'«',
'Text'
'Text'
],
],
'R' : [
'R' : [
commonsUrl + '7/79/Button_reflink.png',
commonsUrl + '7/79/Button_reflink.png',
'Markiere eine Referenz',
'Markiere eine Referenz',
'<ref>',
'<ref>',
'<\/ref>',
'<\/ref>',
'Bezugsangabe'
'Bezugsangabe'
],
],
'R1' : [
'R1' : [
commonsUrl + 'c/c4/Button_ref.png',
commonsUrl + 'c/c4/Button_ref.png',
'Referenz mit Name',
'Referenz mit Name',
'<ref name="">',
'<ref name="">',
'<\/ref>',
'<\/ref>',
'Bezugsangabe'
'Bezugsangabe'
],
],
'R2' : [
'R2' : [
commonsUrl + 'f/fe/Button_refs.png',
commonsUrl + 'f/fe/Button_refs.png',
'Wiederholungs-Referenz',
'Wiederholungs-Referenz',
'<ref name="',
'<ref name="',
'"/>',
'"/>',
'Referenzname'
'Referenzname'
],
],
'R3' : [
'R3' : [
commonsUrl + '9/9a/Button_references.png',
commonsUrl + '9/9a/Button_references.png',
'Referenz-Footer',
'Referenz-Footer',
'\n== Einzelnachweise ==\n<references />\n',
'\n== Einzelnachweise ==\n<references />\n',
'',
'',
''
''
],
],
'RD' : [
'RD' : [
commonsUrl + '7/70/Button_fusion.png',
commonsUrl + '7/70/Button_fusion.png',
'Redundanz',
'Redundanz',
'{{ers:Redundanz|',
'{{ers:Redundanz|',
'}}',
'}}',
'Artikel1|Artikel2|Artikel3…'
'Artikel1|Artikel2|Artikel3…'
],
],
'S' : [
'S' : [
commonsUrl + 'c/c9/Button_strike.png',
commonsUrl + 'c/c9/Button_strike.png',
'Durchgestrichener Text',
'Durchgestrichener Text',
'<s>',
'<s>',
'<\/s>',
'<\/s>',
'Durchgestrichen'
'Durchgestrichen'
],
],
'SA' : [
'SA' : [
commonsUrl + 'b/bb/Seealso.png',
commonsUrl + 'b/bb/Seealso.png',
'Siehe auch',
'Siehe auch',
'\n== Siehe auch ==\n',
'\n== Siehe auch ==\n',
'',
'',
''
''
],
],
'SC' : [
'SC' : [
commonsUrl + '0/02/Button_S_yellow.png',
commonsUrl + '0/02/Button_S_yellow.png',
'SourceCode hervorheben',
'SourceCode hervorheben',
'<source lang="javascript">',
'<source lang="javascript">',
'<\/source>',
'<\/source>',
'Quelltext'
'Quelltext'
],
],
'SM' : [
'SM' : [
commonsUrl + '7/74/Button_oeil.png',
commonsUrl + '7/74/Button_oeil.png',
'Smiley',
'Smiley',
'<tt style="background:#FE3">',
'<tt style="background:#FE3">',
'</tt>',
'</tt>',
':D'
':D'
],
],
'ST' : [
'ST' : [
commonsUrl + '7/72/Button_span_2.png',
commonsUrl + '7/72/Button_span_2.png',
'span-tag mit CSS-Angabe',
'span-tag mit CSS-Angabe',
'<span style="">',
'<span style="">',
'<\/span>',
'<\/span>',
'Markierter Inhalt'
'Markierter Inhalt'
],
],
'T' : [
'T' : [
commonsUrl + 'e/eb/Button_plantilla.png',
commonsUrl + 'e/eb/Button_plantilla.png',
'Vorlage',
'Vorlage',
'{{',
'{{',
'}}',
'}}',
'Vorlagenname'
'Vorlagenname'
],
],
'TL' : [
'TL' : [
commonsUrl + 'e/eb/Button_templatelink.png',
commonsUrl + 'e/eb/Button_templatelink.png',
'Vorlagenlink',
'Vorlagenlink',
'{{[[Vorlage:',
'{{[[Vorlage:',
'|]]}}',
'|]]}}',
'Vorlagenname'
'Vorlagenname'
],
],
'TT' : [
'TT' : [
commonsUrl + '3/30/Tt_icon.png',
commonsUrl + '3/30/Tt_icon.png',
'Schreibmaschinenstil',
'Schreibmaschinenstil',
'<tt>',
'<tt>',
'<\/tt>',
'<\/tt>',
'Teletyper Text'
'Teletyper Text'
],
],
'U' : [
'U' : [
commonsUrl + 'f/fd/Button_underline.png',
commonsUrl + 'f/fd/Button_underline.png',
'Unterstreichen',
'Unterstreichen',
'<u>',
'<u>',
'<\/u>',
'<\/u>',
'Unterstrichener Text'
'Unterstrichener Text'
],
],
'UR' : [
'UR' : [
commonsUrl + 'e/ec/Button_aviso.png',
commonsUrl + 'e/ec/Button_aviso.png',
'Urheberrecht ungeklärt',
'Urheberrecht ungeklärt',
'{{Urheberrecht ungeklärt}}',
'{{Urheberrecht ungeklärt}}',
'',
'',
''
''
],
],
'URV': [
'URV': [
commonsUrl + '9/9d/Button_halt.png',
commonsUrl + '9/9d/Button_halt.png',
'Urheberrechtsverletzung',
'Urheberrechtsverletzung',
'{{URV}} [',
'{{URV}} [',
'] ' + sig,
'] ' + sig,
'Url'
'Url'
],
],
'V' : [
'V' : [
commonsUrl + 'c/c8/Button_redirect.png',
commonsUrl + 'c/c8/Button_redirect.png',
'Weiterleitung (Redirect)',
'Weiterleitung (Redirect)',
'#WEITERLEITUNG [[',
'#WEITERLEITUNG [[',
']]',
']]',
'Ziel einfügen',
'Ziel einfügen',
'mw-editbutton-redirect'
'mw-editbutton-redirect'
],
],
'VP' : [
'VP' : [
commonsUrl + 'b/ba/Button_conserver.png',
commonsUrl + 'b/ba/Button_conserver.png',
'Vote *pro*',
'Vote *pro*',
'# {{pro}} ' + sig,
'# {{pro}} ' + sig,
'',
'',
''
''
],
],
'VC' : [
'VC' : [
commonsUrl + 'f/fc/Button_supp.png',
commonsUrl + 'f/fc/Button_supp.png',
'Vote *contra*',
'Vote *contra*',
'# {{contra}} ' + sig,
'# {{contra}} ' + sig,
'',
'',
''
''
],
],
'VN' : [
'VN' : [
commonsUrl + '4/4e/Button_neutre.png',
commonsUrl + '4/4e/Button_neutre.png',
'Vote *neutral*',
'Vote *neutral*',
'# {{neutral}} ' + sig,
'# {{neutral}} ' + sig,
'',
'',
''
''
],
],
'WB' : [
'WB' : [
commonsUrl + '6/61/Button_wikibooks.png',
commonsUrl + '6/61/Button_wikibooks.png',
'Wikibooks',
'Wikibooks',
'{{Wikibooks',
'{{Wikibooks',
'}}',
'}}',
'|Seitenname'
'|Seitenname'
],
],
'WS' : [
'WS' : [
commonsUrl + 'e/eb/Button_wikisource.png',
commonsUrl + 'e/eb/Button_wikisource.png',
'Wikisource',
'Wikisource',
'{{Wikisource',
'{{Wikisource',
'}}',
'}}',
'|Seitenname'
'|Seitenname'
],
],
'WT' : [
'WT' : [
commonsUrl + 'b/bf/WP-icon.png',
commonsUrl + 'b/bf/WP-icon.png',
'Wiktionary',
'Wiktionary',
'{{Wiktionary',
'{{Wiktionary',
'}}',
'}}',
'|Seitenname'
'|Seitenname'
],
],
'WV' : [
'WV' : [
commonsUrl + 'b/b5/Button_wikiversity.png',
commonsUrl + 'b/b5/Button_wikiversity.png',
'Wikiversity',
'Wikiversity',
'{{Wikiversity',
'{{Wikiversity',
'}}',
'}}',
'|Seitenname'
'|Seitenname'
],
],
'W' : [
'W' : [
commonsUrl + '8/88/Btn_toolbar_enum.png',
commonsUrl + '8/88/Btn_toolbar_enum.png',
'Nummerierung',
'Nummerierung',
'\n# Element 1\n# Element 2\n# Element 3',
'\n# Element 1\n# Element 2\n# Element 3',
'',
'',
''
''
],
],
'X' : [
'X' : [
commonsUrl + '1/11/Btn_toolbar_liste.png',
commonsUrl + '1/11/Btn_toolbar_liste.png',
'Liste',
'Liste',
'\n* Element A\n* Element B\n* Element C',
'\n* Element A\n* Element B\n* Element C',
'',
'',
''
''
],
],
'Y1' : [
'Y1' : [
commonsUrl + 'c/ce/Button_no_include.png',
commonsUrl + 'c/ce/Button_no_include.png',
'No Include',
'No Include',
'<noinclude>',
'<noinclude>',
'<\/noinclude>',
'<\/noinclude>',
'Text'
'Text'
],
],
'Y2' : [
'Y2' : [
commonsUrl + '7/79/Button_include.png',
commonsUrl + '7/79/Button_include.png',
'Include only',
'Include only',
'<includeonly>',
'<includeonly>',
'<\/includeonly>',
'<\/includeonly>',
'Text'
'Text'
],
],
'Z' : [
'Z' : [
commonsUrl + '3/35/Button_substitute.png',
commonsUrl + '3/35/Button_substitute.png',
'Ersetzen',
'Ersetzen',
'{{ers:',
'{{ers:',
'}}',
'}}',
'Vorlage'
'Vorlage'
],
],
'ZI' : [
'ZI' : [
commonsUrl + '8/83/Button_biocitas.png',
commonsUrl + '8/83/Button_biocitas.png',
'Zitat',
'Zitat',
'{{Zitat|',
'{{Zitat|',
'}}',
'}}',
'Text|Autor (optional)|Quelle (optional)'
'Text|Autor (optional)|Quelle (optional)'
],
],
'T1' : [
'T1' : [
commonsUrl + 'c/c6/Blending_blue_button_background.png',
commonsUrl + 'c/c6/Blending_blue_button_background.png',
'Spacer (no function)',
'Spacer (no function)',
'',
'',
'',
'',
''
''
],
],
'0' : [
'0' : [
styleUrl + 'de/button_bold.png',
styleUrl + 'de/button_bold.png',
'Fetter Text',
'Fetter Text',
'\'\'\'',
'\'\'\'',
'\'\'\'',
'\'\'\'',
'Fetter Text',
'Fetter Text',
'mw-editbutton-bold'
'mw-editbutton-bold'
],
],
'1' : [
'1' : [
styleUrl + 'de/button_italic.png',
styleUrl + 'de/button_italic.png',
'Kursiver Text',
'Kursiver Text',
'\'\'',
'\'\'',
'\'\'',
'\'\'',
'Kursiver Text',
'Kursiver Text',
'mw-editbutton-italic'
'mw-editbutton-italic'
],
],
'2' : [
'2' : [
styleUrl + 'button_link.png',
styleUrl + 'button_link.png',
'Interner Link',
'Interner Link',
'[[',
'[[',
']]',
']]',
'Link-Text',
'Link-Text',
'mw-editbutton-link'
'mw-editbutton-link'
],
],
'3' : [
'3' : [
styleUrl + 'button_extlink.png',
styleUrl + 'button_extlink.png',
'Externer Link (http:// beachten)',
'Externer Link (http:// beachten)',
'[',
'[',
']',
']',
'http://www.example.com Link-Text',
'http://www.example.com Link-Text',
'mw-editbutton-extlink'
'mw-editbutton-extlink'
],
],
'4' : [
'4' : [
styleUrl + 'button_headline.png',
styleUrl + 'button_headline.png',
'überschrift',
'überschrift',
'\n== ',
'\n== ',
' ==\n',
' ==\n',
'überschrift',
'überschrift',
'mw-editbutton-headline'
'mw-editbutton-headline'
],
],
'5' : [
'5' : [
styleUrl + 'button_image.png',
styleUrl + 'button_image.png',
'Dateilink',
'Dateilink',
'[[Datei:',
'[[Datei:',
']]',
']]',
'Beispiel.jpg',
'Beispiel.jpg',
'mw-editbutton-image'
'mw-editbutton-image'
],
],
'6' : [
'6' : [
styleUrl + 'button_media.png',
styleUrl + 'button_media.png',
'Mediendatei-Link',
'Mediendatei-Link',
'[[Media:',
'[[Media:',
']]',
']]',
'Beispiel.ogg',
'Beispiel.ogg',
'mw-editbutton-media'
'mw-editbutton-media'
],
],
'7' : [
'7' : [
styleUrl + 'button_math.png',
styleUrl + 'button_math.png',
'Mathematische Formel (LaTeX)',
'Mathematische Formel (LaTeX)',
'\x3cmath\x3e',
'\x3cmath\x3e',
'\x3c/math\x3e',
'\x3c/math\x3e',
'Formel hier einfügen',
'Formel hier einfügen',
'mw-editbutton-math'
'mw-editbutton-math'
],
],
'8' : [
'8' : [
styleUrl + 'button_nowiki.png',
styleUrl + 'button_nowiki.png',
'Unformatierter Text',
'Unformatierter Text',
'\x3cnowiki\x3e',
'\x3cnowiki\x3e',
'\x3c/nowiki\x3e',
'\x3c/nowiki\x3e',
'Unformatierten Text hier einfügen',
'Unformatierten Text hier einfügen',
'mw-editbutton-nowiki'
'mw-editbutton-nowiki'
],
],
'9' : [
'9' : [
styleUrl + 'button_sig.png',
styleUrl + 'button_sig.png',
'Deine Signatur mit Zeitstempel',
'Deine Signatur mit Zeitstempel',
'--\~\~\~\~',
'--\~\~\~\~',
'',
'',
'',
'',
'mw-editbutton-signature'
'mw-editbutton-signature'
],
],
'10' : [
'10' : [
styleUrl + 'button_hr.png',
styleUrl + 'button_hr.png',
'Horizontale Linie (sparsam verwenden)',
'Horizontale Linie (sparsam verwenden)',
'\n----\n',
'\n----\n',
'',
'',
'',
'',
'mw-editbutton-hr'
'mw-editbutton-hr'
]
]
};
};


// Add user defined buttons to the available buttons
// Add user defined buttons to the available buttons
if( window.myButtons ) {
if( window.myButtons ) {
$.extend( buttons, window.myButtons );
$.extend( buttons, window.myButtons );
}
}


// Add buttons to the toolbar in the specified order
// Add buttons to the toolbar in the specified order
var order = window.customEditButtons || 'A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,S,T,U,V,W,X';
var order = window.customEditButtons || 'A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,S,T,U,V,W,X';
if( order === 'all' ) {
if( order === 'all' ) {
order = [];
order = [];
for( var key in buttons ) {
for( var key in buttons ) {
if( isNaN( key ) ) {
if( isNaN( key ) ) {
order.push( key );
order.push( key );
}
}
}
} else {
order = order.split( ',' );
}
}
} else {
order = order.split( ',' );
}


for( var i = 0, l = order.length; i < l; i++ ) {
for( var i = 0, l = order.length; i < l; i++ ) {
var button = buttons[order[i]];
var button = buttons[order[i]];
if( !button ) {
if( !button ) {
throw new Error( 'Unknown button: ' + order[i] );
throw new Error( 'Unknown button: ' + order[i] );
}
mw.toolbar.addButton.apply( mw.toolbar, button );
}
}
mw.toolbar.addButton.apply( mw.toolbar, button );
}


// Remove some default buttons if requested
// Remove some default buttons if requested
if( window.rmEditButtons && mw.toolbar.$toolbar ) {
if( window.rmEditButtons && mw.toolbar.$toolbar ) {
var remove = window.rmEditButtons;
var remove = window.rmEditButtons;
if( ( remove[0] + '' ).toLowerCase() === 'all' ) {
if( ( remove[0] + '' ).toLowerCase() === 'all' ) {
remove = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
remove = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
}
remove.sort().reverse();
var $toolbarButtons = mw.toolbar.$toolbar.children();
for( var i = 0, l = remove.length; i < l; i++ ) {
$toolbarButtons.eq( remove[i] ).remove();
}
}
}
remove.sort().reverse();


var $toolbarButtons = mw.toolbar.$toolbar.children();
// Customize signature button
if( sig !== '--\~\~\~\~' ) {
for( var i = 0, l = remove.length; i < l; i++ ) {
$toolbarButtons.eq( remove[i] ).remove();
$( '#mw-editbutton-signature' ).unbind( 'click' ).click( function() {
mw.toolbar.insertTags( sig, '', '' );
return false;
} ).attr( 'src', commonsUrl + 'd/d1/Button_mysignature.png' );
}
}
}


// Customize signature button
// Add special click handlers
$( '#mw-editbutton-redirect' ).unbind( 'click' ).click( function() {
if( sig !== '--\~\~\~\~' ) {
$( '#mw-editbutton-signature' ).unbind( 'click' ).click( function() {
mw.toolbar.insertTags( sig, '', '' );
var target = window.prompt( 'Wohin soll der Redirect?', '' );
if( target ) {
return false;
} ).attr( 'src', commonsUrl + 'd/d1/Button_mysignature.png' );
var text = '#WEITERLEITUNG [[' + target + ']]';
}
$( '#wpTextbox1' ).val( text );
$( '#wpSummary' ).val( text );
$( '#wpWatchthis' ).prop( 'checked', false );
}
} );
$( '#mw-editbutton-tablegenerator' ).click( popupTable );


// Add special click handlers
// Adjust width of spacer images
$( '#mw-editbutton-redirect' ).unbind( 'click' ).click( function() {
if( mw.toolbar.$toolbar ) {
var target = window.prompt( 'Wohin soll die Weiterleitung?', '' );
mw.toolbar.$toolbar.children( 'img[src="' + buttons['T1'][0] + '"]' ).width( 6 ).unbind( 'click' );
if( target ) {
var text = '#WEITERLEITUNG [[' + target + ']]';
$( '#wpTextbox1' ).val( text );
$( '#wpSummary' ).val( text );
$( '#wpWatchthis' ).prop( 'checked', false );
}
}
} );
$( '#mw-editbutton-tablegenerator' ).click( popupTable );


// Adjust width of spacer images
//============================================================
if( mw.toolbar.$toolbar ) {
// Table generator
mw.toolbar.$toolbar.children( 'img[src="' + buttons['T1'][0] + '"]' ).width( 6 ).unbind( 'click' );
//============================================================
}
/** en: Generate an array using Mediawiki syntax

* @author: originally from fr:user:dake
//============================================================
* @version: 0.2 */
// Table generator
mw.toolbar.generateTable = function( caption, exhead, nbCol, nbRow, exfield, align ) {
//============================================================
var code = '\n';
/** en: Generate an array using Mediawiki syntax
code += '{| class="wikitable" ' + align + '\n' + caption + exhead;
* @author: originally from fr:user:dake
* @version: 0.2 */
mw.toolbar.generateTable = function( caption, exhead, nbCol, nbRow, exfield, align ) {
var code = '\n';
code += '{| class="wikitable" ' + align + '\n' + caption + exhead;
if( exfield ) {
code += '!\n';
}
for( var i = 1; i < nbCol + 1; i++ ) {
code += '! FELD ' + i + '\n';
}
var items = 0;
for( var j = 0; j < nbRow; j++ ) {
if( exfield ) {
if( exfield ) {
code += '!\n';
items++;
code += '|-\n! style="background: #FFDDDD;" | ITEM ' + items + '\n';
}
} else {
for( var i = 1; i < nbCol + 1; i++ ) {
code += '! FELD ' + i + '\n';
code += '|-\n';
}
}
var items = 0;
for( var i = 0; i < nbCol; i++ ) {
for( var j = 0; j < nbRow; j++ ) {
code += '| Element\n';
if( exfield ) {
items++;
code += '|-\n! style="background: #FFDDDD;" | ITEM ' + items + '\n';
} else {
code += '|-\n';
}
for( var i = 0; i < nbCol; i++ ) {
code += '| Element\n';
}
code += '|}\n';
}
}
mw.toolbar.insertTags( '', '', code );
code += '|}\n';
}
mw.toolbar.insertTags( '', '', code );
};
};


/** en: Open a popup with parameters to generate an array.
/** en: Open a popup with parameters to generate an array.
* The number of rows/columns can be modified.
* The number of rows/columns can be modified.
* @author: originally fr:user:dake
* @author: originally fr:user:dake
* @version: 0.2 */
* @version: 0.2 */
function popupTable() {
function popupTable() {
var popup = window.open( 'about:blank', 'WPtable', 'height=400,width=400,scrollbars=yes' );
var popup = window.open( 'about:blank', 'WPtable', 'height=400,width=400,scrollbars=yes' );
var javaCode = '<script type="text\/javascript">function insertCode(){'
var javaCode = '<script type="text\/javascript">function insertCode(){'
+'var caption = (document.paramForm.inputCaption.checked)?"\|\+ TABLE CAPTION \\n":""; '
+'var caption = (document.paramForm.inputCaption.checked)?"\|\+ TABLE CAPTION \\n":""; '
+'var exhead = (document.paramForm.inputHead.checked)?\'\|\- style=\"background: #DDFFDD;\"\\n\':""; '
+'var exhead = (document.paramForm.inputHead.checked)?\'\|\- style=\"background: #DDFFDD;\"\\n\':""; '
+'var row = parseInt(document.paramForm.inputRow.value); '
+'var row = parseInt(document.paramForm.inputRow.value); '
+'var col = parseInt(document.paramForm.inputCol.value); '
+'var col = parseInt(document.paramForm.inputCol.value); '
+'var exfield = document.paramForm.inputItems.checked; '
+'var exfield = document.paramForm.inputItems.checked; '
+'var align = (document.paramForm.inputAlign.checked)?\'align="center"\':""; '
+'var align = (document.paramForm.inputAlign.checked)?\'align="center"\':""; '
+'window.opener.mw.toolbar.generateTable(caption,exhead,col,row,exfield,align); '
+'window.opener.mw.toolbar.generateTable(caption,exhead,col,row,exfield,align); '
+'window.close()}<\/script>';
+'window.close()}<\/script>';


popup.document.write( '<html><head><title>Make table<\/title>'
popup.document.write( '<html><head><title>Make table<\/title>'
+ javaCode +'<\/head><body>'
+ javaCode +'<\/head><body>'
+'<p>Enter the table parameters below: <\/p>'
+'<p>Enter the table parameters below: <\/p>'
Zeile 747: Zeile 743:
+' &nbsp;&nbsp;&nbsp;<a href="javascript:self.close()">Cancel<\/a><\/p>'
+' &nbsp;&nbsp;&nbsp;<a href="javascript:self.close()">Cancel<\/a><\/p>'
+'<\/body><\/html>'
+'<\/body><\/html>'
);
);
popup.document.close();
popup.document.close();
return false;
return false;
}
}
} );
} ) } );
} );
} );
})();
})();

Version vom 23. August 2012, 14:29 Uhr

//============================================================
// en: ADD SOME EXTRA BUTTONS TO THE EDITPANEL [[:en:User:MarkS/Extra edit buttons]]
// de: FÜGE NEUE BUTTON IN DIE WERKZEUGLEISTE [[:de:Benutzer:Olliminatore/Extra-Editbuttons]]
//   Converted by [[User:Olliminatore]] 25.09.2006 
//   Angepasst an RL und mw.toolbar von [[User:✓]] April 2011
//============================================================
// de: Die Reihenfolge und Anzahl der Buttons ist über die (alphabetische) Variable customEditButtons wählbar.
// <nowiki>
//

(function(){

	// Return early if not on edit page
	var action = mw.config.get( 'wgAction' );
	if( action !== 'edit' && action !== 'submit' ) {
		return;
	}

	// By registering our dependency after document.ready, we make sure
	// that the toolbar is fully loaded before we manipulate it
	mw.loader.using( [ 'mediawiki.action.edit', 'user' ], function() { $( function() {

		// Check that the toolbar is present on the page
		if( !$( '#toolbar' ).length ) {
			return;
		}

		// Define available buttons
		var sig = window.usersignature || '--\~\~\~\~';
		var commonsUrl = "/media/wikipedia/commons/";
		var styleUrl = mw.config.get( 'stylepath' ) + '/common/images/';

		var buttons = {
			'A'  : [
				commonsUrl + 'e/e9/Button_headline2.png',
				'Sekundäre Überschrift',
				'\n=== ',
				' ===',
				'Sekundäre Überschrift'
			],
			'A3' : [
				commonsUrl + '/3/3a/Button_headline3.png',
				'Untergeordnete Überschrift',
				'\n==== ',
				' ====',
				'Untergeordnete Überschrift'
			],
			'B'  : [
				commonsUrl + '1/13/Button_enter.png',
				'Zeilenumbruch',
				'<br />',
				'',
				''
			],
			'B1' : [
				commonsUrl + '6/62/Button_desambig.png',
				'Begriffsklärungseite',
				'{{Begriffsklärung}}',
				'',
				''
			],
			'B2' : [
				commonsUrl + '5/5e/Button_disambig_small.png',
				'Dieser Artikel erläutert…',
				'{{Dieser Artikel|',
				'}}',
				'erläutert den Buchstaben X, zu anderen Bedeutungen siehe [[X (Begriffsklärung)]].'
			],
			'B3' : [
				commonsUrl + '5/5e/Button_disambig_small.png',
				'Begriffsklärungshinweis',
				'{{Begriffsklärungshinweis}}',
				'',
				''
			],
			'C'  : [
				commonsUrl + '5/5f/Button_center.png',
				'Zentriert',
				'<div style="text-align: center;">\n',
				'\n<\/div>',
				'Zentriert'
			],
			'CF' : [
				commonsUrl + '3/37/Btn_toolbar_commentaire.png',
				'Chemische Formel',
				':<math>\u005Cmathrm{',
				'}</math>',
				''
			],
			'CO' : [
				commonsUrl + '6/6c/Button_commons.png',
				'Commons',
				'{{Commons|Category:',
				'}}',
				'Seitenname'
			],
			'D'  : [
				commonsUrl + 'e/ea/Button_align_left.png',
				'Left-Align',
				'<div style="text-align: left; direction: ltr; margin-left: 1em;">\n',
				'\n<\/div>',
				'Left-aligned Text'
	
			],
			'DS' : [
				commonsUrl + '4/4e/Button_romain.png',
				'SORTIERUNG',
				'{{SORTIERUNG:',
				'}}',
				'Sortierbegriff'
			],
			'DO' : [
				commonsUrl + 'e/e9/Button_done.png',
				'Erledigt (kurz)',
				'{{Erl.}}',
				'',
				''
			],
			'ER' : [
				commonsUrl + '9/9d/Button_fait.png',
				'Erledigt (lang)',
				'{{Erledigt|1=' + sig,
				'}}',
				''
			],
			'E'  : [
				commonsUrl + '0/04/Button_array.png',
				'Tabelle',
				'',
				'',
				'',
				'mw-editbutton-tablegenerator'
			],
			'F'  : [
				commonsUrl + '8/8f/Button_poeme.png',
				'Farbiger Text',
				'<span style="color: color">',
				'<\/span>',
				'Farbig'
			],
			'FS' : [
				commonsUrl + '1/1b/Button_miss_signature.png',
				'Fehlende Signatur',
				'\{\{subst\:Unsigned|',
				'}}',
				'BENUTZER'
			],
			'G'  : [
				commonsUrl + '9/9e/Btn_toolbar_gallery.png',
				'Bildergalerie',
				'\n<gallery>\nDatei:M63.jpg|[[M63]]\nDatei:Mona Lisa.jpg|[[Mona Lisa]]\nDatei:Truite arc-en-ciel.jpg|Eine [[Forelle ]]\n<\/gallery>',
				'',
				''
			],
			'H'  : [
				commonsUrl + '7/74/Button_comment.png',
				'Versteckter Kommentar',
				'<!--',
				'-->',
				'Versteckt'
			],
			'I'  : [
				commonsUrl + '4/41/Button_hr_halfwidth.png',
				'Gedankenstrich',
				'–',
				'',
				''
			],
			'I1' : [
				commonsUrl + '6/6a/Button_sup_letter.png',
				'Hochgestellter Text (superscript)',
				'<sup>',
				'<\/sup>',
				'Hochgestellt'
			],
			'I2' : [
				commonsUrl + 'a/aa/Button_sub_letter.png',
				'Tiefgestellter Text (subscript)',
				'<sub>',
				'<\/sub>',
				'Tiefgestellt'
			],
			'J1' : [
				commonsUrl + '5/58/Button_small.png',
				'Kleingeschriebener Text (small)',
				'<small>',
				'<\/small>',
				'Klein'
			],
			'J2' : [
				commonsUrl + '5/56/Button_big.png',
				'Größerer Text (big)',
				'<big>',
				'<\/big>',
				'Groß'
			],
			'K'  : [
				commonsUrl + 'b/b4/Button_category03.png',
				'Kategorie',
				'[[Kategorie:',
				']]',
				'Name der Kategorie'
			],
			'KR' : [
				commonsUrl + 'b/b1/Button_dagger.png',
				'Kreuz',
				'†',
				'',
				''
			],
			'L'  : [
				commonsUrl + '8/8e/Button_shifting.png',
				'Setze Tab(s)',
				':',
				'',
				':'
			],
			'M'  : [
				commonsUrl + 'f/fd/Button_blockquote.png',
				'Markiert ein Zitat mit Absatz',
				'<blockquote style="border: 1px solid blue; padding: 2em;">\n',
				'\n<\/blockquote>',
				'Text'
			],
			'N'  : [
				commonsUrl + '4/4b/Button_nbsp.png',
				'Geschütztes Leerzeichen (nonbreaking space)',
				'&nbsp;',
				'',
				''
			],
			'NT' : [
				commonsUrl + 'b/bf/Button_thinsp.png',
				'Schmales geschütztes Leerzeichen',
				'&thinsp;',
				'',
				''
			],
			'O'  : [
				commonsUrl + '2/23/Button_code.png',
				'Code einfügen',
				'<code>',
				'<\/code>',
				'Code'
			],
			'P'  : [
				commonsUrl + '3/3c/Button_pre.png',
				'Vorformatierter Text',
				'<pre>',
				'<\/pre>',
				'Präformatierter Text'
			],
			'P1' : [
				commonsUrl + '9/93/Button_sub_link.png',
				'Link zu einem Seiten-Abschnitt',
				'[[Seite#',
				']]',
				'Abschnitt'
			],
			'PF' : [
				commonsUrl + 'f/ff/Button_arrow_right.png',
				'Pfeil nach rechts',
				'\u2192',
				'',
				''
			],
			'PD' : [
				commonsUrl + 'e/ee/Button_vote_biblio.png',
				'Personendaten',
				'{{Personendaten\n|NAME=\n|ALTERNATIVNAMEN=',
				'\n|KURZBESCHREIBUNG=\n|GEBURTSDATUM=\n|GEBURTSORT=\n|STERBEDATUM=\n|STERBEORT=\n}}',
				''
			],
			'PO' : [
				commonsUrl + 'c/c7/Button_polytonique.png',
				'Unicode-Sonderzeichen der altgriechischen Schrift',
				'{{Polytonisch|',
				'}}',
				'Text'
			],
			'Q'  : [
				commonsUrl + 'd/d3/Button_definition_list.png',
				'Definitionsliste',
				'\n; ',
				' : ',
				'Text'
			],
			'Q1' : [
				commonsUrl + '0/05/Button_Anf%C3%BChrung.png',
				'Anführungszeichen',
				'„',
				'“',
				'Text'
			],
			'Q2' : [
				commonsUrl + '2/26/Button_latinas.png',
				'Latinas',
				'«',
				'»',
				'Text'
			],
			'Q3' : [
				commonsUrl + 'b/bc/Button_guillemet.png',
				'Guillemets',
				'»',
				'«',
				'Text'
			],
			'R'  : [
				commonsUrl + '7/79/Button_reflink.png',
				'Markiere eine Referenz',
				'<ref>',
				'<\/ref>',
				'Bezugsangabe'
			],
			'R1' : [
				commonsUrl + 'c/c4/Button_ref.png',
				'Referenz mit Name',
				'<ref name="">',
				'<\/ref>',
				'Bezugsangabe'
			],
			'R2' : [
				commonsUrl + 'f/fe/Button_refs.png',
				'Wiederholungs-Referenz',
				'<ref name="',
				'"/>',
				'Referenzname'
			],
			'R3' : [
				commonsUrl + '9/9a/Button_references.png',
				'Referenz-Footer',
				'\n== Einzelnachweise ==\n<references />\n',
				'',
				''
			],
			'RD' : [
				commonsUrl + '7/70/Button_fusion.png',
				'Redundanz',
				'{{ers:Redundanz|',
				'}}',
				'Artikel1|Artikel2|Artikel3…'
			], 
			'S'  : [
				commonsUrl + 'c/c9/Button_strike.png',
				'Durchgestrichener Text',
				'<s>',
				'<\/s>',
				'Durchgestrichen'
			],
			'SA' : [
				commonsUrl + 'b/bb/Seealso.png',
				'Siehe auch',
				'\n== Siehe auch ==\n',
				'',
				''
			],
			'SC' : [
				commonsUrl + '0/02/Button_S_yellow.png',
				'SourceCode hervorheben',
				'<source lang="javascript">',
				'<\/source>',
				'Quelltext'
			], 
			'SM' : [
				commonsUrl + '7/74/Button_oeil.png',
				'Smiley',
				'<tt style="background:#FE3">',
				'</tt>',
				':D'
			],
			'ST' : [
				commonsUrl + '7/72/Button_span_2.png',
				'span-tag mit CSS-Angabe',
				'<span style="">',
				'<\/span>',
				'Markierter Inhalt'
			],
			'T'  : [
				commonsUrl + 'e/eb/Button_plantilla.png',
				'Vorlage',
				'{{',
				'}}',
				'Vorlagenname'
			],
			'TL' : [
				commonsUrl + 'e/eb/Button_templatelink.png',
				'Vorlagenlink',
				'{{[[Vorlage:',
				'|]]}}',
				'Vorlagenname'
			],
			'TT' : [
				commonsUrl + '3/30/Tt_icon.png',
				'Schreibmaschinenstil',
				'<tt>',
				'<\/tt>',
				'Teletyper Text'
			],
			'U'  : [
				commonsUrl + 'f/fd/Button_underline.png',
				'Unterstreichen',
				'<u>',
				'<\/u>',
				'Unterstrichener Text'
			],
			'UR' : [
				commonsUrl + 'e/ec/Button_aviso.png',
				'Urheberrecht ungeklärt',
				'{{Urheberrecht ungeklärt}}',
				'',
				''
			],
			'URV': [
				commonsUrl + '9/9d/Button_halt.png',
				'Urheberrechtsverletzung',
				'{{URV}} [',
				'] ' + sig,
				'Url'
			],
			'V'  : [
				commonsUrl + 'c/c8/Button_redirect.png',
				'Weiterleitung (Redirect)',
				'#WEITERLEITUNG [[',
				']]',
				'Ziel einfügen',
				'mw-editbutton-redirect'
			],
			'VP' : [
				commonsUrl + 'b/ba/Button_conserver.png',
				'Vote *pro*',
				'# {{pro}} ' + sig,
				'',
				''
			],
			'VC' : [
				commonsUrl + 'f/fc/Button_supp.png',
				'Vote *contra*',
				'# {{contra}} ' + sig,
				'',
				''
			],
			'VN' : [
				commonsUrl + '4/4e/Button_neutre.png',
				'Vote *neutral*',
				'# {{neutral}} ' + sig,
				'',
				''
			],
			'WB' : [
				commonsUrl + '6/61/Button_wikibooks.png',
				'Wikibooks',
				'{{Wikibooks',
				'}}',
				'|Seitenname'
			],
			'WS' : [
				commonsUrl + 'e/eb/Button_wikisource.png',
				'Wikisource',
				'{{Wikisource',
				'}}',
				'|Seitenname'
			],
			'WT' : [
				commonsUrl + 'b/bf/WP-icon.png',
				'Wiktionary',
				'{{Wiktionary',
				'}}',
				'|Seitenname'
			],
			'WV' : [
				commonsUrl + 'b/b5/Button_wikiversity.png',
				'Wikiversity',
				'{{Wikiversity',
				'}}',
				'|Seitenname'
			],
			'W'  : [
				commonsUrl + '8/88/Btn_toolbar_enum.png',
				'Nummerierung',
				'\n# Element 1\n# Element 2\n# Element 3',
				'',
				''
			],
			'X'  : [
				commonsUrl + '1/11/Btn_toolbar_liste.png',
				'Liste',
				'\n* Element A\n* Element B\n* Element C',
				'',
				''
			],
			'Y1' : [
				commonsUrl + 'c/ce/Button_no_include.png',
				'No Include',
				'<noinclude>',
				'<\/noinclude>',
				'Text'
			],
			'Y2' : [
				commonsUrl + '7/79/Button_include.png',
				'Include only',
				'<includeonly>',
				'<\/includeonly>',
				'Text'
			],
			'Z'  : [
				commonsUrl + '3/35/Button_substitute.png',
				'Ersetzen',
				'{{ers:',
				'}}',
				'Vorlage'
			],
			'ZI' : [
				commonsUrl + '8/83/Button_biocitas.png',
				'Zitat',
				'{{Zitat|',
				'}}',
				'Text|Autor (optional)|Quelle (optional)'
			],
			'T1' : [
				commonsUrl + 'c/c6/Blending_blue_button_background.png',
				'Spacer (no function)',
				'',
				'',
				''
			],
			'0'  : [
				styleUrl + 'de/button_bold.png',
				'Fetter Text',
				'\'\'\'',
				'\'\'\'',
				'Fetter Text',
				'mw-editbutton-bold'
			],
			'1'  : [
				styleUrl + 'de/button_italic.png',
				'Kursiver Text',
				'\'\'',
				'\'\'',
				'Kursiver Text',
				'mw-editbutton-italic'
			],
			'2'  : [
				styleUrl + 'button_link.png',
				'Interner Link',
				'[[',
				']]',
				'Link-Text',
				'mw-editbutton-link'
			],
			'3'  : [
				styleUrl + 'button_extlink.png',
				'Externer Link (http:// beachten)',
				'[',
				']',
				'http://www.example.com Link-Text',
				'mw-editbutton-extlink'
			],
			'4'  : [
				styleUrl + 'button_headline.png',
				'überschrift',
				'\n== ',
				' ==\n',
				'überschrift',
				'mw-editbutton-headline'
			],
			'5'  : [
				styleUrl + 'button_image.png',
				'Dateilink',
				'[[Datei:',
				']]',
				'Beispiel.jpg',
				'mw-editbutton-image'
			],
			'6'  : [
				styleUrl + 'button_media.png',
				'Mediendatei-Link',
				'[[Media:',
				']]',
				'Beispiel.ogg',
				'mw-editbutton-media'
			],
			'7'  : [
				styleUrl + 'button_math.png',
				'Mathematische Formel (LaTeX)',
				'\x3cmath\x3e',
				'\x3c/math\x3e',
				'Formel hier einfügen',
				'mw-editbutton-math'
			],
			'8'  : [
				styleUrl + 'button_nowiki.png',
				'Unformatierter Text',
				'\x3cnowiki\x3e',
				'\x3c/nowiki\x3e',
				'Unformatierten Text hier einfügen',
				'mw-editbutton-nowiki'
			],
			'9'  : [
				styleUrl + 'button_sig.png',
				'Deine Signatur mit Zeitstempel',
				'--\~\~\~\~',
				'',
				'',
				'mw-editbutton-signature'
			],
			'10' : [
				styleUrl + 'button_hr.png',
				'Horizontale Linie (sparsam verwenden)',
				'\n----\n',
				'',
				'',
				'mw-editbutton-hr'
			]
		};

		// Add user defined buttons to the available buttons
		if( window.myButtons ) {
			$.extend( buttons, window.myButtons );
		}

		// Add buttons to the toolbar in the specified order
		var order = window.customEditButtons || 'A,A3,B,E,F,G,H,I1,I2,J1,K,M,Q,R,R1,R2,R3,S,T,U,V,W,X';
		if( order === 'all' ) {
			order = [];
			for( var key in buttons ) {
				if( isNaN( key ) ) {
					order.push( key );
				}
			}
		} else {
			order = order.split( ',' );
		}

		for( var i = 0, l = order.length; i < l; i++ ) {
			var button = buttons[order[i]];
			if( !button ) {
				throw new Error( 'Unknown button: ' + order[i] );
			}
			mw.toolbar.addButton.apply( mw.toolbar, button );
		}

		// Remove some default buttons if requested
		if( window.rmEditButtons && mw.toolbar.$toolbar ) {
			var remove = window.rmEditButtons;
			if( ( remove[0] + '' ).toLowerCase() === 'all' ) {
				remove = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
			}
			remove.sort().reverse();

			var $toolbarButtons = mw.toolbar.$toolbar.children();
			for( var i = 0, l = remove.length; i < l; i++ ) {
				$toolbarButtons.eq( remove[i] ).remove();
			}
		}

		// Customize signature button
		if( sig !== '--\~\~\~\~' ) {
			$( '#mw-editbutton-signature' ).unbind( 'click' ).click( function() {
				mw.toolbar.insertTags( sig, '', '' );
				return false;
			} ).attr( 'src', commonsUrl + 'd/d1/Button_mysignature.png' );
		}

		// Add special click handlers
		$( '#mw-editbutton-redirect' ).unbind( 'click' ).click( function() {
			var target = window.prompt( 'Wohin soll die Weiterleitung?', '' );
			if( target ) {
				var text = '#WEITERLEITUNG [[' + target + ']]';
				$( '#wpTextbox1' ).val( text );
				$( '#wpSummary' ).val( text );
				$( '#wpWatchthis' ).prop( 'checked', false );
			}
		} );			
		$( '#mw-editbutton-tablegenerator' ).click( popupTable );

		// Adjust width of spacer images
		if( mw.toolbar.$toolbar ) {
			mw.toolbar.$toolbar.children( 'img[src="' + buttons['T1'][0] + '"]' ).width( 6 ).unbind( 'click' );
		}

		//============================================================
		// Table generator 
		//============================================================
		/** en: Generate an array using Mediawiki syntax
		 * @author: originally from fr:user:dake
		 * @version: 0.2 */
		mw.toolbar.generateTable = function( caption, exhead, nbCol, nbRow, exfield, align ) {
			var code = '\n';
			code += '{| class="wikitable" ' + align + '\n' + caption + exhead;
			if( exfield ) {
				code += '!\n';
			}
			for( var i = 1; i < nbCol + 1; i++ ) {
				code += '! FELD ' + i + '\n';
			}
			var items = 0;
			for( var j = 0; j < nbRow; j++ ) {
				if( exfield ) {
					items++;
					code += '|-\n! style="background: #FFDDDD;" | ITEM ' + items + '\n';
				} else {
					code += '|-\n';
				}
				for( var i = 0; i < nbCol; i++ ) {
					code += '| Element\n';
				}
				code += '|}\n';
			}
			mw.toolbar.insertTags( '', '', code );
		};

		/** en: Open a popup with parameters to generate an array. 
		 * The number of rows/columns can be modified.
		 * @author: originally fr:user:dake 
		 * @version: 0.2 */
		function popupTable() {
			var popup = window.open( 'about:blank', 'WPtable', 'height=400,width=400,scrollbars=yes' );
			var javaCode = '<script type="text\/javascript">function insertCode(){'
				+'var caption = (document.paramForm.inputCaption.checked)?"\|\+ TABLE CAPTION \\n":""; '
				+'var exhead = (document.paramForm.inputHead.checked)?\'\|\- style=\"background: #DDFFDD;\"\\n\':""; '
				+'var row = parseInt(document.paramForm.inputRow.value); '
				+'var col = parseInt(document.paramForm.inputCol.value); '
				+'var exfield = document.paramForm.inputItems.checked; '
				+'var align = (document.paramForm.inputAlign.checked)?\'align="center"\':""; '
				+'window.opener.mw.toolbar.generateTable(caption,exhead,col,row,exfield,align); '
				+'window.close()}<\/script>';

			popup.document.write( '<html><head><title>Make table<\/title>'
					+ javaCode +'<\/head><body>'
					+'<p>Enter the table parameters below: <\/p>'
					+'<form name="paramForm">'
					+'Table caption: <input type="checkbox" name="inputCaption"><p\/>'
					+'Table alignment: center<input type="checkbox" name="inputAlign"><p\/>'
					+'Table headline: colored<input type="checkbox" name="inputHead"><p\/>'
					+'Number of rows: <input type="text" name="inputRow" value="3" size="2"><p\/>'
					+'Number of columns: <input type="text" name="inputCol" value="3" size="2"><p\/>'
					+'Item column: <input type="checkbox" name="inputItems" ><p\/>'
					+'<\/form">'
					+'<i>The default table allows for fields and values only.<\/i><p\/>'
					+'Check "Item column" to allow for the table to have fields, items, and values.<\/i><p\/>'
					+'<p><a href="javascript:insertCode()"> Insert table into window<\/a> &nbsp;&nbsp;&nbsp; |'
					+' &nbsp;&nbsp;&nbsp;<a href="javascript:self.close()">Cancel<\/a><\/p>'
					+'<\/body><\/html>'
			);
			popup.document.close();
			return false;
		}
	} ) } );
})();