Benutzer:Jonathan.Steinbuch/monobook.js

Aus Wikiversity

Hinweis: Leere nach dem Veröffentlichen 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/Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Strg+F5
//Version 0.79 - Aufgeräumt
//Version 0.78 - Button für Aufgabe- und Beispiellink
//Version 0.77 - Kommentar- Button
//Version 0.76 - Element- Button
//Version 0.75 - Änderung 2.11.2018 Bezug auf https://www.mediawiki.org/wiki/Contributors/Projects/Removal_of_the_2006_wikitext_editor
//Version 0.74 - Kürzungen
//Version 0.73 - Tabellenvorlage
//Version 0.72 - Zeigeanweisungen entfernt
//Version 0.71 - Buttons für Aufzählungen
//Version 0.71 - Klausurbutton
//Version 0.70 - Korrekturen an Buttons
//Version 0.69 - Ergänzungen zu Definitionsabfrage
//Version 0.68 - Funktionale Korrektur, Dank an Jonathan Steinbuch
//Version 0.67 - Textkategorie Diagramme
//Version 0.66 - Referenznummer für Beispiel, Bemerkung; mathematische Gesamtklammer
//Version 0.65 - Sieheparameter bei MDLUL
//Version 0.64 - Nummerparameter für Faktlink
//Version 0.63 - Latexoperator durch syntaktischen Operator ersetzt
//Version 0.62 - Bedingter Button für Artikeleintrag
//Version 0.61 - Anfangsbuchstaben bei MSW
//Version 0.60 - MDLUL ersetzt Mastalink
//Version 0.59 - Beweisaufgabe wie Aufgabe
//Version 0.58 - Bedingter Button für Kontrollseite
//Version 0.57 - Genauere Buttons für mathematische Texte
//Version 0.56 - Bedingter Button für Referenznummer
//Version 0.55 - Kategorienamen bei Texttyp automatisch eingefügt
//Version 0.54 - Dateiname bei "MSW" automatisch eingefügt
//Version 0.53 - Dateiname bei "Latexdeklaration" automatisch eingefügt
//Version 0.52 - Bedingte Kategorisierungen
//Version 0.51 - Bedingter Button für mathematisches Stichwort
//Version 0.50 - Weitere bedingte Buttons für Beweisstrukturen
//Version 0.49 - Button für mathematische Bedingung und mathematische Liste; bedingter Button für Stichwortumleitung
//Version 0.48 - Stärkere Strukturierung, Erweiterung bei Vorlagenbutton
//Version 0.47 - Stichwortbutton und bedingter Definitionswort-Button statt Betonung
//Version 0.46 - Operatorvorlage
//Version 0.45 - Testphase für semantische Tafeldarstellung nach unter abgetrennt
//Version 0.44 - Bedingter Button für Widerspruchsbeweis
//Version 0.43 - Bedingter Button für Induktionsbeweis
//Version 0.42 - Button für mathematische Vorlage im Display
//Version 0.41 - Button für Strukturvorlage
//Version 0.40 - Bedingter Button für Fallunterscheidung
//Version 0.39 - Bedingter Button für Zuweisung, für Definition (Testphase)
//Version 0.38 - Bedingter Button für Zwischenbehauptung
//Version 0.37 - Bedingter Button für Latexmakros
//Version 0.36 - Andere Buttons, Ausrichtung entfernt (durch Vergleichskette ersetzt), Einrückung entfernt, Operatorname nach links, Bild leicht nach rechts
//Version 0.35 - Bedingter Button für Vorlagengestaltung
//Version 0.34 - Button für Situationsbeschreibung
//Version 0.33 - Aufgabenstrukuren unter Aufgabenbedingung (man/Sie)
//Version 0.32 - Mathkon in Mathkor umbenannt und umgestaltet (für korrespondierende Terme)
//Version 0.31 - Bedingter Button für Bucheintrag
//Version 0.30 - Button für häufige Abbildungsstruktur
//Version 0.29 - Button für Vergleichskette (semantischer)
//Version 0.28 - Button für Mathkon
//Version 0.27 - Bedingter Button für Latexseite
//Version 0.26 - Button für Vortragseintrag unter der Bedingung /Themen und /Vorträge
//Version 0.25 - Bildbutton ergänzt um Dokumentationsmöglichkeit für Lizenz
//Version 0.24 - Button für Klammerzusätze. Textart und Objektkategorie-Zeile im mathematischen Text.
//Version 0.23 - Vorlagebutton und Parameterbutton eingeführt, Änderungen an D-Link und F-Link, Kategorisierungshilfe.
//Version 0.22 - "Faktstruktur" eingeführt.
//Version 0.21 - "math", "mathdisplay" und "inputbild" angepasst.
//Version 0.20 - "D-Link", "F-Link" eingeführt.
//Version 0.19 - "MathDisplay", "Aufzählung": zeilenweise Aufteilung der Elemente eingeführt.
//Version 0.18 - "Latex-Operatorname", "Bemerkung" ergänzt, Reihenfolge angepasst.
//Version 0.17 - "Beispiel" und "Aufgabe" ergänzt
//Version 0.16 - "Definition" und "Fakt" ergänzt
//Version 0.15 - "Mathdisplay" ergänzt, Reihenfolge verändert
//Version 0.1
//(c) 2008 by Exxu
//Released under GPL or CC-by-SA 2.5 (http://creativecommons.org/licenses/by-sa/2.5/deed.de)
//at your choice
//******************************************************************************************
// Add some more custom edit buttons to the toolbar if working in edit modus
// It inserts templates coming from [[Projekt:Semantische Vorlagen]]
//******************************************************************************************
// relies on [//de.wikiversity.org/w/skins/common/edit.js]
//******************************************************************************************
// Ergänzt die Editiersymbolleiste um eine Reihe spezifischer Schaltflächen im
// "Bearbeiten"-Modus.
// Die Schaltflächen entstanden im Ergebnis des [[Projekt:Semantische Vorlagen]].
//******************************************************************************************
// Benötigt: [//de.wikiversity.org/w/skins/common/edit.js]
















/**
 * Interface for the classic edit toolbar.
 *
 * Adapted from MediaWiki Core, before it was removed from it on 2018-10-17
 */
