User:PiRSquared17/friendlytag.js

From Simple English Wikipedia, the free encyclopedia

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// <nowiki>
// If FriendlyConfig aint exist.
if( typeof( FriendlyConfig ) == 'undefined' ) {
	FriendlyConfig = {};
}
 
/**
 FriendlyConfig.summaryAd ( string )
 If ad should be added or not to summary, default [[WP:FRIENDLY|Friendly]]
 */
if( typeof( FriendlyConfig.summaryAd ) == 'undefined' ) {
	FriendlyConfig.summaryAd = " ([[WP:TW|TW]])";
}
 
/**
 FriendlyConfig.groupByDefault ( boolean )
 */
if( typeof( FriendlyConfig.groupByDefault ) == 'undefined' ) {
	FriendlyConfig.groupByDefault = true;
}
 
/**
 FriendlyConfig.watchTaggedPages ( boolean )
 */
if( typeof( FriendlyConfig.watchTaggedPages ) == 'undefined' ) {
	FriendlyConfig.watchTaggedPages = true;
}
 
/**
 FriendlyConfig.markTaggedPagesAsMinor ( boolean )
 */
if( typeof( FriendlyConfig.markTaggedPagesAsMinor ) == 'undefined' ) {
	FriendlyConfig.markTaggedPagesAsMinor = true;
}
 
/**
 FriendlyConfig.markTaggedPagesAsPatrolled ( boolean )
 */
if( typeof( FriendlyConfig.markTaggedPagesAsPatrolled ) == 'undefined' ) {
	FriendlyConfig.markTaggedPagesAsPatrolled = true;
}
 
var isRedirect = false;
 
function friendlytag() {
	if( QueryString.exists( 'redirect' ) && QueryString.get( 'redirect' ) == 'no' && !QueryString.exists( 'rcid' ) ) {
		isRedirect = true;
		mw.util.addPortletLink( 'p-cactions', "javascript:friendlytag.callback()", "Tag", "friendly-tag", "Tag redirect", "");
	} else if( wgCurRevisionId == false ) {
		return;
	} else {
		mw.util.addPortletLink( 'p-cactions', "javascript:friendlytag.callback()", "Tag", "friendly-tag", "Tag article", "");
	}
}
 
$(friendlytag);
 
friendlytag.callback = function friendlytagCallback( uid ) {
	var Window = new SimpleWindow( 600, 400 );
	var form = new QuickForm( friendlytag.callback.evaluate );
 
	if( !isRedirect ) {
		Window.setTitle( "Article maintenance tagging" );
 
		form.append( {
				type: 'checkbox',
				list: [
					{
						label: 'Group into {{multiple issues}} if possible',
						value: 'group',
						name: 'group',
						tooltip: 'If applying three or more templates supported by {{multiple issues}} and this box is checked, all supported templates will be grouped into a single {{multiple issues}} template.',
						checked: FriendlyConfig.groupByDefault
					}
				]
			}
		);
 
		form.append( { type:'submit' } );
 
		form.append( { type:'header', label:'Maintenance templates' } );
		form.append( { type:'checkbox', name: 'maintenance', list: friendlytag.maintenanceList } );
 
		form.append( { type:'header', label:'Problem templates' } );
		form.append( { type:'checkbox', name: 'problem', list: friendlytag.problemList } );
 
		form.append( { type:'header', label:'Notice templates' } );
		form.append( { type:'checkbox', name: 'notice', list: friendlytag.noticeList } );
 
		if( typeof( FriendlyConfig.customTagList ) == 'object' ) {
			form.append( { type:'header', label:'Custom templates' } );
			form.append( { type: 'checkbox', name: 'custom', list: FriendlyConfig.customTagList } );
		}
	} else {
		Window.setTitle( "Redirect tagging" );
 
		form.append( { type:'submit' } );
 
		form.append( { type:'header', label:'Spelling, misspelling, tense and capitalization templates' } );
		form.append( { type:'checkbox', name: 'spelling', list: friendlytag.spellingList } );
 
		form.append( { type:'header', label:'Alternative name templates' } );
		form.append( { type:'checkbox', name: 'alternative', list: friendlytag.alternativeList } );
 
		form.append( { type:'header', label:'Miscellaneous and administrative redirect templates' } );
		form.append( { type:'checkbox', name: 'administrative', list: friendlytag.administrativeList } );
	}
 
	form.append( { type:'submit' } );
 
	var result = form.render();
	Window.setContent( result );
	Window.display();
}
 
