Weitere Optionen
Rene (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
| Zeile 48: | Zeile 48: | ||
} | } | ||
}) | }) | ||
// onload stuff | |||
var firstRun = true; | |||
function loadFunc() | |||
{ | |||
if(firstRun) | |||
firstRun = false; | |||
else | |||
return; | |||
initFunctionsJS(); | |||
if(document.getElementById('mp3-navlink') != null) | |||
{ | |||
document.getElementById('mp3-navlink').onclick = onArticleNavClick; | |||
document.getElementById('mp3-navlink').getElementsByTagName('a')[0].href = 'javascript:void(0)'; | |||
} | |||
if(window.storagePresent) | |||
initVisibility(); | |||
rewriteTitle(); | |||
showEras('title-eraicons'); | |||
showEras('title-shortcut'); | |||
fillEditSummaries(); | |||
if (wgAction=="edit" || wgAction=="submit") fillPreloads(); | |||
var body = document.getElementsByTagName('body')[0]; | |||
var bodyClass = body.className; | |||
if(!bodyClass || (bodyClass.indexOf('page-') == -1)) | |||
{ | |||
var page = window.pageName.replace(/\W/g, '_'); | |||
body.className += ' page-' + page; | |||
} | |||
if(typeof(onPageLoad) != "undefined") | |||
{ | |||
onPageLoad(); | |||
} | |||
} | |||
function fillEditSummaries() | |||
{ | |||
var label = document.getElementById("wpSummaryLabel"); | |||
if(label == null) | |||
return; | |||
label.innerHTML = '<div style="margin-bottom: 1px;">Standard-Zusammenfassungen: <select id="stdSummaries" onchange="onStdSummaryChange()"></select></div>' + label.innerHTML; | |||
requestComboFill('stdSummaries', 'Template:Stdsummaries'); | |||
} | |||
function onStdSummaryChange() | |||
{ | |||
var combo = document.getElementById("stdSummaries"); | |||
var value = combo.options[combo.selectedIndex].value; | |||
if(value != "") | |||
document.getElementById("wpSummary").value = value; | |||
} | |||
function fillPreloads() { | |||
if (document.getElementById("toolbar")==null) return; | |||
document.getElementById("toolbar").innerHTML += '<div style="position: absolute; margin-left: 255px;"><select id="stdPreloads" onchange="onPreloadChange()"></select></div>'; | |||
requestComboFill('stdPreloads', "Vorlage:Stdpreloads"); | |||
} | |||
function onPreloadChange() | |||
{ | |||
var combo = document.getElementById("stdPreloads"); | |||
var value = combo.options[combo.selectedIndex].value; | |||
if(value == "") | |||
return; | |||
value = "Vorlage:" + value + "/preload"; | |||
value = value.replace(" ", "_"); | |||
doPreload(value); | |||
} | |||
addOnloadHook(loadFunc); | |||