( function () {
	var toolbar, isReady, $toolbar, queue, slice, $currentFocused;

	/**
	 * Internal helper that does the actual insertion of the button into the toolbar.
	 *
	 * For backwards-compatibility, passing `imageFile`, `speedTip`, `tagOpen`, `tagClose`,
	 * `sampleText` and `imageId` as separate arguments (in this order) is also supported.
	 *
	 * @private
	 *
	 * @param {Object} button Object with the following properties.
	 *  You are required to provide *either* the `onClick` parameter, or the three parameters
	 *  `tagOpen`, `tagClose` and `sampleText`, but not both (they're mutually exclusive).
	 * @param {string} [button.imageFile] Image to use for the button.
	 * @param {string} button.speedTip Tooltip displayed when user mouses over the button.
	 * @param {Function} [button.onClick] Function to be executed when the button is clicked.
	 * @param {string} [button.tagOpen]
	 * @param {string} [button.tagClose]
	 * @param {string} [button.sampleText] Alternative to `onClick`. `tagOpen`, `tagClose` and
	 *  `sampleText` together provide the markup that should be inserted into page text at
	 *  current cursor position.
	 * @param {string} [button.imageId] `id` attribute of the button HTML element. Can be
	 *  used to define the image with CSS if it's not provided as `imageFile`.
	 * @param {string} [speedTip]
	 * @param {string} [tagOpen]
	 * @param {string} [tagClose]
	 * @param {string} [sampleText]
	 * @param {string} [imageId]
	 */
	function insertButton( button, speedTip, tagOpen, tagClose, sampleText, imageId ) {
		var $button;

		// Backwards compatibility
		if ( typeof button !== 'object' ) {
			button = {
				imageFile: button,
				speedTip: speedTip,
				tagOpen: tagOpen,
				tagClose: tagClose,
				sampleText: sampleText,
				imageId: imageId
			};
		}

		if ( button.imageFile ) {
			$button = $( '<img>' ).attr( {
				src: button.imageFile,
				alt: button.speedTip,
				title: button.speedTip,
				id: button.imageId || undefined,
				'class': 'mw-toolbar-editbutton'
			} );
		} else {
			$button = $( '<div>' ).attr( {
				title: button.speedTip,
				id: button.imageId || undefined,
				'class': 'mw-toolbar-editbutton'
			} );
		}

		$button.click( function ( e ) {
			if ( button.onClick !== undefined ) {
				button.onClick( e );
			} else {
				toolbar.insertTags( button.tagOpen, button.tagClose, button.sampleText );
			}

			return false;
		} );

		$toolbar.append( $button );
	}

	isReady = false;
	$toolbar = false;

	/**
	 * @private
	 * @property {Array}
	 * Contains button objects (and for backwards compatibility, it can
	 * also contains an arguments array for insertButton).
	 */
	queue = [];
	slice = queue.slice;

	toolbar = {

		/**
		 * Add buttons to the toolbar.
		 *
		 * Takes care of race conditions and time-based dependencies by placing buttons in a queue if
		 * this method is called before the toolbar is created.
		 *
		 * For backwards-compatibility, passing `imageFile`, `speedTip`, `tagOpen`, `tagClose`,
		 * `sampleText` and `imageId` as separate arguments (in this order) is also supported.
		 *
		 * @inheritdoc #insertButton
		 */
		addButton: function () {
			if ( isReady ) {
				insertButton.apply( toolbar, arguments );
			} else {
				// Convert arguments list to array
				queue.push( slice.call( arguments ) );
			}
		},

		/**
		 * Add multiple buttons to the toolbar (see also #addButton).
		 *
		 * Example usage:
		 *
		 *     addButtons( [ { .. }, { .. }, { .. } ] );
		 *     addButtons( { .. }, { .. } );
		 *
		 * @param {...Object|Array} [buttons] An array of button objects or the first
		 *  button object in a list of variadic arguments.
		 */
		addButtons: function ( buttons ) {
			if ( !Array.isArray( buttons ) ) {
				buttons = slice.call( arguments );
			}
			if ( isReady ) {
				buttons.forEach( function ( button ) {
					insertButton( button );
				} );
			} else {
				// Push each button into the queue
				queue.push.apply( queue, buttons );
			}
		},

		/**
		 * Apply tagOpen/tagClose to selection in currently focused textarea.
		 *
		 * Uses `sampleText` if selection is empty.
		 *
		 * @param {string} tagOpen
		 * @param {string} tagClose
		 * @param {string} sampleText
		 */
		insertTags: function ( tagOpen, tagClose, sampleText ) {
			if ( $currentFocused && $currentFocused.length ) {
				$currentFocused.textSelection(
					'encapsulateSelection', {
						pre: tagOpen,
						peri: sampleText,
						post: tagClose
					}
				);
			}
		}
	};

	// For backwards compatibility. Used to be called from EditPage.php, maybe other places as well.
	toolbar.init = $.noop;

	// Expose API publicly
	mw.toolbar = toolbar;

	$( function () {
		var $textBox, i, button;

		// Used to determine where to insert tags
		$currentFocused = $( '#wpTextbox1' );

		// Populate the selector cache for $toolbar
		$toolbar = $( '#toolbar' );

		if ( $toolbar.length === 0 ) {
			$textBox = $( '#wpTextbox1' );
			if ( $textBox.length === 0 ) {
				return;
			}
			$toolbar = $( '<div>' ).attr( { id: 'toolbar' } );
			$toolbar.insertBefore( $textBox );
		}

		for ( i = 0; i < queue.length; i++ ) {
			button = queue[ i ];
			if ( Array.isArray( button ) ) {
				// Forwarded arguments array from mw.toolbar.addButton
				insertButton.apply( toolbar, button );
			} else {
				// Raw object from mw.toolbar.addButtons
				insertButton( button );
			}
		}

		// Clear queue
		queue.length = 0;

		// This causes further calls to addButton to go to insertion directly
		// instead of to the queue.
		// It is important that this is after the one and only loop through
		// the queue
		isReady = true;

		// Apply to dynamically created textboxes as well as normal ones
		$( document ).on( 'focus', 'textarea, input:text', function () {
			$currentFocused = $( this );
		} );
	} );

}() );












mw.loader.using( 'ext.gadget.mediawiki.toolbar', function () {
  mw.toolbar.addButton( {
    imageFile: '//upload.wikimedia.org/wikipedia/commons/f/fe/New_icon_shiny_badge.svg',
    speedTip: 'Souhaiter la bienvenue aux nouveaux',
    tagOpen: '{{Bienvenue nouveau|Trizek|sign\=~'+'~'+'~'+'~|message\=}}',
    tagClose: '',
    sampleText: '',
    imageId: 'mw-editbutton-bienvenutageproto'
  } );
} );





















window.currentFocused = undefined;


// this function adds a toolbar button via mw.toolbar
window.addButton = function( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId ) {
  // Don't generate buttons for browsers which don't fully
  // support it.
  mw.toolbar.addButton({
    'imageId': imageId,
    'imageFile': imageFile,
    'speedTip': speedTip,
    'tagOpen': tagOpen,
    'tagClose': tagClose,
    'sampleText': sampleText
  });
};


// @deprecated
window.mwInsertEditButton = function( parent, item ) {
  var image = document.createElement( 'img' );
  image.width = 23;
  image.height = 22;
  image.className = 'mw-toolbar-editbutton';
  if ( item.imageId ) {
    image.id = item.imageId;
  }
  image.src = item.imageFile;
  image.border = 0;
  image.alt = item.speedTip;
  image.title = item.speedTip;
  image.style.cursor = 'pointer';
  image.onclick = function() {
    insertTags( item.tagOpen, item.tagClose, item.sampleText );
    // click tracking
    if ( ( typeof $ != 'undefined' )  && ( typeof $.trackAction != 'undefined' ) ) {
      $.trackAction( 'oldedit.' + item.speedTip.replace(/ /g, "-") );
    }
    return false;
  };


  parent.appendChild( image );
  return true;
};


