Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

MediaWiki:Gadget-SpecialPages.js/CountEdits.js

From DDO wiki
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes, you can click here or try one of the methods below..

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl+F5 or Ctrl+r ( Command+r on a Mac)
  • Google Chrome: Press Ctrl+ Shift+R ( Command+ Shift+R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl+F5
  • Konqueror: Click Reload or press F5
  • Opera: Clear the cache in Tools ‣ Preferences
//<nowiki> For [[Special:CountEdits]]
// All users with an edit: https://ddowiki.com/api.php?action=query&list=allusers&format=jsonfm&auprop=groups|editcount|registration&aulimit=max&auwitheditsonly=
 
// All contributions for a user: https://ddowiki.com/api.php?action=query&list=usercontribs&uclimit=max&ucdir=newer&continue=&format=jsonfm&ucuser=
/// All users blocked by user: https://ddowiki.com/api.php?action=query&list=logevents&letype=block&lelimit=max&leprop=title&continue=&format=jsonfm&leuser=
/// All pages deleted by user: https://ddowiki.com/api.php?action=query&list=logevents&letype=delete&lelimit=max&leprop=title&continue=&format=jsonfm&leuser=
/// All pages moved by user: https://ddowiki.com/api.php?action=query&list=logevents&letype=move&lelimit=max&leprop=title&continue=&format=jsonfm&leuser=
/// All pages protected by user: https://ddowiki.com/api.php?action=query&list=logevents&letype=protect&lelimit=max&leprop=title&continue=&format=jsonfm&leuser=
//( function ( $, mw ) {
  // Test what page you are on
  if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'CountEdits' ) {
    var useLive = confirm( 'Clicking OK will redirect you to the comprehensive JavaScript version of this page' );
    if ( useLive ) {
      window.location = 'https://ddowiki.com/page/Special:BlankPage?withJS=MediaWiki:CountEdits.js';
    }
  } else if ( mw.config.get( 'wgCanonicalPagename' ) === 'Special:BlankPage' && mw.util.getParam( 'withJS' ) === 'MediaWiki:CountEdits.js' ) {
    // We're on the .js version page... Get to work processing
    // Get a list of users with at least one edit
    var getUserContinue = '';
    // while ( getUserContinue !== null ) {
      new mw.Api().get( {
        action: 'query',
        list: 'allusers',
        auprop: 'groups|editcount|registration',
        aulimit: 'max',
        auwitheditsonly: true,
        aufrom: getUserContinue,
        continue: ''
      } ).done( function( gotUsers ) {
        for ( i = 0; i < gotUsers.query.allusers.length; i++ ) {
          console.log( '%d: %s', i, gotUsers.query.allusers[ i ].name );
        }
        if ( gotUsers.continue === undefined ) {
          getUserContinue = null;
        } else {
          getUserContinue = gotUsers.continue.aufrom
        }
        console.log( 'continue is: %s', getUserContinue );
        console.log( '%o', gotUsers );
      } );
    // }
  }
//} )( mediaWiki, jQuery );
//</nowiki>[[Category:Gadgets]]