MediaWiki:Common.js
Aus Claudio's Wiki
Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen sehen zu können.
- Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
- Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
- Internet Explorer: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
- Opera: Extras → Internetspuren löschen … → Individuelle Auswahl → Den kompletten Cache löschen
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */ //<source lang="JavaScript"> /** Extra toolbar options ****************************************************** * * Description: UNDOCUMENTED * Maintainers: [[User:MarkS]]?, [[User:Voice of All]], [[User:R. Koot]] */ // [[:de:MediaWiki:Gadget-Extra-Editbuttons.js]] – diese Zeile bitte mitkopieren document.write('<script type="text/javascript" src="http://de.wikipedia.org/w/index.php?title=' + 'MediaWiki:Gadget-Extra-Editbuttons.js&action=raw&ctype=text/javascript&dontcountme=s"><\/script>'); // Anzahl und Reihenfolge wählbar (siehe: [[Wikipedia:Helferlein/Extra-Editbuttons#Die Buttons]]) var customEditButtons = "B,C,D,E,F,H,I,I1,I2,J1,J2,L,M,N,O,P,P1,Q,Q1,Q2,Q3,R,R1,R2,S,SC,TT,U,W,X"; // zu entfernende Standard-Edit buttons (0...10) var rmEditButtons = [6,7,10]; // Standardbutton entfernen /* Benutzerdefinierte Buttons * * Es ist ebenfalls möglich, vollkommen eigene benutzerdefinierte Extrabuttons, über einen Parameter hinzuzufügen. * Um dies zu tun, musst du den Parameter myButtons (ebenfalls in deiner monobook.js) im folgenden Format definieren: * var myButtons={'code1':['url1','Tooltip1','Before1','After1','Text1'], * 'code2':['url2','Tooltip2','Before2','After2','Text2']}; * * Bedeutung: * Code ist eine interne Bezeichnung für den Button. Diese Bezeichnung muss auch in der Variable XEBOrder eingefügt werden, * damit der Button auch in der Werkzeugleiste erscheint. Man kann jeden beliebigen Namen als Bezeichnung verwenden. * Um Namenskonflikte mit bestehenden und künftigen beeits definierten Buttons zu vermeiden, sollte man den Namen aber * mit einem _ anfangen. URL ist die URL des Buttonbildes. Die URL des Bildes, nicht die Bildbeschreibungsseite, muss * hierzu angegeben werden, also bspw.: http://upload.wikimedia.org/wikipedia/commons/f/f0/Bouton_Vandale0.png statt * http://commons.wikimedia.org/wiki/Image:Bouton_Vandale0.png * ToolTip ist der Hinweis, der erscheint, wenn man die Maus über den Button bewegt. * Before ist der Text, welcher vor der aktuellen Cursorposition eingefügt wird, wenn man auf den Button klickt. * After ist der Text, welcher nach der aktuellen Cursorposition eingefügt wird, wenn man auf den Button klickt. * Text ist der Text, welcher in die Mitte der beiden obigen Textstücke gesetzt wird, wenn man auf den Button klickt. * Falls man im Eingabefeld Text ausgewählt hat, so werden beim Klicken auf den Button die beiden obigen Textstücke vor * und hinter diesen ausgewählten Text eingefügt. */ // Old-Style: if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT [[", "tagClose": "]]", "sampleText": "Insert text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_strike.png", "speedTip": "Strike", "tagOpen": "<s>", "tagClose": "</s>", "sampleText": "Strike-through text"}; /* mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_enter.png", "speedTip": "Line break", "tagOpen": "<br />", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_sup_letter.png", "speedTip": "Superscript", "tagOpen": "<sup>", "tagClose": "</sup>", "sampleText": "Superscript text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_sub_letter.png", "speedTip": "Subscript", "tagOpen": "<sub>", "tagClose": "</sub>", "sampleText": "Subscript text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_small_text.png", "speedTip": "Small", "tagOpen": "<small>", "tagClose": "</small>", "sampleText": "Small Text"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_hide_comment.png", "speedTip": "Insert hidden Comment", "tagOpen": "<!-- ", "tagClose": " -->", "sampleText": "Comment"}; */ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_gallery.png", "speedTip": "Insert a picture gallery", "tagOpen": "\n<gallery>\n", "tagClose": "\n</gallery>", "sampleText": "Image:Example.jpg|Caption1\nImage:Example.jpg|Caption2"}; /* mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_blockquote.png", "speedTip": "Insert block of quoted text", "tagOpen": "<blockquote>\n", "tagClose": "\n</blockquote>", "sampleText": "Block quote"}; */ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_insert_table.png", "speedTip": "Insert a table", "tagOpen": '{| class="wikitable" border="1"\n', "tagClose": "\n|}", "sampleText": "|-\n! header 1 !! header 2 !! header 3 |-\n| row 1, cell 1 || row 1, cell 2 || row 1, cell 3 \n|-\n| row 2, cell 1 || row 2, cell 2 || row 2, cell 3"}; /* mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_reflink.png", "speedTip": "Insert a reference", "tagOpen": "<ref>", "tagClose": "</ref>", "sampleText": "Insert footnote text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Tt_icon.png", "speedTip": "Courier Font", "tagOpen": "<tt>", "tagClose": "</tt>", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_underline.png", "speedTip": "Unterstreichen", "tagOpen": "<u>", "tagClose": "</u>", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_pre.png", "speedTip": "Unformatierter Text in Courier (auch Whitespaces und Umbrueche werden beibehalten)", "tagOpen": "<pre>", "tagClose": "</pre>", "sampleText": "Insert text here"}; */ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_head_A1.png", "speedTip": "Ueberschrift 1", "tagOpen": "=", "tagClose": "=", "sampleText": "Ueberschrift 1"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_head_A2.png", "speedTip": "Ueberschrift 2", "tagOpen": "==", "tagClose": "==", "sampleText": "Ueberschrift 2"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_head_A3.png", "speedTip": "Ueberschrift 3", "tagOpen": "===", "tagClose": "===", "sampleText": "Ueberschrift 3"}; /* mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Btn_toolbar_liste.png", "speedTip": "Unnummerierte Liste", "tagOpen": "* \n** \n*** ", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Btn_toolbar_enum.png", "speedTip": "Nummerierte Liste", "tagOpen": "# \n## \n### ", "tagClose": "", "sampleText": ""}; */ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/TableStart.png", "speedTip": "Table start", "tagOpen": "{|", "tagClose": "\n", "sampleText": ' class="wikitable" border="1"\n'}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/TableStart.png", "speedTip": "Table Haeder (bold)", "tagOpen": "{|", "tagClose": "", "sampleText": ' class="wikitable" border="1"\n'}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_insert_table.png", "speedTip": "Insert a table (Top and left bold, inkl. tableheader)", "tagOpen": '{| class="wikitable" align="left" bgcolor="#000000" border="1" width="50%" cellpadding="2" cellspacing="2"\n', "tagClose": "\n|}", "sampleText": '|+Tableheader\n|-\n! header 1 !! header 2 !! header 3 \n|- align="right" backgroundcolor="#101010" valign="top"\n! row 1, cell 1 || row 1, cell 2 || row 1, cell 3 \n|-\n! row 2, cell 1 || row 2, cell 2 || row 2, cell 3'}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/TableCell.png", "speedTip": "Table cell separator", "tagOpen": "|| ", "tagClose": " ", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/TableRow.png", "speedTip": "Table new row", "tagOpen": "|-", "tagClose": "", "sampleText": ' align="right" backgroundcolor="#101010" valign="top"\n'}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/TableEnd.png", "speedTip": "Table end", "tagOpen": "", "tagClose": "\n|}\n", "sampleText": ""}; /* mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_align_left.png", "speedTip": "Align left", "tagOpen": '<align="left">', "tagClose": "</align>", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_center.png", "speedTip": "Align center", "tagOpen": '<align="center">', "tagClose": "</align>", "sampleText": "Insert text here"}; */ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_align_right.png", "speedTip": "Align right", "tagOpen": '<align="right">', "tagClose": "</align>", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_Link_DifferentName.png", "speedTip": "Interner Link mit Beschriftung und opt. Sektionstitel", "tagOpen": "[[", "tagClose": "]]", "sampleText": "Seitentitel#Sektionstitel|Beschreibung"}; // empty Buttons: mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "skins/common/images/custom_buttons/Button_base.png", "speedTip": "Not yet implemented", "tagOpen": "", "tagClose": "", "sampleText": "Insert text here"}; }