friendlytag.maintenanceList = [
	{
		label: '\{\{cleanup\}\}: article may require cleanup',
		value: 'cleanup'
	},
	{
		label: '\{\{complex\}\}: article needs to be simplified',
		value: 'complex'
	},
	{
		label: '\{\{copyedit\}\}: article needs copy editing for grammar, style, cohesion, tone, and/or spelling',
		value: 'copyedit'
	},
	{
		label: '\{\{dead end\}\}: article has few or no links to other articles',
		value: 'dead end'
	},
	{
		label: '\{\{essay-like\}\}: article is written like an essay and needs cleanup',
		value: 'essay-like'
	},
	{
		label: '\{\{expand\}\}: article needs expansion',
		value: 'expand' 
	},
	{
		label: '\{\{expert\}\}: article needs attention from an expert on the subject',
		value: 'expert'
	},
	{
		label: '\{\{fansite\}\}: article  resembles a fansite',
		value: 'fansite'
	},
	{
		label: '\{\{in-universe\}\}: article subject is fictional and needs rewriting from a non-fictional perspective',
		value: 'in-universe'
	},
	{
		label: '\{\{lead missing\}\}: article has no lead section and one should be written',
		value: 'lead missing'
	},
	{
		label: '\{\{lead too short\}\}: article lead section is too short and should be expanded',
		value: 'lead too short'
	},
	{
		label: '\{\{nofootnotes\}\}: article has references, but no in-text citations',
		value: 'nofootnotes'
	},
	{
		label: '\{\{orphan\}\}: article has few or no other articles that link to it',
		value: 'orphan' 
	},
	{
		label: '\{\{plot\}\}: plot summary in article is too long',
		value: 'plot' 
	},
	{
		label: '\{\{prose\}\}: article is in a list format that may be better presented using prose',
		value: 'prose'
	},
	{
		label: '\{\{pov-check\}\}: nominate article to be checked for neutrality',
		value: 'pov-check'
	},
	{
		label: '\{\{sections\}\}: article needs to be broken into sections',
		value: 'sections'
	},
	{
		label: '\{\{uncategorized\}\}: article is uncategorized',
		value: 'uncategorized'
	},
	{
		label: '\{\{verylong\}\}: article is too long',
		value: 'verylong'
	},
	{
		label: '\{\{wikify\}\}: article needs to be wikified',
		value: 'wikify'
	}
];
 
 
friendlytag.problemList = [
	{
		label: '\{\{advertisement\}\}: article is written like an advertisement',
		value: 'advertisement'
	},
	{
		label: '\{\{autobiography\}\}: article is an autobiography and may not be of NPOV',
		value: 'autobiography'
	},
	{
		label: '\{\{context\}\}: article provides insufficient context',
		value: 'context'
	},
	{
		label: '\{\{disputed\}\}: article has questionable factual accuracy',
		value: 'disputed'
	},
	{
		label: '\{\{external links\}\}: article\'s external links may not follow content policies or guidelines',
		value: 'external links'
	},
	{
		label: '\{\{globalize\}\}: article may not represent a worldwide view of the subject',
		value: 'globalize',
	},
	{
		label: '\{\{hoax\}\}: article may be a complete hoax',
		value: 'hoax'
	},
	{
		label: '\{\{notability\}\}: article\'s subject may not meet the notability guideline',
		value: 'notability',
	},
	{
		label: '\{\{npov\}\}: article does not maintain a neutral point of view',
		value: 'npov'
	},
	{
		label: '\{\{one source\}\}: article relies largely or entirely upon a single source',
		value: 'one source'
	},
	{
		label: '\{\{original research\}\}: article has original research or unverified claims',
		value: 'original research'
	},
	{
		label: "\{\{redlinks\}\}: article has many  red links",
		value: "redlinks"
	},
	{ 
		label: '\{\{refimprove\}\}: article needs additional references or sources for verification',
		value: 'refimprove' 
	},
	{
		label: '\{\{unencyclopedic\}\}: article contains unencyclopedic material',
		value: 'unencyclopedic'
	},
	{
		label: '\{\{unreferenced\}\}: article has no references at all',
		value: 'unreferenced'
	},
	{
		label: '\{\{unreferencedBLP\}\}: BLP article has no references at all',
		value: 'unreferencedBLP'
	},
	{
		label: '\{\{update\}\}: article information is out of date',
		value: 'update'
	},
	{
		label: '\{\{weasel\}\}: article quality may be compromised by the use of weasel words',
		value: 'weasel'
	}
];
 
