CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 7: | Zeile 7: | ||
var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; | var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; | ||
var toggleLink = document.getElementById('togglelink'); | var toggleLink = document.getElementById('togglelink'); | ||
if ($("span.showtoc").size()>0) | if ($j("span.showtoc").size()>0) | ||
{ | { | ||
if(toc.style.display != 'block') | if(toc.style.display != 'block') | ||
| Zeile 15: | Zeile 15: | ||
} | } | ||
} | } | ||
else if ($("span.hidetoc").size()>0) | else if ($j("span.hidetoc").size()>0) | ||
{ | { | ||
if(toc.style.display != 'none') | if(toc.style.display != 'none') | ||
| Zeile 28: | Zeile 28: | ||
addOnloadHook(function() | addOnloadHook(function() | ||
{ | { | ||
$("select[name='Auswahl']").each(function(i) | $j("select[name='Auswahl']").each(function(i) | ||
{ | { | ||
this.onchange = function() | this.onchange = function() | ||
{ | { | ||
if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B') | if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B') | ||
$.get('http://www.stargate-wiki.de/w/api.php?action=query&format=json&titles='+encodeURIComponent(wgPageName)+'&prop=revisions&meta=siteinfo|allmessages&ammessages=jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec', | $j.get('http://www.stargate-wiki.de/w/api.php?action=query&format=json&titles='+encodeURIComponent(wgPageName)+'&prop=revisions&meta=siteinfo|allmessages&ammessages=jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec', | ||
function(data) | function(data) | ||
{ | { | ||
| Zeile 47: | Zeile 47: | ||
}); | }); | ||
//Gelöschte Seiten auf Existenz überprüfen: | |||
addOnloadHook(function() | |||
{ | |||
var s=$j(".geloeschteSeite").map(function(){return this.title;}).get().join("|"); | |||
if (s != "") | |||
$j.get(wgServer+wgScriptPath+"/api.php?action=query&prop=info&format=json&titles="+encodeURIComponent(s), function(x) | |||
{ | |||
for (a in x.query.pages) | |||
if (x.query.pages[a].missing !== "") | |||
{ | |||
var s = x.query.pages[a].title | |||
if (typeof x.query.normalized != "undefined") | |||
for (n in x.query.normalized) | |||
if (x.query.normalized[n].to === s) | |||
s = x.query.normalized[n].from; | |||
$j('.geloeschteSeite[title="'+s+'"]').css("color", "green"); | |||
} | |||
}, "json"); | |||
}); | |||