MediaWiki:Common.js

From wiki_ttni_en
Revision as of 10:47, 30 November 2012 by WikiSysop (talk | contribs)
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Das folgende JavaScript wird für alle Benutzer geladen. */

/**
 * Füge eigene Buttons zur Symbolleiste hinzu
 *
 * @source: http://www.mediawiki.org/wiki/Snippets/Custom_buttons_in_the_toolbar
 * @rev: 1
 */

jQuery( document ).ready( function( $ ) {
        if ( $.isArray( window.mwCustomEditButtons ) ) {

 // Neuen Button zum Einfügen einer Wikitabelle hinzufügen
 mwCustomEditButtons[mwCustomEditButtons.length] = {
  'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/0/04/Button_array.png',
  'speedTip': 'Wikitabelle einfügen',
  'tagOpen': '{| class="wikitable"\n|-\n',
  'tagClose': "\n|}",
  'sampleText': "! Kopfzeile 1\n! Kopfzeile 2\n! Kopfzeile 3\n|-\n| Kopfzeile 1, Spalte 1\n| Zeile 1, Spalte 2\n| Zeile 1, Spalte 3\n|-\n| Zeile 2, Spalte 1\n| Zeile 2, Spalte 2\n| Zeile 2, Spalte 3"
 };

}
} );