User:逆襲的天邪鬼/Twinkle-lzh/twinklewarn.js: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 146:
 
Twinkle.warn.callbacks = {
getWarningWikitext: function(templateName, article, reason, isCustom) {
var text = "{{subst:" + templateName;
 
Line 154:
}
 
if (reason && !isCustom) {
// we assume that custom warnings lack a {{{2}}} parameter
text += "|2=" + reason;
Line 168:
 
templatetext = Twinkle.warn.callbacks.getWarningWikitext(templatename, linkedarticle,
form.reason.value, form.main_group.value === 'custom');
 
form.previewer.beginRender(templatetext);
Line 200:
}
text += Twinkle.warn.callbacks.getWarningWikitext(params.sub_group, params.article,
params.reason, params.main_group === 'custom') + "--~~~~";
 
if ( Twinkle.getPref('showSharedIPNotice') && Morebits.isIPAddress( mw.config.get('wgTitle') ) ) {