_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

User:Ritchie333/drafts.js

Nowadays, User:Ritchie333/drafts.js has become a topic of great relevance and interest to a wide spectrum of the population. With the advancement of technology and globalization, User:Ritchie333/drafts.js has acquired unprecedented importance in the social, economic and cultural spheres. Whether we are talking about User:Ritchie333/drafts.js in the context of health, politics, education or entertainment, its influence and impact on our lives is undeniable. In this article we will explore different aspects and perspectives of User:Ritchie333/drafts.js, analyzing its impact and relevance in today's world.
function getDrafts( projectName, continueId ) {
	$.ajax( {
		type: "GET",
		url: mw.util.wikiScript( 'api' ),
		data: { action:'query',
		  list:'embeddedin',
		  format:'json',
		  rawcontinue:'',
		  eititle:'Template:' + projectName,
		  eidir:'ascending',
		  eicontinue:continueId,
		  einamespace:119 },
		dataType: 'json',
		success: function( data ) {
			var results = data.query.embeddedin;
			if( results.length > 0 ) {
				var titles = '';
				var i;
				var first = true;
				for( i = 0; i < results.length; ++i ) {
					if( first ) {
						first = false;
					} else {
						titles += '|';
				}
					var draftName = results.title.substr( 'Draft talk:'.length );
					titles += ( 'Draft:' + draftName );
				}
				$.ajax( {
					type: "GET",
				url: mw.util.wikiScript( 'api' ),
					data: {
						action:'query',
						prop:'categories',
						format:'json',
						titles:titles,
						clcategories:'Category:Pending AfC submissions'
					},
					dataType: 'json',
					success: function( redata ) {
						for( var page in redata.query.pages ) {
							nextPage = redata.query.pages;
							var pageTitle = nextPage.title;
							for( var cat in nextPage.categories ) {
								nextCategory = nextPage.categories;
								if( nextCategory.title === 'Category:Pending AfC submissions' ) {
									// Got it
									$('#related-drafts').append( 
										'<a href="' + mw.util.getUrl( pageTitle ) + '">' + pageTitle + '</a><br/>' );
								}
							}
						}
					}
				});
				if ( typeof data != 'undefined' ) {
					getDrafts( projectName,  data.embeddedin.eicontinue );
				}
			}
		}
	});
}

jQuery(function () {
	mw.loader.using( , function () {
	  if( mw.config.get('wgPageName').indexOf( 'Wikipedia:WikiProject' ) === 0 ) {
	    if(mw.config.get('wgAction') == 'view' || mw.config.get('wgAction') == 'purge' ){
	      var portletLink = mw.util.addPortletLink('p-tb', '#', 'Draft list', 't-draft-list', 'List drafts for this project');
	      $( portletLink ).click( function ( e ) {
			e.preventDefault();
			var projectName = mw.config.get('wgPageName').substr( 'Wikipedia:'.length );
			mw.util.$content.prepend( '<div id="related-drafts"><p>Related drafts</p></div>' );
			getDrafts( projectName, undefined /* no continue */ );
		} );
	    }
	  }
	});
});