CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
CF (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
| Zeile 26: | Zeile 26: | ||
}); | }); | ||
function | addOnloadHook(function() | ||
{ | { | ||
if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B') | $("select[name='Auswahl']").each(function(i) | ||
{ | |||
this.onchange = function() | |||
{ | |||
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; | |||
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='+urlencode(wgPageName)+'&prop=revisions&meta=siteinfo|allmessages&ammessages=jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec', | |||
function(data) | function(data) | ||
{ | { | ||
| Zeile 37: | Zeile 43: | ||
document.getElementById("wpTextbox1").firstChild.nodeValue.replace(/\{\{subst:IP-Signaturnachtrag\|\|\|\}\}/, "--[[Spezial:Beiträge/"+data.query.pages[wgArticleId].revisions.user+"|"+data.query.pages[wgArticleId].revisions.user+"]], "+wgUser+" <small>(Signatur nachgetragen von [[Benutzer:{{{3}}}|{{{3}}}]])</small>"); | document.getElementById("wpTextbox1").firstChild.nodeValue.replace(/\{\{subst:IP-Signaturnachtrag\|\|\|\}\}/, "--[[Spezial:Beiträge/"+data.query.pages[wgArticleId].revisions.user+"|"+data.query.pages[wgArticleId].revisions.user+"]], "+wgUser+" <small>(Signatur nachgetragen von [[Benutzer:{{{3}}}|{{{3}}}]])</small>"); | ||
}, 'json'); | }, 'json'); | ||
}; | }; | ||
}); | }); | ||
}); | }); | ||