// this function generates the actual toolbar buttons with localized text
// we use it to avoid creating the toolbar where javascript is not enabled
window.mwSetupToolbar = function() {
  var toolbar = document.getElementById( 'toolbar' );
  if ( !toolbar ) {
    return false;
  }


  // Don't generate buttons for browsers which don't fully
  // support it.
  // but don't assume wpTextbox1 is always here
  var textboxes = document.getElementsByTagName( 'textarea' );
  if ( !textboxes.length ) {
    // No toolbar if we can't find any textarea
    return false;
  }
  // Only check for selection capability if the textarea is visible - errors will occur otherwise - just because
  // the textarea is not visible, doesn't mean we shouldn't build out the toolbar though - it might have been replaced
  // with some other kind of control
  if ( textboxes[0].style.display != 'none' ) {
    if ( !( document.selection && document.selection.createRange )
      && textboxes[0].selectionStart === null ) {
      return false;
    }
  }
  return true;
};


// apply tagOpen/tagClose to selection in textarea,
// use sampleText instead of selection if there is none
window.insertTags = function( tagOpen, tagClose, sampleText ) {
  if ( typeof $ != 'undefined' && typeof $.fn.textSelection != 'undefined' && currentFocused &&
      ( currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) {
    $( '#wpTextbox1' ).textSelection(
      'encapsulateSelection', { 'pre': tagOpen, 'peri': sampleText, 'post': tagClose }
    );
    return;
  }
  var txtarea;
  if ( document.editform ) {
    txtarea = currentFocused;
  } else {
    // some alternate form? take the first one we can find
    var areas = document.getElementsByTagName( 'textarea' );
    txtarea = areas[0];
  }
  var selText, isSample = false;


  if ( document.selection  && document.selection.createRange ) { // IE/Opera
    // save window scroll position
    if ( document.documentElement && document.documentElement.scrollTop ) {
      var winScroll = document.documentElement.scrollTop
    } else if ( document.body ) {
      var winScroll = document.body.scrollTop;
    }
    // get current selection
    txtarea.focus();
    var range = document.selection.createRange();
    selText = range.text;
    // insert tags
    checkSelectedText();
    range.text = tagOpen + selText + tagClose;
    // mark sample text as selected
    if ( isSample && range.moveStart ) {
      if ( window.opera ) {
        tagClose = tagClose.replace(/\n/g,'');
      }
      range.moveStart('character', - tagClose.length - selText.length);
      range.moveEnd('character', - tagClose.length);
    }
    range.select();
    // restore window scroll position
    if ( document.documentElement && document.documentElement.scrollTop ) {
      document.documentElement.scrollTop = winScroll;
    } else if ( document.body ) {
      document.body.scrollTop = winScroll;
    }


  } else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ) { // Mozilla
    // save textarea scroll position
    var textScroll = txtarea.scrollTop;
    // get current selection
    txtarea.focus();
    var startPos = txtarea.selectionStart;
    var endPos = txtarea.selectionEnd;
    selText = txtarea.value.substring( startPos, endPos );
    // insert tags
    checkSelectedText();
    txtarea.value = txtarea.value.substring(0, startPos)
      + tagOpen + selText + tagClose
      + txtarea.value.substring(endPos, txtarea.value.length);
    // set new selection
    if ( isSample ) {
      txtarea.selectionStart = startPos + tagOpen.length;
      txtarea.selectionEnd = startPos + tagOpen.length + selText.length;
    } else {
      txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;
      txtarea.selectionEnd = txtarea.selectionStart;
    }
    // restore textarea scroll position
    txtarea.scrollTop = textScroll;
  }


  function checkSelectedText() {
    if ( !selText ) {
      selText = sampleText;
      isSample = true;
    } else if ( selText.charAt(selText.length - 1) == ' ' ) { // exclude ending space char
      selText = selText.substring(0, selText.length - 1);
      tagClose += ' ';
    }
  }


};


/**
 * Restore the edit box scroll state following a preview operation,
 * and set up a form submission handler to remember this state
 */
window.scrollEditBox = function() {
  var editBox = document.getElementById( 'wpTextbox1' );
  var scrollTop = document.getElementById( 'wpScrolltop' );
  var editForm = document.getElementById( 'editform' );
  if( editForm && editBox && scrollTop ) {
    if( scrollTop.value ) {
      editBox.scrollTop = scrollTop.value;
    }
    addHandler( editForm, 'submit', function() {
      scrollTop.value = editBox.scrollTop;
    } );
  }
};


function toolbarExtension_semanticTemplates(){
 var textHere = " Hier Text einsetzen ";
 var formulaHere = " Hier Formel einsetzen ";
 var regx = wgPageName.match(/Aufgabe|Beispiel|Bemerkung|Beweis|Definition|Fakt/gi);


//
//
//Bedingte Einsetzungshilfen
//
//


//
//
//Bedingte Einsetzungshilfen für Stichworte
//
//


if(wgPageName.match(/MSWUL/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Stichwortumleitung",
     "tagOpen": "<noinclude>{{MSWUL}}</noinclude>",
     "tagClose": "",
     "sampleText": "wohin"});
}


if(wgPageName.match(/MSW/)) {
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Mathematisches Stichwort",
     "tagOpen": "{{MSW|Anf1=" + wgTitle.substring (0, 1) + "|Anf2=" + wgTitle.substring (1, 2) + "|Anf3=" + wgTitle.substring (2, 3) + "|" + wgTitle + "}}",
     "tagClose": "",
     "sampleText": ""});
}


if(wgPageName.match(/^MDLUL/)){
   var getStart = /^MDLUL\/(.*)/;
   getStart.exec(wgTitle);
   var start = RegExp.$1;
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Definitionsumleitung",
     "tagOpen": "{{MDLUL{{{opt|}}}|Start=" + start + "|Anf=" + start.substring (0, 1).toUpperCase() + start.substring (1, 2) + "|\n|Siehe=\n|Ziel=",
     "tagClose": "/Definition\n}}",
     "sampleText": "Ziel"});
}


if(wgPageName.match(/Faktreferenznummer$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Faktreferenznummer",
     "tagOpen": "{{Nummer im Kurs{{{opt|}}}|",
     "tagClose": "|||Kurs=|}}",
     "sampleText": "Satz"});
}


if(wgPageName.match(/Beispielreferenznummer$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Beispielreferenznummer",
     "tagOpen": "{{Nummer im Kurs{{{opt|}}}|Beispiel|",
     "tagClose": "||Kurs=|}}",
     "sampleText": " "});
}


if(wgPageName.match(/Definitionreferenznummer$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Definitionreferenznummer",
     "tagOpen": "{{Nummer im Kurs{{{opt|}}}|Definition|",
     "tagClose": "||Kurs=|}}",
     "sampleText": " "});
}


