MediaWiki:Edittools.js

// Optionen für das Sonderzeichenmenü in MediaWiki:Edittools // wird in MediaWiki:Common.js ganz unten eingebunden // Quelle: http://de.wikipedia.org/wiki/MediaWiki:Onlyifediting.js // Lizenz: GNU-Lizenz für freie Dokumentation function addCharSubsetMenu { var specialchars = document.getElementById('specialchars'); if (specialchars) { var menu = ""; menu += " Standard "; menu += " WikiSyntax "; menu += " Wikivoyage "; menu += " Arabic "; menu += " Catalan "; menu += " Cyrillic "; menu += " Czech "; menu += " Esperanto "; menu += " Estonian "; menu += " French "; menu += " Greek "; menu += " Hawaiian "; menu += " Hebrew "; menu += " Hungarian "; menu += " Icelandic "; menu += " Italian "; menu += " Latin "; menu += " Latvian "; menu += " Lithuanian "; menu += " Maltese "; menu += " Pinyin "; menu += " Polish "; menu += " Portuguese "; menu += " Romanian "; menu += " Scandinavian "; menu += " Serbian "; menu += " Spanish "; menu += " Turkish "; menu += " Vietnamese "; menu += " Yiddisch "; menu += " "; specialchars.innerHTML = menu + specialchars.innerHTML; // Standard-CharSubset chooseCharSubset(0); } } // CharSubset-Auswahl function chooseCharSubset(s) { var l = document.getElementById('specialchars').getElementsByTagName('p'); for (var i = 0; i < l.length ; i++) { l[i].style.display = i == s ? 'inline' : 'none'; //   l[i].style.visibility = i == s ? 'visible' : 'hidden'; } } addOnloadHook(addCharSubsetMenu);