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

User:Yair rand/TopEditors.js

Nowadays, User:Yair rand/TopEditors.js is a topic that has gained great interest in modern society. Since its appearance, User:Yair rand/TopEditors.js has generated debates and controversies, attracting the attention of academics, experts and the general public. This phenomenon has triggered a series of discussions that cover various aspects, from its impact on the economy to its implications on culture and politics. As User:Yair rand/TopEditors.js continues to be a relevant topic, it is crucial to analyze its different facets and understand how it influences our daily lives. In this article, we will explore in depth the phenomenon of User:Yair rand/TopEditors.js and its meaning today.
// Get a list of the top editors of a set of articles linked to from a certain page.

// TODO: Filter out bots
function getTopEditors( categoryTitle ) {
  var f = c => fetch( `https://en.wikipedia.org/w/api.php?action=query&format=json&list=categorymembers&cmnamespace=1&cmtitle=${ categoryTitle }&cmlimit=500`+(c?'&cmcontinue='+c:'')).then(x=>x.json()).then(x=>{

    var p = x.query.categorymembers.map( x => x.title.substr( 5 ) );
    // p = p ].links;
    if ( x.continue ) {
      return f( x.continue.cmcontinue ).then( r => p.concat( r ) );
    } else {
      return p;
    }
  });
  f().then(x=>{
    var allRevs = ;
    var getRevs = ( t, c ) => fetch( 
        `https://en.wikipedia.org/w/api.php?action=query&format=json&prop=revisions&titles=${ t }&rvprop=user&maxlag=5&rvlimit=500&rvstart=${new Date('2021').toISOString()}&rvend=`+new Date('2020').toISOString() + ( c || '' )
      ).then( x => x.json() ).then( x => {
        var y = x.query && x.query.pages,
          revs = y && y ].revisions || ;
        return x.continue ? getRevs( t, '&rvcontinue='+x.continue.rvcontinue ).then( a => revs.concat( a ) ) : revs;
      } );
    var nextPage = () => {
      var page = x.shift();
      if ( page ) {
        return getRevs( page ).then( x => { allRevs.push( ...x ); return nextPage() } );
      } else {
        return allRevs;
      }
    };
    return nextPage()
      .then( x => {
        var results = {};
        x.forEach( rev => {
          results = results || 0;
          results++;
        } );
        return results;
      } );
  }).then( x=> {
    console.log( Object.keys(x).sort((a,b)=>x-x).map(a=>]).map((a,i)=>`|-
|${i+1}
|}]]
|${a}
`).join('') );
    
  } );
}

// Use a list of all medical articles
getTopEditors( 'Category:All_WikiProject_Medicine_articles' );