Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Wikipedia:WikiProject User scripts/Scripts/Welcome user

From Wikipedia, the free encyclopedia
// <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();
}
 
$.when($.ready, mw.loader.using('mediawiki.util')).then(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) {
     mw.util.addPortletLink("p-cactions", "javascript:doQwelcome()", "welcome", "ca-welcome", "Welcome user", "");
  }
});
 
// by [[User:Jj137|jj137]]
//