மீடியாவிக்கி:Friendlytag.js
// &lt;nowiki&gt;
 // 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 = &quot; using [[WP:FRIENDLY|Friendly]]&quot;;
 }
 
 /**
  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;
 }
 
 function friendlytag() {
     if( QueryString.exists( 'redirect' ) &amp;&amp; QueryString.get( 'redirect' ) == 'no' ) {
         isRedirect = true;
         mw.util.addPortletLink( 'p-cactions', &quot;javascript:friendlytag.callback()&quot;, &quot;tag&quot;, &quot;friendly-tag&quot;, &quot;Tag redirect&quot;, &quot;&quot;);
     } else if( mw.config.get('wgNamespaceNumber') != 0 || wgCurRevisionId == false ) {
         return;
     } else {
         mw.util.addPortletLink( 'p-cactions', &quot;javascript:friendlytag.callback()&quot;, &quot;tag&quot;, &quot;friendly-tag&quot;, &quot;Tag article&quot;, &quot;&quot;);
     }
 }
 
 $.when( $.ready, mw.loader.using( 'mediawiki.util' ) ).then( friendlytag );
 
 friendlytag.callback = function friendlytagCallback( uid ) {
     var Window = new SimpleWindow( 600, 400 );
     if( !isRedirect ) {
         Window.setTitle( &quot;Article maintenance tagging&quot; );
     } else {
         Window.setTitle( &quot;Redirect tagging&quot; );
     }
     var form = new QuickForm( friendlytag.callback.evaluate );
     
     if( !isRedirect ) {
         form.append( {
                 type: 'checkbox',
                 list: [
                     {
                         label: 'Group into {{articleissues}} if possible',
                         value: 'group',
                         name: 'group',
                         tooltip: 'If applying more than three templates supported by {{articleissues}} and this box is checked, all supported templates will be grouped into a single {{articleissues}} 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 } );
     } else {
         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();
 }
 
 isRedirect = false;
 
 friendlytag.maintenanceList = [
     {
         label: '{{cleanup}}: article may require cleanup',
         value: 'cleanup' },
     {
         label: '{{confusing}}: article may be confusing or unclear',
         value: 'confusing' },
     {
         label: '{{copyedit}}: article needs copy editing for grammar, style, cohesion, tone, and/or spelling',
         value: 'copyedit' },
     {
         label: '{{deadend}}: article has few or no links to other articles',
         value: 'deadend' },
     {
         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: '{{in-universe}}: article subject is fictional and needs rewriting from a non-fictional perspective',
         value: 'in-universe' },
     {
         label: '{{internallinks}}: article needs more relevant internal links',
         value: 'internallinks' },
     {
         label: '{{introrewrite}}: lead section of article needs to be rewritten to comply with guidelines',
         value: 'introrewrite' },
     {
         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: '{{sections}}: article needs to be broken into sections',
         value: 'sections' },
     {
         label: '{{tone}}: tone of article is not appropriate',
         value: 'tone' },
     {
         label: '{{toolong}}: lead section of article is too long and should be shortened',
         value: 'toolong' },
     {
         label: '{{tooshort}}: lead section of article is too short and should be expanded',
         value: 'tooshort' },
     {
         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: '{{advert}}: article is written like an advertisement',
         value: 'advert' },
     {
         label: '{{autobiography}}: article is an autobiography and may not be of NPOV',
         value: 'autobiography' },
     {
         label: '{{coi}}: article creator or major contributor may have a conflict of interest',
         value: 'coi' },
     {
         label: '{{context}}: article provides insufficient context',
         value: 'context' },
     {
         label: '{{disputed}}: article has questionable factual accuracy',
         value: 'disputed' },
     {
         label: '{{hoax}}: article may be a complete hoax',
         value: 'hoax' },
     {
         label: '{{non-free}}: article may contain excessive or improper use of copyrighted materials',
         value: 'non-free' },
     {
         label: '{{notability}}: article\'s subject may not meet the notability guideline',
         value: 'notability',
         event: function( e ) {
             friendlytag.callback.change_notability( e );
             e.stopPropagation();
         } },
     {
         label: '{{npov}}: article does not maintain a neutral point of view',
         value: 'npov' },
     {
         label: '{{original research}}: article has original research or unverified claims',
         value: 'original research' },
     {
         label: '{{primarysources}}: article needs reliable, third-party sources',
         value: 'primarysources' },
     { 
         label: '{{refimprove}}: article needs additional references or sources for verification',
         value: 'refimprove' },
     {
         label: '{{self-published}}: article may contain improper references to self-published sources',
         value: 'self-published' },
     {
         label: '{{totally-disputed}}: article is not neutral and has questionable factual accuracy',
         value: 'totally-disputed' },
     {
         label: '{{unencyclopedic}}: article is unencyclopedic and should be deleted',
         value: 'unencyclopedic' },
     {
         label: '{{unreferenced}}: article has no references at all',
         value: 'unreferenced' },
     {
         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',
         event: function( e ) {
             friendlytag.callback.change_current( e );
             e.stopPropagation();
         } },
     {
         label: '{{future}}: article is about scheduled or expected future events',
         value: 'future',
         event: function( e ) {
             friendlytag.callback.change_future( e );
             e.stopPropagation();
         } },
     {
         label: '{{inuse}}: article is undergoing a major edit for a short while',
         value: 'inuse' },
     {
         label: '{{underconstruction}}: article is currently in the middle of an expansion or major revamping',
         value: 'underconstruction' }
 ];
 
 friendlytag.notabilityList = {
     &quot;Academics&quot;: {
         label: &quot;notability guideline for academics&quot;,
         value: &quot;Academics&quot;
     },
     &quot;Biographies&quot;: {
         label: &quot;notability guideline for biographies&quot;,
         value: &quot;Biographies&quot;
     },
     &quot;Books&quot;: {
         label: &quot;notability guideline for books&quot;,
         value: &quot;Books&quot;
     },
     &quot;Companies&quot;: {
         label: &quot;notability guideline for companies and organizations&quot;,
         value: &quot;Companies&quot;
     },
     &quot;Episode&quot;: {
         label: &quot;notability guideline for television episodes&quot;,
         value: &quot;Episode&quot;
     },
     &quot;Fiction&quot;: {
         label: &quot;notability guideline for fiction&quot;,
         value: &quot;Fiction&quot;
     },
     &quot;Institutions&quot;: {
         label: &quot;synonym of \&quot;Companies\&quot;&quot;,
         value: &quot;Institutions&quot;
     },
     &quot;Music&quot;: {
         label: &quot;notability guideline for music&quot;,
         value: &quot;Music&quot;
     },
     &quot;Neologisms&quot;: {
         label: &quot;notability guideline for neologisms&quot;,
         value: &quot;Neologisms&quot;
     },
     &quot;Numbers&quot;: {
         label: &quot;notability guideline for numbers&quot;,
         value: &quot;Numbers&quot;
     },
     &quot;Organizations&quot;: {
         label: &quot;synonym of \&quot;Companies\&quot;&quot;,
         value: &quot;Organizations&quot;
     },
     &quot;Products&quot;: {
         label: &quot;notability guideline for products and services&quot;,
         value: &quot;Products&quot;
     },
     &quot;Web&quot;: {
         label: &quot;notability guideline for web content&quot;,
         value: &quot;Web&quot;
     }
 };
 
 friendlytag.currentList = {
     &quot;current&quot;: {
         label: &quot;{{current}}: article documents a current event&quot;,
         value: &quot;current&quot;
     },
     &quot;airing&quot;: {
         label: &quot;{{airng}}: program is currently airing&quot;,
         value: &quot;airing&quot;
     },
     &quot;bridge under construction&quot;: {
         label: &quot;{{bridge under construction}}: article contains information about a bridge currently under construction&quot;,
         value: &quot;bridge under construction&quot;
     },
     &quot;building under construction&quot;: {
         label: &quot;{{bridge under construction}}: article contains information about a building currently under construction&quot;,
         value: &quot;building under construction&quot;
     },
     &quot;antics&quot;: {
         label: &quot;{{current antics}}: person is currently participating in a reality television show&quot;,
         value: &quot;current antics&quot;
     },
     &quot;bill&quot;: {
         label: &quot;{{current bill}}: article documents proposed legislation that is currently being considered&quot;,
         value: &quot;current bill&quot;
     },
     &quot;court case&quot;: {
         label: &quot;{{current court case}}: article documents a current court case&quot;,
         value: &quot;current court case&quot;
     },
     &quot;fiction&quot;: {
         label: &quot;{{current fiction}}: article is about a recently released work of fiction&quot;,
         value: &quot;current fiction&quot;
     },
     &quot;game&quot;: {
         label: &quot;{{current game}}: article documents a current event in video gaming&quot;,
         value: &quot;current game&quot;
     },
     &quot;person&quot;: {
         label: &quot;{{current person}}: article is about a person involved in a current event&quot;,
         value: &quot;current person&quot;
     },
     &quot;product&quot;: {
         label: &quot;{{current product}}: article documents a recently released product&quot;,
         value: &quot;current product&quot;
     },
     &quot;pw&quot;: {
         label: &quot;{{current pw}}: article documents a current professional wrestling event&quot;,
         value: &quot;current pw&quot;
     },
     &quot;spaceflight&quot;: {
         label: &quot;{{current spaceflight}}: article or section documents a current spaceflight&quot;,
         value: &quot;current spaceflight&quot;
     },
     &quot;sport&quot;: {
         label: &quot;{{current sport}}: article documents a current sports-related event&quot;,
         value: &quot;current sport&quot;
     },
     &quot;delay&quot;: {
         label: &quot;{{current sport delay}}: article documents a current sports-related event which may contain information not aired because of tape delay&quot;,
         value: &quot;current sport delay&quot;
     },
     &quot;related&quot;: {
         label: &quot;{{current related}}: article is related to a current event&quot;,
         value: &quot;current related&quot;
     },
     &quot;single&quot;: {
         label: &quot;{{current single}}: article documents a current single&quot;,
         value: &quot;current single&quot;
     },
     &quot;territorial changes&quot;: {
         label: &quot;{{current territorial changes}}: article is subject to current territorial changes and may not represent up-to-date detail&quot;,
         value: &quot;current territorial changes&quot;
     },
     &quot;in space&quot;: {
         label: &quot;{{in space}}: article documents a person who is currently in space&quot;,
         value: &quot;in space&quot;
     },
     &quot;inland waterway under restoration&quot;: {
         label: &quot;{{inland waterway under restoration}}: article contains information about an inland waterway currently under restoration&quot;,
         value: &quot;inland waterway under restoration&quot;
     },
     &quot;ongoing lawsuit&quot;: {
         label: &quot;{{ongoing lawsuit}}: article documents an ongoing lawsuit&quot;,
         value: &quot;ongoing lawsuit&quot;
     },
     &quot;ongoing election&quot;: {
         label: &quot;{{ongoing election}}: article contains information about an ongoing election&quot;,
         value: &quot;ongoing election&quot;
     },
     &quot;ongoing weather&quot;: {
         label: &quot;{{ongoing weather}}: article contains information about an ongoing meteorological event or phenomenon&quot;,
         value: &quot;ongoing weather&quot;
     },
     &quot;recent death&quot;: {
         label: &quot;{{recent death}}: article is about a person who has recently died&quot;,
         value: &quot;recent death&quot;
     },
     &quot;recently convicted&quot;: {
         label: &quot;{{recently convicted}}: article is about a person who has recently been convicted in a criminal case&quot;,
         value: &quot;recently convicted&quot;
     },
     &quot;road under construction&quot;: {
         label: &quot;{{road under construction}}: article contains information about a road currently under construction&quot;,
         value: &quot;road under construction&quot;
     }
 };
 
 friendlytag.futureList = {
     &quot;future0&quot;: {
         label: &quot;{{future}}: article is about scheduled or expected future events&quot;,
         value: &quot;future&quot;
     },
     &quot;future1&quot;: {
         label: &quot;== Education ==&quot;,
         value: &quot;future&quot;
     },
     &quot;article&quot;: {
         label: &quot;{{future article}}: expected future articles&quot;,
         value: &quot;future article&quot;
     },
     &quot;book&quot;: {
         label: &quot;{{future book}}: scheduled, forthcoming or expected future book(s)&quot;,
         value: &quot;future book&quot;
     },
     &quot;museum&quot;: {
         label: &quot;{{future museum}}: planned museum&quot;,
         value: &quot;future museum&quot;
     },
     &quot;zoo exhibit&quot;: {
         label: &quot;{{future zoo exhibit}}: planned or expected new zoo exhibit&quot;,
         value: &quot;future zoo exhibit&quot;
     },
     &quot;future2&quot;: {
         label: &quot;== Engineering ==&quot;,
         value: &quot;future&quot;
     },
     &quot;building&quot;: {
         label: &quot;{{future building}}: expected future buildings or structures&quot;,
         value: &quot;future building&quot;
     },
     &quot;chip&quot;: {
         label: &quot;{{future chip}}: scheduled or expected future computer chips&quot;,
         value: &quot;future chip&quot;
     },
     &quot;dam&quot;: {
         label: &quot;{{future dam}}: planned or expected dam&quot;,
         value: &quot;future dam&quot;
     },
     &quot;energy infrastructure&quot;: {
         label: &quot;{{future energy infrastructure}}: planned or expected future energy production, transmission, distribution or other energy related infrastructure&quot;,
         value: &quot;future energy infrastructure&quot;
     },
     &quot;infrastructure&quot;: {
         label: &quot;{{future infrastructure}}: planned or expected future infrastructure&quot;,
         value: &quot;future infrastructure&quot;
     },
     &quot;mine&quot;: {
         label: &quot;{{future mine}}: planned or proposed future mine&quot;,
         value: &quot;future mine&quot;
     },
     &quot;pipeline&quot;: {
         label: &quot;{{future pipeline}}: planned or expected pipeline&quot;,
         value: &quot;future pipeline&quot;
     },
     &quot;power plant&quot;: {
         label: &quot;{{future power plant}}: planned or expected power plant&quot;,
         value: &quot;future power plant&quot;
     },
     &quot;scientific facility&quot;: {
         label: &quot;{{future scientific facility}}: expected future scientific facility&quot;,
         value: &quot;future scientific facility&quot;
     },
     &quot;software&quot;: {
         label: &quot;{{future software}}: scheduled or expected future software&quot;,
         value: &quot;future software&quot;
     },
     &quot;spaceflight&quot;: {
         label: &quot;{{future spaceflight}}: scheduled or expected spaceflight&quot;,
         value: &quot;future spaceflight&quot;
     },
     &quot;launching&quot;: {
         label: &quot;{{launching}}: rocket or spacecraft which is either currently in the process of launching, or is scheduled to launch within the next few days&quot;,
         value: &quot;launching&quot;
     },
     &quot;web service&quot;: {
         label: &quot;{{future web service}}: scheduled or expected Web service&quot;,
         value: &quot;future web service&quot;
     },
     &quot;future3&quot;: {
         label: &quot;== Entertainment ==&quot;,
         value: &quot;future&quot;
     },
     &quot;album&quot;: {
         label: &quot;{{future album}}: scheduled or expected album&quot;,
         value: &quot;future album&quot;
     },
     &quot;amusement ride&quot;: {
         label: &quot;{{future amusement ride}}: planned or expected future amusement ride&quot;,
         value: &quot;future amusement ride&quot;
     },
     &quot;awards show&quot;: {
         label: &quot;{{future awards show}}: upcoming awards show&quot;,
         value: &quot;future awards show&quot;
     },
     &quot;channel&quot;: {
         label: &quot;{{future channel}}: future television station, channel or network&quot;,
         value: &quot;future channel&quot;
     },
     &quot;comic&quot;: {
         label: &quot;{{future comic}}: scheduled or expected comic book release, or a series already in progress&quot;,
         value: &quot;future comic&quot;
     },
     &quot;film&quot;: {
         label: &quot;{{future film}}: one or more scheduled or expected films&quot;,
         value: &quot;future film&quot;
     },
     &quot;game&quot;: {
         label: &quot;{{future game}}: unreleased video game&quot;,
         value: &quot;future game&quot;
     },
     &quot;music festival&quot;: {
         label: &quot;{{future music festival}}: upcoming music/arts festival&quot;,
         value: &quot;future music festival&quot;
     },
     &quot;play article&quot;: {
         label: &quot;{{future play article}}: upcoming play or musical&quot;,
         value: &quot;future play article&quot;
     },
     &quot;radio&quot;: {
         label: &quot;{{future radio}}: future radio station, radio network or radio show&quot;,
         value: &quot;future radio&quot;
     },
     &quot;UK radio station&quot;: {
         label: &quot;{{future UK radio station}}: future radio station in the United Kingdom&quot;,
         value: &quot;future UK radio station&quot;
     },
     &quot;single&quot;: {
         label: &quot;{{future single}}: scheduled or expected future single&quot;,
         value: &quot;future single&quot;
     },
     &quot;television episode&quot;: {
         label: &quot;{{future television episode}}: scheduled upcoming television episode of an already-running TV series&quot;,
         value: &quot;future television episode&quot;
     },
     &quot;television series&quot;: {
         label: &quot;{{future television series}}: scheduled upcoming television series&quot;,
         value: &quot;future television series&quot;
     },
     &quot;webcomic&quot;: {
         label: &quot;{{future webcomic}}: scheduled or expected webcomic update/premiere, or a series already in progress&quot;,
         value: &quot;future webcomic&quot;
     },
     &quot;future4&quot;: {
         label: &quot;== Miscellaneous ==&quot;,
         value: &quot;future&quot;
     },
     &quot;concept product&quot;: {
         label: &quot;{{concept product}}: contains information about conceptual products&quot;,
         value: &quot;concept product&quot;
     },
     &quot;election&quot;: {
         label: &quot;{{future election}}: forthcoming or ongoing election&quot;,
         value: &quot;future election&quot;
     },
     &quot;election in the United States&quot;: {
         label: &quot;{{future election in the United States}}: upcoming or ongoing election in the United States&quot;,
         value: &quot;future election in the United States&quot;
     },
     &quot;product&quot;: {
         label: &quot;{{future product}}: scheduled or expected future product&quot;,
         value: &quot;future product&quot;
     },
     &quot;product small&quot;: {
         label: &quot;{{future product small}}: (small) future product, and may contain unverified, unreliable, or incorrect information&quot;,
         value: &quot;future product small&quot;
     },
     &quot;future5&quot;: {
         label: &quot;== Transportation ==&quot;,
         value: &quot;future&quot;
     },
     &quot;aircraft&quot;: {
         label: &quot;{{future aircraft}}: scheduled or anticipated future aircraft&quot;,
         value: &quot;future aircraft&quot;
     },
     &quot;airline&quot;: {
         label: &quot;{{future airline}}: planned or expected new airline&quot;,
         value: &quot;future airline&quot;
     },
     &quot;airport&quot;: {
         label: &quot;{{future airport}}: planned or expected new airport&quot;,
         value: &quot;future airport&quot;
     },
     &quot;airport authority&quot;: {
         label: &quot;{{future airport authority}}: planned or expected new airport authority&quot;,
         value: &quot;future airport authority&quot;
     },
     &quot;airport expansion&quot;: {
         label: &quot;{{future airport expansion}}: planned or expected expansion of an existing airport&quot;,
         value: &quot;future airport expansion&quot;
     },
     &quot;Australian public transportation&quot;: {
         label: &quot;{{future Australian public transportation}}: planned or expected public transportation infrastructure in Australia&quot;,
         value: &quot;future Australian public transportation&quot;
     },
     &quot;automobile&quot;: {
         label: &quot;{{future automobile}}: scheduled or anticipated future automobile&quot;,
         value: &quot;future automobile&quot;
     },
     &quot;bridge&quot;: {
         label: &quot;{{future bridge}}: planned or proposed future bridge&quot;,
         value: &quot;future bridge&quot;
     },
     &quot;Canadian public transportation&quot;: {
         label: &quot;{{future Canadian public transportation}}: planned or expected public transportation infrastructure in Canada&quot;,
         value: &quot;future Canadian public transportation&quot;
     },
     &quot;Chinese public transportation&quot;: {
         label: &quot;{{future Chinese public transportation}}: planned or expected public transportation infrastructure in China&quot;,
         value: &quot;future Chinese public transportation&quot;
     },
     &quot;concept automobile&quot;: {
         label: &quot;{{concept automobile}}: concept automobile&quot;,
         value: &quot;concept automobile&quot;
     },
     &quot;French public transportation&quot;: {
         label: &quot;{{future French public transportation}}: planned or expected public transportation infrastructure in France&quot;,
         value: &quot;future French public transportation&quot;
     },
     &quot;London transport infrastructure&quot;: {
         label: &quot;{{future London transport infrastructure}}: planned or expected London Transport infrastructure&quot;,
         value: &quot;future London transport infrastructure&quot;
     },
     &quot;motorcycle&quot;: {
         label: &quot;{{future motorcycle}}: scheduled or anticipated future motorcycle&quot;,
         value: &quot;future motorcycle&quot;
     },
     &quot;public transportation&quot;: {
         label: &quot;{{future public transportation}}: planned or expected public transportation infrastructure&quot;,
         value: &quot;future public transportation&quot;
     },
     &quot;railway station&quot;: {
         label: &quot;{{future railway station}}: planned or expected future railway station&quot;,
         value: &quot;future railway station&quot;
     },
     &quot;road&quot;: {
         label: &quot;{{future road}}: planned or expected future road&quot;,
         value: &quot;future road&quot;
     },
     &quot;tunnel&quot;: {
         label: &quot;{{future tunnel}}: planned or expected future tunnel&quot;,
         value: &quot;future tunnel&quot;
     },
     &quot;UK public transportation&quot;: {
         label: &quot;{{future UK public transportation}}: planned or expected public transportation in the United Kingdom&quot;,
         value: &quot;future UK public transportation&quot;
     },
     &quot;USA public transportation&quot;: {
         label: &quot;{{future USA public transportation}}: proposed, planned, or expected public transportation infrastructure in the United States&quot;,
         value: &quot;future USA public transportation&quot;
     },
     &quot;future6&quot;: {
         label: &quot;== Sports ==&quot;,
         value: &quot;future&quot;
     },
     &quot;arena&quot;: {
         label: &quot;{{future arena}}: planned or proposed arena&quot;,
         value: &quot;future arena&quot;
     },
     &quot;motor sport&quot;: {
         label: &quot;{{future motor sport}}: future motor sporting event or team&quot;,
         value: &quot;future motor sport&quot;
     },
     &quot;pw&quot;: {
         label: &quot;{{future pw}}: scheduled professional wrestling event that is taking place in the future&quot;,
         value: &quot;future pw&quot;
     },
     &quot;sport&quot;: {
         label: &quot;{{future sport}}: future sporting event or team&quot;,
         value: &quot;future sport&quot;
     },
     &quot;sports venue&quot;: {
         label: &quot;{{future sports venue}}: planned or expected sports venue&quot;,
         value: &quot;future sports venue&quot;
     },
     &quot;stadium&quot;: {
         label: &quot;{{future stadium}}: planned or proposed stadium&quot;,
         value: &quot;future stadium&quot;
     }
 };
 
 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 \&quot;list of minor entities\&quot;-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 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 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 to disambiguation page}}: redirect to a disambiguation page',
         value: 'R to disambiguation page' },
     {
         label: '{{R for as of}}: redirect page affects an \&quot;as of ...\&quot; link',
         value: 'R for as of' },
     {
         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 \&quot;metadata\&quot; 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 = {
     'cleanup': true,
     'confusing': true,
     'copyedit': true,
     'deadend': true,
     'essay-like': true,
     'expand': true,
     'expert': true,
     'in-universe': true,
     'internallinks': false,
     'introrewrite': true,
     'nofootnotes': false,
     'orphan': true,
     'plot': true,
     'sections': true,
     'tone': true,
     'toolong': true,
     'tooshort': true,
     'uncategorized': false,
     'verylong': true,
     'wikify': true,
     'advert': true,
     'autobiography': true,
     'coi': true,
     'context': true,
     'disputed': true,
     'hoax': false,
     'non-free': true,
     'notability': true,
     'npov': true,
     'original research': true,
     'primarysources': true,
     'refimprove': true,
     'self-published': true,
     'totally-disputed': false,
     'unencyclopedic': true,
     'unreferenced': true,
     'update': true,
     'weasel': true,
     'currentevent': false,
     'future': false,
     'inuse': false,
     'underconstruction': false
 }
 
 friendlytag.callback.change_notability = function friendlytagCallbackChangeNotability(e) {
     if( e.target.checked ) {
         var notabilitySelect = new QuickForm.element( { type:'select', name:'notabilityList' } );
 
         notabilitySelect.append( { type:'option', label:friendlytag.problemList[7].label, value:&quot;none&quot; } );
         for( var i in friendlytag.notabilityList ) {
             notabilitySelect.append( { type:'option',    label:&quot;{{notability|&quot; + i + &quot;}}: &quot;
                     + friendlytag.notabilityList[i].label, value:friendlytag.notabilityList[i].value } );
         }
         e.target.parentNode.removeChild( e.target.nextSibling );
         e.target.parentNode.appendChild( notabilitySelect.render().firstChild );
     } else {
         e.target.parentNode.removeChild( e.target.parentNode.lastChild );
         var notabilityLabel = document.createElement( &quot;label&quot; );
         e.target.parentNode.appendChild( notabilityLabel );
         notabilityLabel.innerHTML = friendlytag.problemList[7].label;
     }
 }
 
 friendlytag.callback.change_current = function friendlytagCallbackChangeCurrent(e) {
     if( e.target.checked ) {
         var currentSelect = new QuickForm.element( { type:'select', name:'currentList' } );
 
         for( var i in friendlytag.currentList ) {
             currentSelect.append( { type:'option',    label:friendlytag.currentList[i].label, value:friendlytag.currentList[i].value } );
         }
         e.target.parentNode.removeChild( e.target.nextSibling );
         e.target.parentNode.appendChild( currentSelect.render().firstChild );
     } else {
         e.target.parentNode.removeChild( e.target.parentNode.lastChild );
         var currentLabel = document.createElement( &quot;label&quot; );
         e.target.parentNode.appendChild( currentLabel );
         currentLabel.innerHTML = friendlytag.noticeList[0].label;
     }
 }
 
 friendlytag.callback.change_future = function friendlytagCallbackChangeFuture(e) {
     if( e.target.checked ) {
         var futureSelect = new QuickForm.element( { type:'select', name:'futureList' } );
 
         for( var i in friendlytag.futureList ) {
             futureSelect.append( { type:'option',    label:friendlytag.futureList[i].label, value:friendlytag.futureList[i].value } );
         }
         e.target.parentNode.removeChild( e.target.nextSibling );
         e.target.parentNode.appendChild( futureSelect.render().firstChild );
     } else {
         e.target.parentNode.removeChild( e.target.parentNode.lastChild );
         var futureLabel = document.createElement( &quot;label&quot; );
         e.target.parentNode.appendChild( futureLabel );
         futureLabel.innerHTML = friendlytag.noticeList[1].label;
     }
 }
 
 friendlytag.callbacks = {
     main: function( self ) {
         var form = self.responseXML.getElementById( 'editform' );
         var tagRe, text = '', summaryText = 'Added';
         var tags = new Array(), groupableTags = new Array();
         
         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 &lt; 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 &amp;&amp; groupableTags.length &gt; 3 ) {
                 Status.info( 'Info', 'Grouping supported tags into {{articleissues}}' );
 
                 groupableTags.sort();
                 text += '{{articleissues';
                 summaryText += ' {{articleissues}} with parameters';
                 for( var i = 0; i &lt; groupableTags.length; i++ ) {
                     text += '|' + groupableTags[i]
                             + '={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}';
 
                     if( i == (groupableTags.length - 1) ) {
                         summaryText += ' and';
                     } else if ( i &lt; (groupableTags.length - 1) &amp;&amp; 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 &lt; 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 &lt; tags.length; i++ ) {
             if( tags[i] != 'uncategorized' ) {
                 if( tags[i] == 'current' ) {
                     text += '{{' + self.params.currentSubcategory;
                 } else if( tags[i] == 'future' ) {
                     text += '{{' + self.params.futureSubcategory;
                 } else {
                     text += ( isRedirect ? '\n' : '' ) + '{{' + tags[i];
                 }
                 
                 if( tags[i] == 'notability' &amp;&amp; self.params.notabilitySubcategory != 'none' ) {
                     text += '|' + self.params.notabilitySubcategory;
                 }
                 
                 text += isRedirect ? '}}' : '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}\n';
             } else {
                 form.wpTextbox1.value += '\n\n{{' + tags[i]
                         + '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}';
             }
 
             if( i == (tags.length - 1) &amp;&amp; ( i &gt; 0 || groupableTags.length &gt; 3 ) ) {
                 summaryText += ' and';
             } else if ( i &lt; (tags.length - 1) &amp;&amp; ( i != 0 || groupableTags.length &gt; 3 ) ) {
                 summaryText += ',';
             }
             
             summaryText += ' {{[[Template:';
             if( tags[i] == 'current' ) {
                 summaryText += self.params.currentSubcategory + '|' + self.params.currentSubcategory;
             } else if( tags[i] == 'future' ) {
                 summaryText += self.params.futureSubcategory + '|' + self.params.futureSubcategory;
             } else {
                 summaryText += tags[i] + '|' + tags[i];
             }
             summaryText += ']]}}';
         }
         
         if( !isRedirect ) {
             text += form.wpTextbox1.value;
         } else {
             text = form.wpTextbox1.value + text;
         }
         summaryText += ' tag' + ( ( tags.length + ( groupableTags.length &gt; 3 ? 1 : 0 ) ) &gt; 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 );
     }
 }
 
 friendlytag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
     var form = e.target;
     var tags = isRedirect ? ( getChecked( form.administrative ).concat( getChecked( form.alternative ) ).concat( getChecked( form.spelling ) ) )
             : ( getChecked( form.notice ).concat( getChecked( form.problem ) ).concat( getChecked( form.maintenance ) ) );
     var params;
     if( !isRedirect ) {
         var notabilitySubcategory = null;
         var currentSubcategory = null;
         var futureSubcategory = null;
         var group = form.group.checked;
     }
 
     if( tags.length == 0 ) {
         alert( 'You must select at least one tag!' );
         return;
     }
 
     if( !isRedirect ) {
         if( form.problem[7].checked ) {
             notabilitySubcategory = form.problem[7].nextSibling.value;
         }
         
         if( form.notice[0].checked ) {
             currentSubcategory = form.notice[0].nextSibling.value;
         }
         
         if( form.notice[1].checked ) {
             futureSubcategory = form.notice[1].nextSibling.value;
         }
 
         params = {
             tags: tags,
             group: group,
             notabilitySubcategory: notabilitySubcategory,
             currentSubcategory: currentSubcategory,
             futureSubcategory: futureSubcategory
         }
     } else {
         params = {
             tags: tags
         }
     }
 
     Status.init( form );
 
     var query = { 
         'title': mw.config.get('wgPageName'), 
         'action': 'submit'
     };
     Wikipedia.actionCompleted.redirect = mw.config.get('wgPageName');
     Wikipedia.actionCompleted.notice = &quot;Tagging complete, reloading article in some seconds&quot;;
     var wikipedia_wiki = new Wikipedia.wiki( 'Article modification', query, friendlytag.callbacks.main );
     wikipedia_wiki.params = params;
     wikipedia_wiki.get();
 }