if(wgPageName.match(/Bemerkungreferenznummer$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Bemerkungreferenznummer",
     "tagOpen": "{{Nummer im Kurs{{{opt|}}}|Bemerkung|",
     "tagClose": "||Kurs=|}}",
     "sampleText": " "});
 }


if(wgPageName.match(/Aufgabereferenznummer$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Aufgabereferenznummer",
     "tagOpen": "{{Nummer im Kurs{{{opt|}}}|Aufgabe|",
     "tagClose": "||Kurs=|}}",
     "sampleText": " "});
}


//
//
//Anredevarianten
//
//


if(wgPageName.match(/Sie$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Anredevariante",
     "tagOpen": "{{Anredevariante|",
     "tagClose": "}}",
     "sampleText": "Dateiname"});
 }


if(wgPageName.match(/Direkt$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Anredevariante",
     "tagOpen": "{{Anredevariante|",
     "tagClose": "}}",
     "sampleText": "Dateiname"});
 }


//
//
//Bedingter Button für Vorlesungsaufzählung
//
//


if(wgPageName.match(/Vorlesungsaufzählung$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Vorlesungsaufzählung",
     "tagOpen": "{{Vorlesungsaufzählung\n|",
     "tagClose": "|\n|V1=\n|V2=\n|V3=\n|V4=\n|V5=\n|V6=\n|V7=\n|V8=\n|V9=\n|V10=\n|V11=\n|V12=\n|V13=\n|V14=\n|V15=\n|V16=\n|V17=\n|V18=\n|V19=\n|V20=\n|V21=\n|V22=\n|V23=\n|V24=\n|V25=\n|V26=\n|V27=\n|V28=\n|V29=\n|V30=\n}}",
     "sampleText": wgPageName.replace(/.Vorlesungsaufzählung$/,"")});
 }


//
//
//Bedingter Button für Arbeitsblattaufzählung
//
//


if(wgPageName.match(/Arbeitsblattaufzählung$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Arbeitsblattaufzählung",
     "tagOpen": "{{Arbeitsblattaufzählung|",
     "tagClose": "}}",
     "sampleText": wgPageName.replace(/.Arbeitsblattaufzählung$/,"")});
 }


//
//
//Bedingte Buttons für Latexversion
//
//


if(wgPageName.match(/latex$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Latexdeklaration",
     "tagOpen": "{{latex|",
     "tagClose": "}}",
     "sampleText": wgPageName.replace(/.latex$/,"")});
 }


if(wgPageName.match(/latexmakros$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Latexmakrosseite",
     "tagOpen": "{{Latexmakros-Seite unter|",
     "tagClose": "|}}",
     "sampleText": "Theorie"});
 }


//
//
//Bedingte Buttons für Kontrollversion (intern)
//
//


if(wgPageName.match(/kontrolle$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Kontrollseite",
     "tagOpen": "{{Kontrollseite|",
     "tagClose": "}}",
     "sampleText": wgPageName.replace(/.kontrolle$/,"")});
 }


//
//
//Mathematische Umgebungen
//
//


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3f/Button_clipboard_math.png",
     "speedTip": "Mathematische Formel (Latex)",
     "tagOpen": " {{math|term=",
     "tagClose": "|SZ=}} ",
     "sampleText": formulaHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3f/Button_clipboard_math.png",
     "speedTip": "Mathematische Formel (Latex)",
     "tagOpen": " {{mathl|term=",
     "tagClose": "|SZ=}} ",
     "sampleText": formulaHere});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/ce/Button_clipboard_mathdisplay.png",
     "speedTip": "Mathdisplay",
     "tagOpen": "\n{{\nmath/disp|term=\n",
     "tagClose": "\n|SZ=\n}}",
     "sampleText": formulaHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/5/5f/Button_sorterbar.png",
     "speedTip": "Mathematische Korrespondenz",
     "tagOpen": "\n{{\nmathkor|term1=\n",
     "tagClose": "\n||term2=\n\n|SZ=\n}}",
     "sampleText": formulaHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/d/d8/Button_clipboard_enum.png",
     "speedTip": "Mathematische Liste",
     "tagOpen": "\n{{\nmathlist|term1=\n",
     "tagClose": "\n||term2=\n\n||term3=\n\n|SZ=\n}}",
     "sampleText": formulaHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/5/5f/Button_sorterbar.png",
     "speedTip": "Mathematische Bedingung",
     "tagOpen": "\n{{\nmathbed|term=\n",
     "tagClose": "\n||bedterm1=\n\n||bedterm2=\n\n|SZ=\n}}",
     "sampleText": formulaHere});



mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/3f/Set_theory_icon.svg",
     "speedTip": "Element",
     "tagOpen": "\n{{\nMa:Vergleichskette\n|",
     "tagClose": "\n|\\in|\n||\n||\n||\n|SZ=\n}}",
     "sampleText": formulaHere});






mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/8/86/Button_clipboard_valign.png",
     "speedTip": "Vergleichskette",
     "tagOpen": "\n{{\nMa:Vergleichskette/disp\n|",
     "tagClose": "\n||\n||\n||\n||\n|SZ=\n}}",
     "sampleText": formulaHere});





mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/f/ff/Button_arrow_right.png",
     "speedTip": "Abbildungsstruktur",
     "tagOpen": "\n{{\nMa:abbele/disp\n|name=\n|",
     "tagClose": "|\n||\n|SZ=\n}}",
     "sampleText": formulaHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/f/f3/Button_clipboard_template.png",
     "speedTip": "Vorlage einfügen",
     "tagOpen": " {{",
     "tagClose": "|}} ",
     "sampleText": " Vorlagennamen hier einfügen "});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a4/Btn_toolbar_par.png",
     "speedTip": "Klammer",
     "tagOpen": " {{makl| ",
     "tagClose": " |}} ",
     "sampleText": textHere});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/8/8f/Button_clipboard_parameter.png",
     "speedTip": "Parameter",
     "tagOpen": "{{{",
     "tagClose": "|}}}",
     "sampleText": " Hier Vorlagenparameter einsetzen "});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/5/54/Button_clipboard_latex_operation.png",
     "speedTip": "Operator einfügen",
     "tagOpen": " {{op:",
     "tagClose": "||}} ",
     "sampleText": "Operatornamen hier einfügen "});



mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/d/d8/Button_clipboard_enum.png",
     "speedTip": "Aufzählung",
     "tagOpen": "\n{{\nAufzählung3\n|",
     "tagClose": "\n|\n|\n}}",
     "sampleText": textHere});


//
//
//Herausstellungen
//
//


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/c9/Button_clipboard_bold.png",
     "speedTip": "Stichwort",
     "tagOpen": " {{Stichwort|",
     "tagClose": "|msw=|SZ=}} ",
     "sampleText": " Stichwort "});


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a4/Btn_toolbar_par.png",
     "speedTip": "Klammerzusatz",
     "tagOpen": "\n{{\nZusatz/Klammer\n|text=",
     "tagClose": "|\n|ISZ=|ESZ=\n}}",
     "sampleText": textHere});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/27/Button_clipboard_headline.png",
     "speedTip": "Seitenüberschrift",
     "tagOpen": "{{Seitenüberschrift|term=",
     "tagClose": "}}",
     "sampleText": textHere});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1a/Button_clipboard_subheading.png",
     "speedTip": "Zwischenüberschrift",
     "tagOpen": "{{Zwischenüberschrift|term=",
     "tagClose": "}}",
     "sampleText": textHere});


