MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 203: | Zeile 203: | ||
} | } | ||
} | } | ||
− | window. | + | window.onmouseup= highlightZ; |
Version vom 22. August 2012, 14:23 Uhr
for (i in wgUserGroups)
if (wgUserGroups[i] == 'sysop')
var sysopRights = true;
/***********************************
Stylesheet changes
***********************************/
document.write (
'<style>' +
' #nv.fixed {}' + //0
' .glossar2:hover small small {}' + //1
' </style>'
);
var newCSS = document.styleSheets[document.styleSheets.length-1],
newRules = newCSS.cssRules || newCSS.rules; // für alle Browser ansprechbar
/***********************************
IMPORT
***********************************/
for (i in wgCategories) {
/*** NAVIGATION ***/
if (wgCategories[i]=='Artikel')
importScript('mediawiki:navigation.js') ;
//wenn css:styles...
if (wgCategories[i]=='Styles') {
/*** GLOSSAR ***/
importScript('mediawiki:glossar.js');
/*** POPUPS ***/
if (wgNamespaceNumber != 6)
importScript('mediawiki:popup.js');
}
}
/*** EDIT GADGETS ***/
if (wgAction=='edit') {
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/bg/no.gif",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/ndash.jpg",
"speedTip": "kurzer Bindestrich (n–dash)",
"tagOpen": "–",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/mdash.jpg",
"speedTip": "Text zwischen langen Bindestrichen (m—dash)",
"tagOpen": "— ",
"tagClose": " — ",
"sampleText": "Text"};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/hyphens1_dt.jpg",
"speedTip": "dt. Anführungszeichen einfach",
"tagOpen": "‚",
"tagClose": "‘",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/hyphens2_dt.jpg",
"speedTip": "dt. Anführungszeichen doppelt",
"tagOpen": "„",
"tagClose": "“",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/oo.jpg",
"speedTip": "langes o, klein",
"tagOpen": "ō",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/oo_gr.jpg",
"speedTip": "langes O, gross",
"tagOpen": "Ō",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/uu.jpg",
"speedTip": "langes u, klein",
"tagOpen": "ū",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/uu_gr.jpg",
"speedTip": "langes U, gross",
"tagOpen": "Ū",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/shy.jpg",
"speedTip": "stummes Trennzeichen",
"tagOpen": "·",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/nbsp.jpg",
"speedTip": "festes Leerzeichen (no breaking space)",
"tagOpen": " ",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/bg/no.gif",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/ref.jpg",
"speedTip": "Fussnoten",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Text"};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/cat.jpg",
"speedTip": "Kategorie",
"tagOpen": "[[Kategorie:",
"tagClose": "]]",
"sampleText": " "};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/glo.jpg",
"speedTip": "Glossar",
"tagOpen": "{{glossar:",
"tagClose": "}}",
"sampleText": " "};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/skt.jpg",
"speedTip": "Sanskrit",
"tagOpen": "{{skt:",
"tagClose": "}}",
"sampleText": " "};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/wikibilder/shy.jpg",
"speedTip": "TITEL",
"tagOpen": "{{DISPLAYTITLE:",
"tagClose": "\}\}<!--\n\n-->",
"sampleText": " "};
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageFile": "/rel_jap/bg/no.gif",
"speedTip": "",
"tagOpen": "",
"tagClose": "",
"sampleText": ""};
importScript('mediawiki:edit.js');
}
/*****************
Tagline
*****************/
function taglineLinks() {
var t=document.getElementById('siteSub') || 0;
if (t) {
var url= window.location.pathname.split('/');
var home = url[0]+'/'+url[1]+'/'+url[2]+'/';
var tags = t.innerHTML.split('>');
var newT= aaa = '';
for (i=0; i<tags.length; i++) {
tags[i] = tags[i].replace(/^\s/, '').replace(/\s$/, '');
home+= i==1 ? tags[i] :
i==2 ? ':'+tags[i] : '';
aaa = '<a href=" ' + home + ' ">' + tags[i] + '</a>';
newT+= i == 0 ? aaa + ' > ' :
(wgNamespaceNumber > 99 && i < tags.length-1) ? aaa + ' > ' :
(i < tags.length-1) ? tags[i] + ' > ' : tags[i];
}
t.innerHTML=newT;
}
}
taglineLinks();
/*****************
Bildinfos (Bildseite)
*****************/
if (sysopRights && document.getElementById('filehistory')) {
with (document.getElementById('filehistory')) {
style.display = 'block';
style.fontSize= '12px';
style.color= '#aaa';
style.textAlign= 'right';
innerHTML += ' (klick)';
onclick = showFilehistory;
}
}
function showFilehistory() {
var e = document.getElementById('mw-imagepage-section-filehistory').style;
e.display = e.display == 'block' ? 'none' : 'block';
}
function highlightZ() {
var z = document.getElementById('z_float').style;
if (String(location.href).indexOf('#zitieren')!=-1) {
z.backgroundColor = "#fffccc";
}
}
window.onmouseup= highlightZ;