friendlytag.noticeList = [
	{
		label: '\{\{current\}\}: article documents a current event',
		value: 'current',
		subgroup: {
			name: 'current',
			type: 'select',
			list: [
				{
					label: "\{\{current\}\}: article documents a current event",
					value: "current"
				},
				{
					label: "\{\{recent death\}\}: article is about a person who has recently died",
					value: "recent death"
				}
			]
		}
	},
	{
		label: '\{\{inuse\}\}: article is undergoing a major edit for a short while',
		value: 'inuse' },
	{
		label: '\{\{simplifying\}\}: article is being simplified',
		value: 'simplifying' },
];
 
 
friendlytag.spellingList = [
	{
		label: '\{\{R from abbreviation\}\}: redirect from a title with an abbreviation',
		value: 'R from abbreviation' 
	},
	{
		label: '\{\{R to list entry\}\}: redirect to a \"list of minor entities\"-type article which is a collection of brief descriptions for subjects not notable enough to have separate articles',
		value: 'R to list entry' 
	},
	{
		label: '\{\{R to section\}\}: sames as \{\{R to list entry\}\}, but when list is more sectionlike in organization, such as list of fictional characters in a fictional universe.',
		value: 'R to section' 
	},
	{
		label: '\{\{R from misspelling\}\}: redirect from a misspelling or typographical error',
		value: 'R from misspelling' 
	},
	{
		label: '\{\{R from alternative spelling\}\}: redirect from a title with a different spelling',
		value: 'R from alternative spelling' 
	},
	{
		label: '\{\{R from plural\}\}: redirect from a plural word to the singular equivalent',
		value: 'R from plural' 
	},
	{
		label: '\{\{R from related word\}\}: redirect from a related word',
		value: 'R from related word' 
	},
	{
		label: '\{\{R with possibilities\}\}: redirect from a title for a topic more detailed than what is currently provided on the target page, or section of that page, hence something which can and should be expanded',
		value: 'R with possibilities' 
	},
	{
		label: '\{\{R from member\}\}: redirect from a person who is a member of a group to more general related topics, such as the group, organization, ensemble or team that he or she belongs to',
		value: 'R from member' 
	},
	{
		label: '\{\{R from other capitalisation\}\}: redirect from a title with another method of capitalisation',
		value: 'R from other capitalisation'
	}
];
 
friendlytag.alternativeList = [
	{
		label: '\{\{R from alternative name\}\}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym',
		value: 'R from alternative name' 
	},
	{
		label: '\{\{R from full name\}\}: redirect from a title that is a complete or more complete name',
		value: 'R from full name' 
	},
	{
		label: '\{\{R from surname\}\}: redirect from a title that is a surname',
		value: 'R from surname' 
	},
	{
		label: '\{\{R from historic name\}\}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym that has a significant historic past as a region, state, principate\'s holding, city, city-state or such, but which region has been subsumed into a modern era municipality, district or state, or otherwise suffered from a name change over time',
		value: 'R from historic name' 
	},
	{
		label: '\{\{R from scientific name\}\}: redirect from the scientific name to the common name',
		value: 'R from scientific name' 
	},
	{
		label: '\{\{R to scientific name\}\}: redirect from the common name to the scientific name',
		value: 'R to scientific name' 
	},
	{
		label: '\{\{R from name and country\}\}: redirect from the specific name to the briefer name',
		value: 'R from name and country' 
	},
	{
		label: '\{\{R from alternative language\}\}: redirect from an English name to a name in another language, or vice-versa',
		value: 'R from alternative language' 
	},
	{
		label: '\{\{R from ASCII\}\}: redirect from a title in basic ASCII to the formal article title, with differences that are not diacritical marks (accents, umlauts, etc.)',
		value: 'R from ASCII' 
	},
	{
		label: '\{\{R from title without diacritics\}\}: redirect to the article title with diacritical marks (accents, umlauts, etc.)',
		value: 'R from title without diacritics'
	}
];
 