//
//
//Einbindungen
//
//


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/e/ee/Button_clipboard_image.png",
     "speedTip": "Bild einbinden",
     "tagOpen": "\n{{\ninputbild\n|",
     "tagClose": "||230px {{!}} right {{!}} \n|Text=\n|Autor=\n|Benutzer=\n|Domäne=\n|Lizenz=\n|Bemerkung=\n}}",
     "sampleText": " Hier Bildname einsetzen "});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/cf/Button_clipboard_definition.png",
     "speedTip": "Definition einbinden",
     "tagOpen": "\n{{\ninputdefinition\n|",
     "tagClose": "/Definition||\n}}",
     "sampleText": " Hier Definitionsname einsetzen "});


//
//
//Spezielle Defintionsbuttons
//
//


if(wgPageName.match(/Definition$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/c9/Button_clipboard_bold.png",
     "speedTip": "Definitionswort",
     "tagOpen": "\n{{\nDefinitionswort\n|Prämath=\n|",
     "tagClose": "|\n|msw=\n|SZ=\n}} ",
     "sampleText": " Definitionswort "});
 }



 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/8/87/Button_clipboard_fact.png",
     "speedTip": "Fakt einbinden",
     "tagOpen": "\n{{\ninputfaktbeweis\n|",
     "tagClose": "/Fakt|||\n||\n}}",
     "sampleText": " Hier Faktname einsetzen "});


if(wgPageName.match(/Begriff$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/c9/Button_clipboard_bold.png",
     "speedTip": "Stichwort",
     "tagOpen": "\n{{\nStichwort/Abfrage\n|Prämath=\n|",
     "tagClose": "|\n|msw=\n|SZ=\n}} ",
     "sampleText": " Stichwort "});
 }


if(wgPageName.match(/Name$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/7b/Button_clipboard_bold.png",
     "speedTip": "Stichwort",
     "tagOpen": "\n{{\nStichwort/Abfrage\n|Prämath=\n|",
     "tagClose": "|\n|msw=\n|SZ=\n}} ",
     "sampleText": " Stichwort "});
 }


//
//
//Spezielle Beweisbuttons (aktiv bei /Beweis)
//
//


if(wgPageName.match(/Beweis$/)){


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/6d/Button_recycling.png",
     "speedTip": "Teilbeweis",
     "tagOpen": "{{\nTeilbeweis\n|Teilziel=|Teilstrategie=\n|Teilbeweis=\n",
     "tagClose": "\n|Teilabschluss=\n}}",
     "sampleText": "Beweis"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/6d/Button_recycling.png",
     "speedTip": "Ringbeweis",
     "tagOpen": "{{\nRingbeweis\n|Strategie=\n|Richtung=123\n|Beweis12=\n",
     "tagClose": "\n|Beweis23=\n\n|Beweis31=\n\n|Abschluss=\n}}",
     "sampleText": "Beweis von 1 nach 2"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/6d/Button_recycling.png",
     "speedTip": "Beweisrichtung",
     "tagOpen": "\n{{\nBeweis",
     "tagClose": "\n| |\n}}",
     "sampleText": "Beweis"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Fallunterscheidung",
     "tagOpen": "\n{{\nFallunterscheidung\n|Fall1=\n",
     "tagClose": "\n|Fall2=\n\n|Fall3=|Fall4=|Fall5=\n}}",
     "sampleText": "Fall1"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a5/Buttonexperimenty.png",
     "speedTip": "Widerspruchsbeweis",
     "tagOpen": "{{\nWiderspruchsbeweis\n|Strategie=\n\n|Annahme=\n",
     "tagClose": "\n|Argumentation=\n\n|Widerspruch=\n\n|Zusammenfassung=\n\n}}",
     "sampleText": "Annahme"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/ad/Button_l_nl.png",
     "speedTip": "Induktionsbeweis",
     "tagOpen": "{{\nInduktionsbeweis\n|Strategie=\n",
     "tagClose": "\n|Anfang=\n\n|Schluss=\n\n|Zusammenfassung=\n\n}}",
     "sampleText": "Induktion"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Zwischenbehauptung",
     "tagOpen": "\n{{\nZwischenbehauptung\n|Behauptung=\n",
     "tagClose": "\n|SZ0=.\n|Beweis=\n\n|SZ=\n}}",
     "sampleText": "Zwischenbehauptung"});
 }


//
//
//Weitere Strukturen
//
//


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/c2/Button_clipboard_information.png",
     "speedTip": "Bemerkung einbinden",
     "tagOpen": "\n{{\ninputbemerkung\n|",
     "tagClose": "/Bemerkung||\n}}",
     "sampleText": " Hier Bemerkungsname einsetzen "});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/76/Button_clipboard_example.png",
     "speedTip": "Beispiel einbinden",
     "tagOpen": "\n{{\ninputbeispiel\n|",
     "tagClose": "/Beispiel||\n}}",
     "sampleText": " Hier Beispielname einsetzen "});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1f/Button_clipboard_task.png",
     "speedTip": "Aufgabe einbinden",
     "tagOpen": "\n{{\ninputaufgabe\n|",
     "tagClose": "/Aufgabe||\n|zusatz=\n|tipp=\n}}",
     "sampleText": " Hier Aufgabenname einsetzen "});


//
//
//Spezielle Aufgabenbuttons (aktiv nur bei /Aufgabe und /Beweis)
//
//


if(wgPageName.match(/Aufgabe$/)){


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "n Sie",
     "tagOpen": "{{n Sie}}",
     "tagClose": "",
     "sampleText": ""});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "ManSie Unterscheidung einbinden",
     "tagOpen": "{{ManSie|Man ",
     "tagClose": "|en Sie}}",
     "sampleText": "bestimme"});


   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/f/f3/Button_clipboard_template.png",
     "speedTip": "Aufgabenformvorlage",
     "tagOpen": "{{",
     "tagClose": "/Aufgabenform||SZ=}}",
     "sampleText": "Aufgabenformname"});


 }


if(wgPageName.match(/Beweisaufgabe$/)){

   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "n Sie",
     "tagOpen": "{{n Sie}}",
     "tagClose": "",
     "sampleText": ""});

   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "ManSie Unterscheidung einbinden",
     "tagOpen": "{{ManSie|Man ",
     "tagClose": "|en Sie}}",
     "sampleText": "bestimme"});

   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/f/f3/Button_clipboard_template.png",
     "speedTip": "Aufgabenformvorlage",
     "tagOpen": "{{",
     "tagClose": "/Aufgabenform||SZ=}}",
     "sampleText": "Aufgabenformname"});

 }


