Jump to content

User:Glaisher/messages.js: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
updated TemplateScript
updated scripts
Line 2: Line 2:
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* @see https://meta.wikimedia.org/wiki/TemplateScript
* @see https://meta.wikimedia.org/wiki/TemplateScript
* @update-token [[File:pathoschild/templatescript.js]]
*/
*/
// <pre>
// <nowiki>
$.getScript('//tools.wmflabs.org/meta/scripts/pathoschild.templatescript.js', function() {
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
pathoschild.TemplateScript.AddWith(
pathoschild.TemplateScript.add(
{category:'Being nice', forActions: 'edit', autoSubmit:'true', forNamespaces:3},
[
[
{ name: 'welcome', template: '{{subst:welcome}}~~~~', editSummary: 'Welcome!'},
{ name: 'welcome', template: '{{subst:welcome}}~~~~', editSummary: 'Welcome!'},
{ name: 'Test1', template: '{{subst:Test1}}~~~~', editSummary: 'notify: Test'},
{ name: 'Test1', template: '{{subst:Test1}}~~~~', editSummary: 'notify: Test' },
{ name: 'Test2', template: '{{subst:Test2}}~~~~', editSummary: 'notify: Unconstructive edits'},
{ name: 'Test2', template: '{{subst:Test2}}~~~~', editSummary: 'notify: Unconstructive edits' },
{ name: 'Vandalism', template: '{{subst:Test3}}~~~~', editSummary: 'warn: Vandalism'},
{ name: 'Vandalism', template: '{{subst:Test3}}~~~~', editSummary: 'warn: Vandalism' },
{ name: 'Vandalism: LW', template: '{{subst:Test4}}~~~~', editSummary: 'last warning: Vandalism'},
{ name: 'Vandalism: LW', template: '{{subst:Test4}}~~~~', editSummary: 'last warning: Vandalism' },
{ name: 'Blatant vandal', template: '{{subst:Bv}}', editSummary: 'warning: Blatant vandalism'},
{ name: 'Blatant vandal', template: '{{subst:Bv}}', editSummary: 'warning: Blatant vandalism' },
{ name: 'Personal attack', template: '{{subst:Attack}}~~~~', editSummary: 'warning: Personal attacks'},
{ name: 'Personal attack', template: '{{subst:Attack}}~~~~', editSummary: 'warning: Personal attacks' },
{ name: 'Spam', template: '{{subst:Spam}}', editSummary: 'warning: Spamming' },
{ name: 'Spam', template: '{{subst:Spam}}', editSummary: 'warning: Spamming' },
{ name: 'Offtopic-page', template: '{{subst:Offtopic}}', editSummary: 'offtopic page', },
{ name: 'Offtopic-page', template: '{{subst:Offtopic}}', editSummary: 'offtopic page', },
{ name: 'Offtopic-edit', template: '{{subst:Offtopic-edits}}', editSummary: 'Offtopic-edits'},
{ name: 'Offtopic-edit', template: '{{subst:Offtopic-edits}}', editSummary: 'Offtopic-edits' },
{ name: 'del.-Userpage', template: '{{subst:Deleted userpage}}', editSummary: 'Userpage deleted'},
{ name: 'del.-Userpage', template: '{{subst:Deleted userpage}}', editSummary: 'Userpage deleted' },
]
],
{ category:'Being nice', forActions: 'edit', autoSubmit:'true', forNamespaces:3 }
);
);
});
});
// </nowiki>

Revision as of 03:09, 18 August 2015

/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:pathoschild/templatescript.js]]
 */
// <nowiki>
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
	pathoschild.TemplateScript.add(
		[
			{ name: 'welcome', template: '{{subst:welcome}}~~~~', editSummary: 'Welcome!'},
			{ name: 'Test1', template: '{{subst:Test1}}~~~~', editSummary: 'notify: Test' },
			{ name: 'Test2', template: '{{subst:Test2}}~~~~', editSummary: 'notify: Unconstructive edits' },
			{ name: 'Vandalism', template: '{{subst:Test3}}~~~~', editSummary: 'warn: Vandalism' },
			{ name: 'Vandalism: LW', template: '{{subst:Test4}}~~~~', editSummary: 'last warning: Vandalism' },
			{ name: 'Blatant vandal', template: '{{subst:Bv}}', editSummary: 'warning: Blatant vandalism' },
			{ name: 'Personal attack', template: '{{subst:Attack}}~~~~', editSummary: 'warning: Personal attacks' },
			{ name: 'Spam', template: '{{subst:Spam}}', editSummary: 'warning: Spamming' },
			{ name: 'Offtopic-page', template: '{{subst:Offtopic}}', editSummary: 'offtopic page', },
			{ name: 'Offtopic-edit', template: '{{subst:Offtopic-edits}}', editSummary: 'Offtopic-edits' },
			{ name: 'del.-Userpage', template: '{{subst:Deleted userpage}}', editSummary: 'Userpage deleted' },
		],
		{ category:'Being nice', forActions: 'edit', autoSubmit:'true', forNamespaces:3 }
	);
});
// </nowiki>