Wikipedia:WikiProject User scripts/Scripts/Welcome user
Appearance
// <pre><nowiki>
// <nowiki>If you are editing a page, click the welcome button on your tab bar to add "{{subst:welcome}} ~~~~" to the top, set "Welcome to Wikipedia!" as the edit summary, and submit.</nowiki>
function doQwelcome() {
document.editform.wpTextbox1.value = '{' + '{' + 'subst:welcome' + '}' + '}' + ' ~~' + '~~\n\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = 'Welcome to Wikipedia!';
document.editform.wpMinoredit.checked = false;
document.editform.submit();
}
addOnloadHook(function() {
if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "Talk" || mw.config.get('wgCanonicalNamespace') == "Main" || mw.config.get('wgCanonicalNamespace') == "Wikipedia" || mw.config.get('wgCanonicalNamespace') == "Wikipedia_talk" || mw.config.get('wgCanonicalNamespace') == "Image" || mw.config.get('wgCanonicalNamespace') == "Image_talk" || mw.config.get('wgCanonicalNamespace') == "MediaWiki" || mw.config.get('wgCanonicalNamespace') == "MediaWiki_talk" || mw.config.get('wgCanonicalNamespace') == "Template" || mw.config.get('wgCanonicalNamespace') == "Template_talk" || mw.config.get('wgCanonicalNamespace') == "Help" || mw.config.get('wgCanonicalNamespace') == "Help_talk" || mw.config.get('wgCanonicalNamespace') == "Category" || mw.config.get('wgCanonicalNamespace') == "Category_talk" || mw.config.get('wgCanonicalNamespace') == "Portal" || mw.config.get('wgCanonicalNamespace') == "Portal_talk") {
return;
}
if (document.editform) {
addPortletLink("p-cactions", "javascript:doQwelcome()", "welcome", "ca-welcome", "Welcome user", "");
}
});
// by [[User:Jj137|jj137]]
//