if(wgPageName.match(/Aufgabenform$/)){

   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "n Sie",
     "tagOpen": "{{n Sie}}",
     "tagClose": "",
     "sampleText": ""});

   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/3/35/Sister_icon.png",
     "speedTip": "ManSie Unterscheidung einbinden",
     "tagOpen": "{{ManSie|Man ",
     "tagClose": "|en Sie}}",
     "sampleText": "bestimme"});

 }


//
//
//Button für mathematischer Text (abhängig vom Texttyp)
//
//


if(wgPageName.match(/Definition$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Definition",
     "tagOpen": "{{\nMathematischer Text/Definition{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Definition\n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=   \n|Definitionswort=\n|Definitionswort2=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Begriff$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Begriff",
     "tagOpen": "{{\nMathematischer Text/Definitionsabfrage{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Definitionsabfrage\n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=   \n|Definitionswort=\n|Definitionswort2=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Name$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Satzabfrage",
     "tagOpen": "{{\nMathematischer Text/Satzabfrage{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Satzabfrage\n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=   \n|Definitionswort=\n|Definitionswort2=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Name/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Satzantwort",
     "tagOpen": "{{\nMathematischer Text/Satzantwort{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Satzantwort\n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=   \n|Definitionswort=\n|Definitionswort2=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Inhalt$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Antwort",
     "tagOpen": "{{\nMathematischer Text/Definitionsantwort{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Definitionsantwort\n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=   \n|Definitionswort=\n|Definitionswort2=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Fakt$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Fakt",
     "tagOpen": "{{\nMathematischer Text/Fakt{{{opt|}}}\n|Text=\n{{\nFaktstruktur|typ=\n|Situation=\n",
     "tagClose":"\n|Voraussetzung=\n\n|Übergang=\n|Folgerung=\n\n|Zusatz=\n}}\n|Textart=Fakt \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Faktname=\n|Abfrage=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Beweis$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Beweis",
     "tagOpen": "{{\nMathematischer Text/Beweis{{{opt|}}}\n|Text=\n{{\nBeweisstruktur\n|Strategie=\n|Notation=\n|Beweis=\n",
     "tagClose":"\n|Abschluss=\n}}\n|Textart=Beweis \n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});
}


if(wgPageName.match(/Name$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Name",
     "tagOpen": "{{\nMathematischer Text/Satzabfrage{{{opt|}}}\n|Text=\n",            "tagClose":"\n|Textart=Satzabfrage\n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie= \n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Aufgabe$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Aufgabe",
     "tagOpen": "{{\nMathematischer Text/Aufgabe{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Aufgabe \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Punkte=\n|Lösung=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Beweisaufgabe$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Aufgabe",
     "tagOpen": "{{\nMathematischer Text/Beweisaufgabe{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Aufgabe \n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Punkte=\n|Lösung=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Aufgabenform$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Aufgabenform",
     "tagOpen": "{{\nMathematischer Text/Aufgabenform{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Aufgabe \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Punkte=\n|Lösung=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Beispiel$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Beispiel",
     "tagOpen": "{{\nMathematischer Text/Beispiel{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Beispiel \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Bemerkung$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Bemerkung",
     "tagOpen": "{{\nMathematischer Text/Bemerkung{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Bemerkung \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Variante=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Lösung$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Lösung",
     "tagOpen": "{{\nMathematischer Text/Lösung{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Lösung \n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Aufgabe=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});

}



if(wgPageName.match(/Kommentar$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Kommentar",
     "tagOpen": "{{\nMathematischer Text/Kommentar{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Kommentar \n|Kategorie=Siehe\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Aufgabe=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});

}






if(wgPageName.match(/Verfahren$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Verfahren",
     "tagOpen": "{{\nMathematischer Text/Verfahren{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Verfahren \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Sprechweise$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Sprechweise",
     "tagOpen": "{{\nMathematischer Text/Sprechweise{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Sprechweise \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Notation$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Notation",
     "tagOpen": "{{\nMathematischer Text/Notation{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Notation \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Diagramm$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Diagramm",
     "tagOpen": "{{\nMathematischer Text/Diagramm{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Diagramm \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


//
//
//Unter Sonstiges
//
//


if(wgPageName.match(/Definitionskern$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Sonstiges",
     "tagOpen": "{{\nMathematischer Text/Sonstiges{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Sonstiges \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Einzelbegründung$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Sonstiges",
     "tagOpen": "{{\nMathematischer Text/Sonstiges{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Sonstiges \n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Beweisverweis$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Verweis",
     "tagOpen": "{{\nMathematischer Text/Verweis{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Verweis \n|Kategorie=Mathematische Hilfstexte\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


//
//
//Textabschnitte
//
//


if(wgPageName.match(/Textabschnitt$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Textabschnitt",
     "tagOpen": "{{\nMathematischer Textabschnitt{{{opt|}}}\n|Inhalt=\n",
     "tagClose":"\n|Textart=Textabschnitt\n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n|pdf=\n}}",
     "sampleText": textHere});


}


//
//
//Tabelle
//
//


if(wgPageName.match(/Tabelle$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Tabelle",
     "tagOpen": "{{\nTabelle",
     "tagClose":"\n|ls0=|lz1=|lz2=|lz3=|lz4=|lz5=|lz6=|lz7=|lz8=|lz9=|lz10=|\n|ls1=|a1,1=|a1,2=|a1,3=|a1,4=|a1,5=|a1,6=|a1,7=|a1,8=|a1,9=|a1,10=|\n|ls2=|a2,1=|a2,2=|a2,3=|a2,4=|a2,5=|a2,6=|a2,7=|a2,8=|a2,9=|a2,10=|\n|ls3=|a3,1=|a3,2=|a3,3=|a3,4=|a3,5=|a3,6=|a3,7=|a3,8=|a3,9=|a3,10=|\n|ls4=|a4,1=|a4,2=|a4,3=|a4,4=|a4,5=|a4,6=|a4,7=|a4,8=|a4,9=|a4,10=|\n|ls5=|a5,1=|a5,2=|a5,3=|a5,4=|a5,5=|a5,6=|a5,7=|a5,8=|a5,9=|a5,10=|\n|ls6=|a6,1=|a6,2=|a6,3=|a6,4=|a6,5=|a6,6=|a6,7=|a6,8=|a6,9=|a6,10=|\n|ls7=|a7,1=|a7,2=|a7,3=|a7,4=|a7,5=|a7,6=|a7,7=|a7,8=|a7,9=|a7,10=|\n|ls8=|a8,1=|a8,2=|a8,3=|a8,4=|a8,5=|a8,6=|a8,7=|a8,8=|a8,9=|a8,10=|\n|ls9=|a9,1=|a9,2=|a9,3=|a9,4=|a9,5=|a9,6=|a9,7=|a9,8=|a9,9=|a9,10=|\n|ls10=|a10,1=|a10,2=|a10,3=|a10,4=|a10,5=|a10,6=|a10,7=|a10,8=|a10,9=|a10,10=|\n|ls11=|a11,1=|a11,2=|a11,3=|a11,4=|a11,5=|a11,6=|a11,7=|a11,8=|a11,9=|a11,10=|\n|ls12=|a12,1=|a12,2=|a12,3=|a12,4=|a12,5=|a12,6=|a12,7=|a12,8=|a12,9=|a12,10=|\n|ls13=|a13,1=|a13,2=|a13,3=|a13,4=|a13,5=|a13,6=|a13,7=|a13,8=|a13,9=|a13,10=|\n|ls14=|a14,1=|a14,2=|a14,3=|a14,4=|a14,5=|a14,6=|a14,7=|a14,8=|a14,9=|a14,10=|\n|ls15=|a15,1=|a15,2=|a15,3=|a15,4=|a15,5=|a15,6=|a15,7=|a15,8=|a15,9=|a15,10=|\n|ls16=|a16,1=|a16,2=|a16,3=|a16,4=|a16,5=|a16,6=|a16,7=|a16,8=|a16,9=|a16,10=|\n|ls17=|a17,1=|a17,2=|a17,3=|a17,4=|a17,5=|a17,6=|a17,7=|a17,8=|a17,9=|a17,10=|\n|ls18=|a18,1=|a18,2=|a18,3=|a18,4=|a18,5=|a18,6=|a18,7=|a18,8=|a18,9=|a18,10=|\n|ls19=|a19,1=|a19,2=|a19,3=|a19,4=|a19,5=|a19,6=|a19,7=|a19,8=|a91,9=|a19,10=|\n|ls20=|a20,1=|a20,2=|a20,3=|a20,4=|a20,5=|a20,6=|a20,7=|a20,8=|a20,9=|a20,10=|\n}}",
     "sampleText": textHere});


}


//
//
//Klausuren
//
//


if(wgPageName.match(/Klausur$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Klausur",
     "tagOpen": "{{\nKlausur{{{opt|}}}\n|",
     "tagClose":"/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||   \n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|/Aufgabe|p|||\n|Textart=Klausur\n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Kurs=\n|Semester=\n|Institution=\n|Bereich=\n|Klausurtyp=\n|Klausurtitel=\n|Klausurnummer=\n|Dozent=\n|Datum=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n|opt2={{{opt2|}}}\n|pdf=.pdf\n}}",
     "sampleText": textHere});


}


if(wgPageName.match(/Klausur$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/1/1f/Button_clipboard_task.png",
     "speedTip": "Aufgabe",
     "tagOpen": "\n|",
     "tagClose":"/Aufgabe|p|||",
     "sampleText": textHere});


}


if(wgPageName.match(/Klausur_mit_Lösungen$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Aufgabe",
     "tagOpen": "{{:",
     "tagClose":"|opt2=klausurlösung}}",
     "sampleText": wgPageName.replace(/.mit_Lösungen$/,"")});


}


if(wgPageName.match(/Situation$/)){


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/a/a7/Button_clipboard_mathematical_text.png",
     "speedTip": "Mathematischer Text/Situation",
     "tagOpen": "{{\nMathematischer Text/Situation{{{opt|}}}\n|Text=\n",
     "tagClose":"\n|Textart=Situation\n|Kategorie=\n|Kategorie2=\n|Kategorie3=\n|Objektkategorie=\n|Stichwort=\n|Autor=\n|Bearbeitungsstand=\n}}",
     "sampleText": textHere});


}


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Situationsvorlage",
     "tagOpen": "{{",
     "tagClose": "/Situation|SZ=}}",
     "sampleText": " Vorlagenname "});


