Benutzer:Jonathan Groß/monobook.js
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
- Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
MyChar = new Array('<tt>', '<ref>', '{{SperrSchrift|', '{{Polytonisch|', '·', '‚', '–', '…', '⟨', '½', '¼', '¾', 'ʿ', 'ʾ', '’');
MyCharText = new Array('<tt>', '<ref>', '{{SperrSchrift}}', '{{Polytonisch}}', 'm.', '‚‘', '–', '…', '⟨⟩', '½', '¼', '¾', 'ʿ', 'ʾ', '’');
MyCharEnd = new Array('</tt>', '</ref>', '}}', '}}', '', '‘', '', '', '⟩', '', '', '', '', '', '');
MyCharDefault = new Array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
function ersetzen() {
var text = document.getElementById("wpTextbox1").value;
document.getElementById("wpTextbox1").value = text.split("—").join("–");
}
function AddMyCharsDo(thechar, thecharend, thechartext, thechardefault) {
var specialcharslist = document.getElementById('specialchars');
var addtext = "<p class=\"specialbasic\" id=\"Eigene\" title=\"Eigene\" style=\"display: none;\">\n\r";
addtext += " <font style=\"text-decoration: none;\" face=\"Arial Unicode MS,Lucida Sans Unicode,MS Mincho,Arial,sans-serif\">";
for (var i = 0; i < thechar.length; i++) {
if (!thecharend[i]) thecharend[i]="";
if (!thechardefault[i]) thechardefault[i]="";
jsfunction ="insertTags('" + thechar[i] + "','" + thecharend[i] + "','" + thechardefault[i] +"')";
//Autoinkrement-Funktion einsetzen
if (thechardefault[i].charAt(0) == "+" && !isNaN(parseInt(thechardefault[i].substr(1)))) {
jsfunction = "insertTagsValue('" + thechar[i] + "','" + thecharend[i] + "','" + thechardefault[i] + "','" + i +"')";
}
if (!thechartext[i]) thechartext[i] = thechar[i]+" "+thecharend[i];
addtext += "<a href=\"javascript:" +jsfunction +"\">" + thechartext[i] + "</a>\n\r";
}
addtext += "<a href='http://de.wikipedia.org/wiki/Unicode-Block_Zahlzeichen'>…</a>⃕ <a href='http://en.wikipedia.org/wiki/Dot_(diacritic)'>Ḥ</a></font></p>";
specialcharslist.innerHTML = addtext+specialcharslist.innerHTML;
}
// ============================================================
// BEGIN Enable multiple onload functions
// setup onload functions this way:
// aOnloadFunctions[aOnloadFunctions.length] = function_name; // without brackets!
if (!window.aOnloadFunctions) {
var aOnloadFunctions = new Array();
}
window.onload = function() {
if (window.aOnloadFunctions) {
for (var _i=0; _i<aOnloadFunctions.length; _i++) {
aOnloadFunctions[_i]();
}
}
}