User:Thisisborin9/WPLAKERSnewsletter.js

// // If you are editing a user talk page, click the send Lakers/News button on your tab bar to add "== WikiProject Los Angeles Lakers Newsletter for ,  == " to the top, set "--> deliver WP LAKERS newsletter" as the edit summary, mark it as a minor edit, and submit. function doSwp { document.editform.wpTextbox1.value = '{' + '{' + 'subst:Wikipedia:WikiProject Los Angeles Lakers/Newsletter}}' + ' ' +  +  + document.editform.wpTextbox1.value; document.editform.wpSummary.value = 'WikiProject Los Angeles Lakers Newsletter {' + '{subst:CURRENTMONTHNAME}} {' + '{subst:CURRENTDAY}}, {' + '{subst:CURRENTYEAR}}'; document.editform.wpMinoredit.checked = true; document.editform.submit; } $(function { if (wgNamespaceNumber == 0 || wgCanonicalNamespace == "Talk" || wgCanonicalNamespace == "User" || wgCanonicalNamespace == "Wikipedia" || wgCanonicalNamespace == "Wikipedia_talk" || wgCanonicalNamespace == "Image" || wgCanonicalNamespace == "Image_talk" || wgCanonicalNamespace == "MediaWiki" || wgCanonicalNamespace == "MediaWiki_talk" || wgCanonicalNamespace == "Template" || wgCanonicalNamespace == "Template_talk" || wgCanonicalNamespace == "Help" || wgCanonicalNamespace == "Help_talk" || wgCanonicalNamespace == "Category" || wgCanonicalNamespace == "Category_talk") {     // wouldn't it make more sense to just check for wgCanonicalNamespace != "", or am I missing something?     return;  }  if (document.editform) {     mw.util.addPortletLink("p-cactions", "javascript:doSwp", "send newsletter", "ca-news", "Send Lakers newsletter", "");  } }); // by Me // Designed only for the "new section" button on the top of a talk page