//
//
//Links
//
//


  mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/65/Button_clipboard_Dlink.png",
     "speedTip": "Definitions-Link",
     "tagOpen": "\n{{\nDefinitionslink\n|Prämath=\n|",
     "tagClose": "|\n|kon=|msw=|\n|Definitionsseitenname=\n/Definition\n|Refname={{{def|}}}\n|SZ=\n}}\n",
     "sampleText": "Definitionsbegriff hier einfügen"});


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/7d/Button_clipboard_Flink.png",
     "speedTip": "Fakt-Link",
     "tagOpen": "\n{{\nFaktlink\n|Präwort=||Faktseitenname=\n",
     "tagClose": "/Fakt\n|Nr=\n|Refname={{{ref|}}}|refb={{{refb|}}}\n|SZ=\n}}\n",
     "sampleText": textHere});





 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/c/c9/Button_clipboard_bold.png",
     "speedTip": "Beispiel-Link",
     "tagOpen": "\n{{\nBeispiellink\n|Präwort=||Beispielseitenname=\n",
     "tagClose": "/Beispiel\n|Nr=\n|Refname={{{ref|}}}|refb={{{refb|}}}\n|SZ=\n}}\n",
     "sampleText": textHere});





 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/5/54/Letter_A.svg",
     "speedTip": "Aufgabe-Link",
     "tagOpen": "\n{{\nAufgabelink\n|Präwort=||Aufgabeseitenname=\n",
     "tagClose": "/Aufgabe\n|Nr=\n|Refname={{{ref|}}}|refb={{{refb|}}}\n|SZ=\n}}\n",
     "sampleText": textHere});






//
//
//Kategorisierung
//
//


