Benutzer:CF/monobook.js: Unterschied zwischen den Versionen
aus Stargate Wiki, dem deutschsprachigen Stargate-Lexikon
Weitere Optionen
CF (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
| 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 50: | Zeile 50: | ||
addOnloadHook(function() | addOnloadHook(function() | ||
{ | { | ||
var s=$(".geloeschteSeite").map(function(){return this.title;}).get().join("|"); | var s=$j(".geloeschteSeite").map(function(){return this.title;}).get().join("|"); | ||
if (s != "") | if (s != "") | ||
$.get(wgServer+wgScriptPath+"/api.php?action=query&prop=info&format=json&titles="+encodeURIComponent(s), function(x) | $j.get(wgServer+wgScriptPath+"/api.php?action=query&prop=info&format=json&titles="+encodeURIComponent(s), function(x) | ||
{ | { | ||
for (a in x.query.pages) | for (a in x.query.pages) | ||
| Zeile 62: | Zeile 62: | ||
if (x.query.normalized[n].to === s) | if (x.query.normalized[n].to === s) | ||
s = x.query.normalized[n].from; | s = x.query.normalized[n].from; | ||
$('.geloeschteSeite[title="'+s+'"]').css("color", "green"); | $j('.geloeschteSeite[title="'+s+'"]').css("color", "green"); | ||
} | } | ||
}, "json"); | }, "json"); | ||
}); | }); | ||