Benutzer:CF/monobook.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
| (22 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
revisionCounter.checkOnlyOnHistory = false; | revisionCounter.checkOnlyOnHistory = false; | ||
addOnloadHook(function() | |||
{ | |||
if(document.getElementById('toc')) | |||
{ | |||
var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; | |||
var toggleLink = document.getElementById('togglelink'); | |||
if ($j("span.showtoc").size()>0) | |||
{ | |||
if(toc.style.display != 'block') | |||
{ | |||
changeText(toggleLink, tocHideText); | |||
toc.style.display = 'block'; | |||
} | |||
} | |||
else if ($j("span.hidetoc").size()>0) | |||
{ | |||
if(toc.style.display != 'none') | |||
{ | |||
changeText(toggleLink, tocShowText); | |||
toc.style.display = 'none'; | |||
} | |||
} | |||
} | |||
}); | |||
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"); | |||
}); | |||
Aktuelle Version vom 30. September 2010, 00:27 Uhr
revisionCounter.checkOnlyOnHistory = false;
addOnloadHook(function()
{
if(document.getElementById('toc'))
{
var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
var toggleLink = document.getElementById('togglelink');
if ($j("span.showtoc").size()>0)
{
if(toc.style.display != 'block')
{
changeText(toggleLink, tocHideText);
toc.style.display = 'block';
}
}
else if ($j("span.hidetoc").size()>0)
{
if(toc.style.display != 'none')
{
changeText(toggleLink, tocShowText);
toc.style.display = 'none';
}
}
}
});
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");
});