User:Thisisborin9/WPLAKERSnewsletter.js
Appearance
(Redirected from User:Thisisborin9/WPLAKERSnewsletter)
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
This user script seems to have a documentation page at User:Thisisborin9/WPLAKERSnewsletter. |
// <pre><nowiki>
// <nowiki>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 {{subst:CURRENTMONTHNAME}} {{subst:CURRENTDATE}}, {{subst:CURRENTYEAR}} == <br /> {{subst:Wikipedia:WikiProject Los Angeles Lakers/Newsletter}}" to the top, set "--> deliver WP LAKERS newsletter" as the edit summary, mark it as a minor edit, and submit.</nowiki>
function doSwp() {
document.editform.wpTextbox1.value = '{' + '{' + 'subst:Wikipedia:WikiProject Los Angeles Lakers/Newsletter}}' + '<br />' + '~~' + '~~' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = '[[Wikipedia:LAKERS|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