friendlytag.administrativeList = [
	{
		label: '\{\{R from merge\}\}: redirect from a merged page in order to preserve its edit history',
		value: 'R from merge' 
	},
	{
		label: '\{\{R to disambiguation page\}\}: redirect to a disambiguation page',
		value: 'R to disambiguation page' 
	},
	{
		label: '\{\{R from duplicated article\}\}: redirect to a similar article in order to preserve its edit history',
		value: 'R from duplicated article' 
	},
	{
		label: '\{\{R to decade\}\}: redirect from a year to the decade article',
		value: 'R to decade' 
	},
	{
		label: '\{\{R from shortcut\}\}: redirect from a Wikipedia shortcut',
		value: 'R from shortcut' 
	},
	{
		label: '\{\{R from CamelCase\}\}: redirect from a CamelCase title',
		value: 'R from CamelCase' 
	},
	{
		label: '\{\{R from EXIF\}\}: redirect of a wikilink created from JPEG EXIF information (i.e. the \"metadata\" section on some image description pages)',
		value: 'R from EXIF' 
	},
	{
		label: '\{\{R from school\}\}: redirect from a school article that had very little information',
		value: 'R from school'
	}
];
 
// Set to true if template can be grouped into {{articleissues}}
friendlytag.groupHash = {
	'3O': true,
	'advert': true,
	'autobiography': true,
	'biased': true,
	'blpdispute': true,
	'BLPrefimprove': true,
	'BLPsources': true,
	'BLP sources': true,
	'BLPunsourced': true,
	'BLPunreferenced': true,
	'BLPunref': true,
	'citations missing': true,
	'citationstyle': true,
	'citecheck': true,
	'cleanup': true,
	'COI': true,
	'coi': true,
	'colloquial': true,
	'confusing': true,
	'context': true,
	'contradict': true,
	'copyedit': true,
	'citation style': true,
	'criticisms': true,
	'crystal': true,
	'deadend': true,
	'disputed': true,
	'do-attempt': true,
	'essay': true,
	'essay-like': true,
	'examplefarm': true,
	'expand': true,
	'expert': false,
	'external links': true,
	'fancruft': true,
	'fansite': true,
	'fiction': true,
	'gameguide': true,
	'globalize': true,
	'grammar': true,
	'histinfo': true,
	'hoax': true,
	'howto': true,
	'importance': true,
	'inappropriate person': true,
	'incomplete': true,
	'lead missing': true,
	'lead rewrite': true,
	'lead too long': true,
	'lead too short': true,
	'in-universe': true,
	'jargon': true,
	'laundry': true,
	'laundrylists': true,
	'likeresume': true,
	'long': true,
	'newsrelease': true,
	'notability': true,
	'notable': true,
	'NPOV': true,
	'npov': true,
	'one source': true,
	'OR': true,
	'or': true,
	'original research': true,
	'out of date': true,
	'peacock': true,
	'plot': true,
	'POV': true,
	'pov': true,
	'primarysources': true,
	'prose': true,
	'proseline': true,
	'quotefarm': true,
	'recentism': true,
	'refimprove': true,
	'refimproveBLP': true,
	'restructure': true,
	'review': true,
	'rewrite': true,
	'roughtranslation': true,
	'sections': true,
	'self-published': true,
	'spam': true,
	'story': true,
	'synthesis': true,
	'technical': true,
	'tone': true,
	'toolong': true,
	'tooshort': true,
	'travelguide': true,
	'trivia': true,
	'unbalanced': true,
	'unencyclopedic': true,
	'unref': true,
	'unreferenced': true,
	'unrefBLP': true,
	'unreferencedBLP': true,
	'update': true,
	'verylong': true,
	'weasel': true,
	'wikify': true
}
 