if(wgPageName.match(/Aufgaben$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Aufgaben-Kategorisierung",
     "tagOpen": "{{\nAufgaben-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Aufgaben$/,"")});
}


if(wgPageName.match(/Arbeitsblätter$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Arbeitsblatt-Kategorisierung",
     "tagOpen": "{{\nArbeitsblatt-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Arbeitsblätter$/,"")});
}


if(wgPageName.match(/Beispiele$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Beispiel-Kategorisierung",
     "tagOpen": "{{\nBeispiel-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Beispiele$/,"")});
}


if(wgPageName.match(/Bemerkungen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Bemerkungs-Kategorisierung",
     "tagOpen": "{{\nBemerkungs-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Bemerkungen$/,"")});
}


if(wgPageName.match(/Beweise$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Beweis-Kategorisierung",
     "tagOpen": "{{\nBeweis-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Beweise$/,"")});
}


if(wgPageName.match(/Definitionen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Definitions-Kategorisierung",
     "tagOpen": "{{\nDefinitions-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Definitionen$/,"")});
}


if(wgPageName.match(/Notationen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Notations-Kategorisierung",
     "tagOpen": "{{\nNotationen-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Notationen$/,"")});
}


if(wgPageName.match(/Sprechweisen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Sprechweise-Kategorisierung",
     "tagOpen": "{{\nSprechweisen-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Sprechweisen$/,"")});
}


if(wgPageName.match(/Fakten$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Fakten-Kategorisierung",
     "tagOpen": "{{\nFakten-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Fakten$/,"")});
}


if(wgPageName.match(/Klausuren$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Klausur-Kategorisierung",
     "tagOpen": "{{\nKlausur-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Klausuren$/,"")});
}


if(wgPageName.match(/Lösungen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Lösungs-Kategorisierung",
     "tagOpen": "{{\nLösungs-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Lösungen$/,"")});
}




if(wgPageName.match(/Kommentare$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Kommentar-Kategorisierung",
     "tagOpen": "{{\nKommentar-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Kommentare$/,"")});
}




if(wgPageName.match(/Situationsbeschreibungen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Situation-Kategorisierung",
     "tagOpen": "{{\nSituation-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Situationsbeschreibungen$/,"")});
}


if(wgPageName.match(/Textabschnitte$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Textabschnitt-Kategorisierung",
     "tagOpen": "{{\nTextabschnitts-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Textabschnitte$/,"")});
}


if(wgPageName.match(/Strukturvorlagen$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Vorlagen-Kategorisierung",
     "tagOpen": "{{\nVorlagen-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Strukturvorlagen$/,"")});
}


if(wgPageName.match(/Diagramme$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Diagramme-Kategorisierung",
     "tagOpen": "{{\nDiagramme-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Diagramme$/,"")});
}


if(wgPageName.match(/Verfahren$/)){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Verfahrens-Kategorisierung",
     "tagOpen": "{{\nVerfahrens-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": wgTitle.replace(/.Verfahren$/,"")});
}


if(wgCanonicalNamespace.match("Category")){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/2/2d/Button_clipboard_category.png",
     "speedTip": "Kategorisierung",
     "tagOpen": "{{\n-Kategorie unter\n|",
     "tagClose": "|\n||}}",
     "sampleText": textHere});
}


//
//
//Buttons zum Schreiben von Strukturvorlagen
//
//


mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/6/62/Button_desambig.png",
     "speedTip": "If-Bedingung",
     "tagOpen": "\n{{#if:{{{",
     "tagClose": "|}}}|  |   }}",
     "sampleText": "Bedingung einfügen"});


if(wgCanonicalNamespace.match("Template")){
mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Strukturvorlage",
     "tagOpen": "<includeonly>{{#switch: {{#titleparts:{{FULLPAGENAME}}|1|-1}}\n|latex\n|#default=",
     "tagClose": "\n}}</includeonly><noinclude>{{Operatorvorlage||}}</noinclude>",
     "sampleText": "Struktur"});
}


//
//
//Einträge für Vorträge und Literatur
//
//


 if(wgPageName.match(/Themen$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Vortragseintrag",
     "tagOpen": "{{\nVortragseintrag{{{opt|}}}\n|Sprecher=\n|Thema=",
     "tagClose": "\n|Titel=\n|Datum=\n|Raum=\n|Ort=\n|Zusammenfassung=\n|Literatur=\n|Aktuell=\n|Status=\n|Vortragstyp=\n|Sonstiges=\n}}",
     "sampleText": "  "});
 }


 if(wgPageName.match(/Vorträge$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Vortragseintrag",
     "tagOpen": "{{\nVortragseintrag{{{opt|}}}\n|Sprecher=\n|Sprecher2=\n|Thema=",
     "tagClose": "\n|Titel=\n|Datum=\n|Raum=\n|Ort=\n|Zusammenfassung=\n|Literatur=\n|Aktuell=\n|Status=\n|Vortragstyp=\n|Sonstiges=\n}}",
     "sampleText": "  "});
 }


if(wgPageName.match(/Literatureintrag/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Bucheintrag",
     "tagOpen": "{{\nBucheintrag{{{opt|}}}\n|Zitatstichwort=\n|Vorname=",
     "tagClose": "\n|Nachname=\n|Vorname2=\n|Nachname2=\n|Titel=\n|Teiltitel=\n|Untertitel=\n|Jahr=\n|Verlag=\n|Ort=\n|Auflage=\n|ISBN= ---  \n|Reihe=\n|Band=\n|Nummer=\n|Bemerkung=\n}}",
     "sampleText": "Vorname"});
 }


if(wgPageName.match(/Literatureintrag/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Artikeleintrag",
     "tagOpen": "{{\nArtikeleintrag{{{opt|}}}\n|Zitatstichwort=\n|Vorname=",
     "tagClose": "\n|Nachname=\n|Vorname2=\n|Nachname2=\n|Titel=\n|Journal=\n|Band=\n|Nummer=\n|Jahr=\n|Seiten= \n|ArXivlink=\n|Zentralblatt=\n|Reviews=\n|Bemerkung=\n}}",
     "sampleText": "Vorname"});
 }


if(wgPageName.match(/Literatur$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Eintrag im Literaturverzeichnis",
     "tagOpen": "{{Literaturverzeichnis|",
     "tagClose": "}}",
     "sampleText": "Literaturstichwort"});
 }


if(wgPageName.match(/Literaturverzeichnis$/)){
   mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Eintrag im Literaturverzeichnis",
     "tagOpen": "{{Literaturverzeichnis|",
     "tagClose": "}}",
     "sampleText": "Literaturstichwort"});
 }




//
//
//Einsetzungshilfen Umstellung
//
//


 mw.toolbar.addButton({
     "imageFile": "//upload.wikimedia.org/wikipedia/commons/7/74/Button_oeil.png",
     "speedTip": "Kat",
     "tagOpen": "[[Kategorie:Mathematische Standardlinks]]",
     "tagClose": "",
     "sampleText":""});


 return false;
}
$( toolbarExtension_semanticTemplates ) ;


$( scrollEditBox );
$( mwSetupToolbar );
$( function() {
  currentFocused = document.getElementById( 'wpTextbox1' );
  // http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
  // focus does not bubble normally, but using a trick we can do event delegation
  // on the focus event on all text inputs to make the toolbox usable on all of them
  var editForm = document.getElementById( 'editform' );
  if ( !editForm ) {
    return;
  }
  function onfocus( e ) {
    var elm = e.target || e.srcElement;
    if ( !elm ) {
      return;
    }
    var tagName = elm.tagName.toLowerCase();
    var type = elm.type || '';
    if ( tagName !== 'textarea' && tagName !== 'input' ) {
      return;
    }
    if ( tagName === 'input' && type.toLowerCase() !== 'text' ) {
      return;
    }


    currentFocused = elm;
  }


  if ( editForm.addEventListener ) {
    // Gecko, WebKit, Opera, etc... (all standards compliant browsers)
    editForm.addEventListener( 'focus', onfocus, true ); // This MUST be true to work
  } else if ( editForm.attachEvent ) {
    // IE needs a specific trick here since it doesn't support the standard
    editForm.attachEvent( 'onfocusin', function() { onfocus( event ); } );
  }


  // HACK: make currentFocused work with the usability iframe
  // With proper focus detection support (HTML 5!) this'll be much cleaner
  if ( typeof $ != 'undefined' ) {
    var iframe = $( '.wikiEditor-ui-text iframe' );
    if ( iframe.length > 0 ) {
      $( iframe.get( 0 ).contentWindow.document )
        .add( iframe.get( 0 ).contentWindow.document.body ) // for IE
        .focus( function() { currentFocused = iframe.get( 0 ); } );
    }
  }


  editForm
} );