Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
//Script and creator's comments are as follow
// <pre>
// [[User:S/tags.js]]
// <nowiki>
//
// Tags script by S (formerly known as Seed 2.0) - 
// uber-alpha hack
// heavily based on CleanupTab.js
// My thanks and major props go to AzaToth.
 
//requires:
//importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
//importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
 
if(typeof(autosubmit) == 'undefined') { var autosubmit = 'false'; }
if(typeof(minoredit) == 'undefined') { var minoredit = 'true'; }
if(typeof(show_cwli) == 'undefined') { var showcwli = 'false'; }
Date.monthNames = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ];
Date.prototype.getMonthName = function() { return Date.monthNames[ this.getMonth() ]; }
Date.prototype.getUTCMonthName = function() { return Date.monthNames[ this.getUTCMonth() ]; }

var reason=prompt("Reason?"," ");
var file=prompt("What file?", " ")
var why=prompt("Why?"," ")
var date=Date.UTC(day, month)

function doCleanup(n) {
	text = document.editform.wpTextbox1.value;
	date = new Date();
 
	switch(n) {
	case 'speedydel':
		text = '{' + '{' + 'Speedydelete|' + var reason '}}\n\n' + text;
		summary = 'Marked file for speedy deletion using [[en:User:S/tags|tags]]';
		break;
	case 'nosourcesince':
		text = '{' + '{' + 'no + source + since + |' + var date + '}}\n\n' + text;
		summary = 'Marked article as lacking a source using [[en:User:S/tags|tags]]';
		break;
	case 'superseeded':
		text = '{' + '{' + 'Superseeded|' + var file + '}}\n\n' + text;
		summary = 'Marked article as being superseeded using [[en:User:S/tags|tags]]';
		break;
	case 'vvs':
		text = '{' + '{' + '{{Vector + version + available + }}|' + var file + '}}\n\n' + text;
		summary = 'Marked article as having a vector version using [[en:User:S/tags|tags]]';
		break;
	case 'sourcefile':
		text = '{' + '{' + 'Source + file + please + '}}\n\n' + text;
		summary = 'Marked article as needing the source file using [[en:User:S/tags|tags]]';
		break;
	case 'globalize':
		text = '{' + '{' + 'Scriptuse + '}}\n\n' + text;
		summary = 'Marked article as being used by one or more scripts using [[en:User:S/tags|tags]]';
		break;
	case 'resume':
		text = '{' + '{' + 'cleanup + image|' + var why + '}}\n\n' + text;
		summary = 'Marked article as possibly being in violation of [[WP:COI|conflict of interest policy]] using [[User:S/tags|tags]]';
		break;
	case 'orphan':
		text = '{' + '{' + 'orphan|' + date.getUTCMonthName() + ' ' + date.getUTCFullYear() + '}}\n\n' + text;
		summary = 'Marked article as being orphaned using [[User:S/tags|tags]]';
		break;
	case 'subsections':
		text = '{' + '{' + 'Subsections' + '}' + '}\n\n' + text;
		summary = 'Marked article as needing subsections using [[User:S/tags|tags]]';
		break;
	case 'trivia':
		text = '{' + '{' + 'Trivia' + '}' + '}\n\n' + text;
		summary = 'Marked article as containing an inappropriate trivia section using [[User:S/tags|tags]]';
		break;
	case 'unreferenced':
		text = '{' + '{' + 'Unreferenced|date=' + date.getUTCMonthName() + ' ' + date.getUTCFullYear() + '}}\n\n' + text;
		summary = 'Marked article as not properly citing its sources using [[User:S/tags|tags]]';
		break;
	case 'wikify':
		text = '{' + '{' + 'wikify|' + date.getUTCMonthName() + ' ' + date.getUTCFullYear() + '}}\n\n' + text;
		summary = 'Marked article as needing wikification using [[User:S/tags|tags]]';
		break;
	case 'can we link it':
		window.location = "http://can-we-link-it.nickj.org/suggest-links/suggester.php?page=" + encodeURIComponent( wgPageName );
		break;
	}
	document.editform.wpSummary.value = summary;
	document.editform.wpTextbox1.value = text;
	if (minoredit == true) {
		document.editform.wpMinoredit.checked = true;
	}
 
	if (autosubmit == true) {
		document.editform.submit();
	}
}
 
$(function() {
		if ( wgCanonicalNamespace  in { "User":'', "User_talk":'' } ) {
			return;
		}
		if ( document.editform ) {
			var tabs = document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0];
			addlimenu(tabs, "tags", "tags" );
			mw.util.addPortletLink("tags", "javascript:doCleanup('abbr')", "abbr", "abbr", "Add abbreviations template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('confusing')", "confusing", "confusing", "Add confusing template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('copyedit')", "copyedit", "copyedit", "Add Copyedit template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('context')", "context", "context", "Add Context template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('cleanup')", "cleanup", "cleanup", "Add cleanup template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('globalize')", "globalize", "globalize", "Add Globalize template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('resume')", "resume", "resume", "Add Like-resume template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('orphan')", "orphan", "orphan", "Add orphan template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('subsections')", "subsections", "subsections", "Add Subsections template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('trivia')", "trivia", "trivia", "Add Trivia template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('unreferenced')", "unreferenced", "unreferenced", "Add unreferenced template", "");
			mw.util.addPortletLink("tags", "javascript:doCleanup('wikify')", "wikify", "wikify", "Add wikify template", "");
			if ( show_cwli == true ) {
				mw.util.addPortletLink("tags", "javascript:doCleanup('can we link it')", "can we link it", "can we link it", "Can we link it", ""); 
			}
 
 
		}
	});
 
// </nowiki>
// </pre>