friendlytag.callbacks = {
	main: function( self ) {
		var form = self.responseXML.getElementById( 'editform' );
		var tagRe, text = '', summaryText = 'Added';
		var tags = new Array(), groupableTags = new Array();
 
		//Remove tags that become superfluous with this action
		form.wpTextbox1.value = form.wpTextbox1.value.replace(/{\{\s*(New unreviewed article|Userspace draft)\s*(\|(?:{{[^{}]*}}|[^{}])*)?}}\s*/ig, "");
 
		if( !isRedirect ) {
			// Check for preexisting tags and separate tags into groupable and non-groupable arrays
			Status.info( 'Info', 'Checking for preexisting tags on the article' );
			for( var i = 0; i < self.params.tags.length; i++ ) {
				tagRe = new RegExp( '(\\{\\{' + self.params.tags[i] + '(\\||\\}\\}))', 'im' );
				if( !tagRe.exec( form.wpTextbox1.value ) ) {
					if( friendlytag.groupHash[ self.params.tags[i] ] ) {
						groupableTags = groupableTags.concat( self.params.tags[i] );
					} else {
						tags = tags.concat( self.params.tags[i] );
					}
				} else {
					Status.info( 'Info', 'Found \{\{' + self.params.tags[i]
						+ '\}\} on the article already...excluding' );
				}
			}
 
			if( self.params.group && groupableTags.length >= 3 ) {
				Status.info( 'Info', 'Grouping supported tags into \{\{multiple issues\}\}' );
 
				groupableTags.sort();
				text += '\{\{multiple issues';
				summaryText += ' \{\{[[Template:multiple issues|multiple issues]]\}\} with parameters';
				for( var i = 0; i < groupableTags.length; i++ ) {
					text += '|' + groupableTags[i]
					+ '=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}';
 
					if( i == (groupableTags.length - 1) ) {
						summaryText += ' and';
					} else if ( i < (groupableTags.length - 1) && i != 0 ) {
						summaryText += ',';
					}
					summaryText += ' ' + groupableTags[i];
				}
				text += '\}\}\n';
			} else {
				tags = tags.concat( groupableTags );
			}
		} else {
			// Check for preexisting tags
			Status.info( 'Info', 'Checking for preexisting tags on the redirect' );
			for( var i = 0; i < self.params.tags.length; i++ ) {
				tagRe = new RegExp( '(\\{\\{' + self.params.tags[i] + '(\\||\\}\\}))', 'im' );
				if( !tagRe.exec( form.wpTextbox1.value ) ) {
					tags = tags.concat( self.params.tags[i] );
				} else {
					Status.info( 'Info', 'Found \{\{' + self.params.tags[i]
						+ '\}\} on the redirect already...excluding' );
				}
			}
		}
 
		tags.sort();
		for( var i = 0; i < tags.length; i++ ) {
			if( tags[i] == 'uncategorized' || tags[i] == 'catimprove' ) {
				form.wpTextbox1.value += '\n\n\{\{' + tags[i]
				+ '|date=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}\}\}';
			} else {
				if( tags[i] == 'globalize' ) {
					text += '\{\{' + self.params.globalizeSubcategory;
				} else if( tags[i] == 'current' ) {
					text += '\{\{' + self.params.currentSubcategory;
				} else {
					text += ( isRedirect ? '\n' : '' ) + '\{\{' + tags[i];
				}
 
				if( tags[i] == 'notability' && self.params.notabilitySubcategory != 'none' ) {
					text += '|' + self.params.notabilitySubcategory;
				}
 
				if( tags[i] == 'do-attempt' ) {
					text += '|att=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}\}\}\n';
				} else {
					text += isRedirect ? '\}\}' : '|date=\{\{subst:CURRENTMONTHNAME\}\} \{\{subst:CURRENTYEAR\}\}\}\}\n';
				}
			}
 
			if( i == (tags.length - 1) && ( i > 0 || groupableTags.length > 3 ) ) {
				summaryText += ' and';
			} else if ( i < (tags.length - 1) && ( i != 0 || groupableTags.length > 3 ) ) {
				summaryText += ',';
			}
 
			summaryText += ' \{\{[[Template:';
			if( tags[i] == 'globalize' ) {
				summaryText += self.params.globalizeSubcategory + '|' + self.params.globalizeSubcategory;			
			} else if( tags[i] == 'current' ) {
				summaryText += self.params.currentSubcategory + '|' + self.params.currentSubcategory;
			} else {
				summaryText += tags[i] + '|' + tags[i];
			}
			summaryText += ']]\}\}';
		}
 
		if( !isRedirect ) {
			//smartly insert the new tags after any hatnotes. Regex is a bit more
			//complicated than it'd need to be, to allow templates as parameters,
			//and to handle whitespace properly.
			text = form.wpTextbox1.value.replace(/^\s*(?:((?:\s*{{\s*(?:about|dablink|distinguish|for|other(?:hurricaneuses|people|persons|places|uses(?:of)?)|redirect(?:-acronym)?|see also|selfref|the)\d*\s*(\|(?:{{[^{}]*}}|[^{}])*)?}})+(?:\s*\n)?)\s*)?/i, "$1"+text);
		} else {
			text = form.wpTextbox1.value + text;
		}
		summaryText += ' tag' + ( ( tags.length + ( groupableTags.length > 3 ? 1 : 0 ) ) > 1 ? 's' : '' )
		+ ' to ' + ( isRedirect ? 'redirect' : 'article' ) + FriendlyConfig.summaryAd;
 
		var postData = {
			'wpMinoredit': FriendlyConfig.markTaggedPagesAsMinor ? 1 : undefined,
			'wpWatchthis': form.wpWatchthis.checked ? 1 : (FriendlyConfig.watchTaggedPages ? 1 : undefined),
			'wpStarttime': form.wpStarttime.value,
			'wpEdittime': form.wpEdittime.value,
			'wpAutoSummary': form.wpAutoSummary.value,
			'wpEditToken': form.wpEditToken.value,
			'wpSummary': summaryText,
			'wpTextbox1': text
		};
 
		self.post( postData );
 
		if( FriendlyConfig.markTaggedPagesAsPatrolled && self.params.rcid != '' ) {
			var query = {
				'title': wgPageName,
				'action': 'markpatrolled',
				'rcid': self.params.rcid
			};
 
			var wikipedia_wiki = new Wikipedia.wiki( 'Marking page as patrolled', query );
			wikipedia_wiki.post();
		}
	}
}
 
