Test beendet |
Keine Bearbeitungszusammenfassung |
||
| Zeile 31: | Zeile 31: | ||
document.getElementById('ca-move').style.display = "none"; | document.getElementById('ca-move').style.display = "none"; | ||
});} | });} | ||
//Zum Testen | |||
$(function() | |||
{ | |||
$("select[name='DDSelect-423073468']").each(function(i) | |||
{ | |||
this.onchange = function() | |||
{ | |||
if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B') | |||
$.get(wgServer+wgScriptPath+'/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) | |||
{ | |||
if ("string" == typeof data) | |||
data = JSON.parse(data); | |||
var x = data.query.pages[wgArticleId].revisions[0].timestamp.split(/[- :TZ]/); | |||
var zeit = | |||
new Date(Date.UTC(x[0], x[1]-1, x[2], x[3], x[4], x[5])+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+"}"+"}", '', ''); | |||
var z = document.getElementById("wpSummary").value; | |||
if (z !== "") | |||
if (z.substring((z.length - 3)) == "*/ ") | |||
var c = ""; | |||
else | |||
var c = ", "; | |||
else | |||
var c = ""; | |||
if (z.substring((z.length - 16)) != "Signaturnachtrag") | |||
document.getElementById("wpSummary").value += c+"Signaturnachtrag"; | |||
}, '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; | |||
}; | |||
}); | |||
}); | |||