|
|
| Zeile 31: |
Zeile 31: |
| document.getElementById('ca-move').style.display = "none"; | | document.getElementById('ca-move').style.display = "none"; |
| });} | | });} |
|
| |
| //Zum Testen
| |
| $(function()
| |
| {
| |
| $("select[name^='DDSelect-']").each(function(i)
| |
| {
| |
| this.onchange = function()
| |
| {
| |
| if (this.options[this.options.selectedIndex].value == '%7b%7b%73%75%62%73%74%3a%49%50%2d%53%69%67%6e%61%74%75%72%6e%61%63%68%74%72%61%67%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;
| |
| };
| |
| });
| |
| });
| |