friendlytag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
	var form = e.target;
	if( isRedirect ) {
		var tags = form.getChecked( 'administrative' ).concat( form.getChecked( 'alternative' ) ).concat( form.getChecked( 'spelling' ) );
	} else {
		if( typeof( FriendlyConfig.customTagList ) == 'object' ) {
			var tags = form.getChecked( 'notice' ).concat( form.getChecked( 'problem' ) ).concat( form.getChecked( 'maintenance' ) ).concat( form.getChecked( 'custom' ) );
		} else {
			var tags = form.getChecked( 'notice' ).concat( form.getChecked( 'problem' ) ).concat( form.getChecked( 'maintenance' ) );
		}
		var globalizeSubcategory = form.getChecked( 'problem.globalize' );
		var notabilitySubcategory = form.getChecked( 'problem.notability' );
		var currentSubcategory = form.getChecked( 'notice.current' );
	}
	var params;
 
	if( tags.length == 0 ) {
		alert( 'You must select at least one tag!' );
		return;
	}
	if( !isRedirect ) {
		params = {
			tags: tags,
			group: form.group.checked,
			globalizeSubcategory: globalizeSubcategory ? globalizeSubcategory[0] : null,
			notabilitySubcategory: notabilitySubcategory ? notabilitySubcategory[0] : null,
			currentSubcategory: currentSubcategory ? currentSubcategory[0] : null,
			rcid: QueryString.exists( 'rcid' ) ? QueryString.get( 'rcid' ) : ''
		}
	} else {
		params = {
			tags: tags,
			rcid: QueryString.exists( 'rcid' ) ? QueryString.get( 'rcid' ) : ''
		}
	}
 
	Status.init( form );
 
	var query = { 
		'title': wgPageName, 
		'action': 'submit'
	};
	Wikipedia.actionCompleted.redirect = wgPageName;
	Wikipedia.actionCompleted.notice = "Tagging complete, reloading article in some seconds";
	var wikipedia_wiki = new Wikipedia.wiki( 'Article modification', query, friendlytag.callbacks.main );
	wikipedia_wiki.params = params;
	wikipedia_wiki.get();
}
// </nowiki>