MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 1: | Zeile 1: | ||
− | |||
mwCustomEditButtons[mwCustomEditButtons.length] = | mwCustomEditButtons[mwCustomEditButtons.length] = | ||
{"imageFile": "/rel_jap/w/skins/common/images/no.gif", | {"imageFile": "/rel_jap/w/skins/common/images/no.gif", | ||
Zeile 72: | Zeile 71: | ||
"tagClose": "]]", | "tagClose": "]]", | ||
"sampleText": " "}; | "sampleText": " "}; | ||
+ | /*********** WIKI GADGETS *****************/ | ||
+ | function PageHomeArrows() | ||
+ | { | ||
+ | //if (!wgNamespaceNumber || wgNamespaceNumber <100) return; | ||
+ | var c = document.getElementById("bodyContent") || document.getElementById("mw_content") || document.getElementById("article"); | ||
+ | if (!c) return; | ||
+ | for (var level = 2; level <= 3; ++level) { | ||
+ | var h = c.getElementsByTagName("h" + level); | ||
+ | for (var i = 0; i < h.length; ++i) { | ||
+ | var mwh = h[i].lastChild; // moveEditsection not run yet | ||
+ | if (mwh && mwh.className == "mw-headline" && mwh.offsetTop>screen.availHeight) { | ||
+ | var arrow = document.createElement("a"); | ||
+ | arrow.className = "toparrow noprint"; | ||
+ | arrow.title= "zum Seitenanfang"; | ||
+ | arrow.appendChild(document.createTextNode("top↑")); | ||
+ | arrow.href = "javascript:window.scrollTo(0,0); void 0;"; | ||
+ | mwh.insertBefore(arrow, mwh.firstChild); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | addOnloadHook(PageHomeArrows); |
Version vom 11. September 2011, 22:20 Uhr
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/no.gif",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/ndash.jpg",
"speedTip": "kurzer Bindestrich (n–dash)",
"tagOpen": "–",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/mdash.jpg",
"speedTip": "Text zwischen langen Bindestrichen (m—dash)",
"tagOpen": "— ",
"tagClose": " — ",
"sampleText": "Text"};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/hyphens1_dt.jpg",
"speedTip": "dt. Anführungszeichen einfach",
"tagOpen": "‚",
"tagClose": "‘",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/hyphens2_dt.jpg",
"speedTip": "dt. Anführungszeichen doppelt",
"tagOpen": "„",
"tagClose": "“",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/oo.jpg",
"speedTip": "langes o, klein",
"tagOpen": "ō",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/oo_gr.jpg",
"speedTip": "langes O, gross",
"tagOpen": "Ō",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/uu.jpg",
"speedTip": "langes u, klein",
"tagOpen": "ū",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/uu_gr.jpg",
"speedTip": "langes U, gross",
"tagOpen": "Ū",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/no.gif",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/ref.jpg",
"speedTip": "Fussnoten",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Text"};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/w/skins/common/images/cat.jpg",
"speedTip": "Kategorie",
"tagOpen": "[[Kategorie:",
"tagClose": "]]",
"sampleText": " "};
/*********** WIKI GADGETS *****************/
function PageHomeArrows()
{
//if (!wgNamespaceNumber || wgNamespaceNumber <100) return;
var c = document.getElementById("bodyContent") || document.getElementById("mw_content") || document.getElementById("article");
if (!c) return;
for (var level = 2; level <= 3; ++level) {
var h = c.getElementsByTagName("h" + level);
for (var i = 0; i < h.length; ++i) {
var mwh = h[i].lastChild; // moveEditsection not run yet
if (mwh && mwh.className == "mw-headline" && mwh.offsetTop>screen.availHeight) {
var arrow = document.createElement("a");
arrow.className = "toparrow noprint";
arrow.title= "zum Seitenanfang";
arrow.appendChild(document.createTextNode("top↑"));
arrow.href = "javascript:window.scrollTo(0,0); void 0;";
mwh.insertBefore(arrow, mwh.firstChild);
}
}
}
}
addOnloadHook(PageHomeArrows);