14,091
edits
m (1 revision imported) |
m (1 revision imported) |
||
(One intermediate revision by the same user not shown) | |||
Line 36: | Line 36: | ||
Twinkle.welcome.semiauto = function() { | Twinkle.welcome.semiauto = function() { | ||
Twinkle.welcome.callback( mw.config.get( ' | Twinkle.welcome.callback( mw.config.get( 'wgRelevantUserName' ) ); | ||
}; | }; | ||
Line 86: | Line 86: | ||
} | } | ||
if( mw.config.get( 'wgNamespaceNumber' ) === 3 ) { | if( mw.config.get( 'wgNamespaceNumber' ) === 3 ) { | ||
var username = mw.config.get( 'wgTitle' ).split( '/' )[0].replace( / | var username = mw.config.get( 'wgTitle' ).split( '/' )[0].replace( /"/, "\\\""); // only first part before any slashes | ||
Twinkle.addPortletLink( function(){ Twinkle.welcome.callback(username); }, "Wel", "friendly-welcome", "Welcome user" ); | Twinkle.addPortletLink( function(){ Twinkle.welcome.callback(username); }, "Wel", "friendly-welcome", "Welcome user" ); | ||
} | } | ||
Line 129: | Line 129: | ||
event: Twinkle.welcome.populateWelcomeList, | event: Twinkle.welcome.populateWelcomeList, | ||
list: [ | list: [ | ||
{ type: 'option', value: 'standard', label: 'Standard welcomes', selected: ! | { type: 'option', value: 'standard', label: 'Standard welcomes', selected: !mw.util.isIPAddress(mw.config.get('wgTitle')) }, | ||
{ type: 'option', value: 'anonymous', label: 'IP user welcomes', selected: | { type: 'option', value: 'anonymous', label: 'IP user welcomes', selected: mw.util.isIPAddress(mw.config.get('wgTitle')) }, | ||
{ type: 'option', value: 'wikiProject', label: 'WikiProject welcomes' }, | { type: 'option', value: 'wikiProject', label: 'WikiProject welcomes' }, | ||
{ type: 'option', value: 'nonEnglish', label: 'Non-English welcomes' } | { type: 'option', value: 'nonEnglish', label: 'Non-English welcomes' } | ||
Line 248: | Line 248: | ||
container.append({ type: 'header', label: 'WikiProject-specific welcome templates' }); | container.append({ type: 'header', label: 'WikiProject-specific welcome templates' }); | ||
appendTemplates([ | appendTemplates([ | ||
"welcome-anatomy", | |||
"welcome-athletics", | |||
"welcome-au", | "welcome-au", | ||
"welcome-bd", | "welcome-bd", | ||
Line 355: | Line 357: | ||
description: "welcome message with clear, annotated table of 10 links", | description: "welcome message with clear, annotated table of 10 links", | ||
linkedArticle: false, | linkedArticle: false, | ||
syntax: "$HEADER$ {{subst:welcome-screen | syntax: "$HEADER$ {{subst:welcome-screen}}" | ||
}, | }, | ||
"welcome-belated": { | "welcome-belated": { | ||
Line 466: | Line 468: | ||
// WIKIPROJECT-SPECIFIC WELCOMES | // WIKIPROJECT-SPECIFIC WELCOMES | ||
"welcome-anatomy": { | |||
description: "welcome for users with an apparent interest in anatomy topics", | |||
linkedArticle: false, | |||
syntax: "{{subst:welcome-anatomy}} ~~~~" | |||
}, | |||
"welcome-athletics": { | |||
description: "welcome for users with an apparent interest in athletics (track and field) topics", | |||
linkedArticle: false, | |||
syntax: "{{subst:welcome-athletics}}" | |||
}, | |||
"welcome-au": { | "welcome-au": { | ||
description: "welcome for users with an apparent interest in Australia topics", | description: "welcome for users with an apparent interest in Australia topics", | ||
Line 584: | Line 596: | ||
description: "invite the user to The Wikipedia Adventure (not a welcome template)", | description: "invite the user to The Wikipedia Adventure (not a welcome template)", | ||
linkedArticle: false, | linkedArticle: false, | ||
syntax: "{{WP:TWA/ | syntax: "{{WP:TWA/InviteTW|signature=~~~~}}" | ||
}, | }, | ||
Line 717: | Line 729: | ||
previewDialog.display(); | previewDialog.display(); | ||
$(submit).click(function( | $(submit).click(function() { | ||
previewDialog.close(); | previewDialog.close(); | ||
}); | }); |