CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
| (20 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 24: | Zeile 24: | ||
} | } | ||
} | } | ||
}); | |||
addOnloadHook(function() | |||
{ | |||
$j("select[name='Auswahl']").each(function(i) | |||
{ | |||
this.onchange = function() | |||
{ | |||
if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B') | |||
$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) | |||
{ | |||
var zeit = | |||
new Date(Date.parse(data.query.pages[wgArticleId].revisions[0].timestamp)+data.query.general.timeoffset*60*1000); | |||
insertTags("{"+"{"+"subst:"+(data.query.pages[wgArticleId].revisions[0].anon===''?"IP-":"")+"Signaturnachtrag|"+data.query.pages[wgArticleId].revisions[0].user+"|"+(zeit.getUTCHours()<10?"0":"")+zeit.getUTCHours()+":"+(zeit.getUTCMinutes()<10?"0":"")+zeit.getUTCMinutes()+", "+zeit.getUTCDate()+". "+data.query.allmessages[zeit.getUTCMonth()]["*"]+" "+zeit.getUTCFullYear()+" (CE"+(data.query.general.timeoffset==120?"S":"")+"T)|"+wgUserName+"}"+"}", '', ''); | |||
}, 'json'); | |||
else | |||
insertTags(unescape(this.options[this.options.selectedIndex].value).split('+')[0],unescape(this.options[this.options.selectedIndex].value).split('+')[1],unescape(this.options[this.options.selectedIndex].value).split('+')[2]); | |||
this.options.selectedIndex=0; | |||
}; | |||
}); | |||
}); | |||
//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"); | |||
}); | }); | ||