Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes.
Known Issue: Xatheral has been temporarily disabled while we investigate a bug with Year of the Dragon gift delivery.DDO Forums edit

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:Vector.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
/* Any JavaScript here will be loaded for users using the Vector skin */

  function deleteLogEntry( entryID, delLogReason ) {
    var reasonDelLog = 'Vandalism only account. Removing ';
    switch ( delLogReason ) {
      case 'phone' :
        reasonDelLog += 'possible phone number ';
      case 'long' :
        reasonDelLog += 'long page name ';
      default :
        reasonDelLog += 'plausible ';
    }
    reasonDelLog += '[[Special:RecentChanges|RC]] spam with [[MW:Gadget-spamBlock|DeSpammer]].';
    ( new mw.Api() ).postWithToken( 'delete', {
      action: 'revisiondelete',
      type: 'logging',
      ids: entryID,
      hide: 'content',
      reason: reasonDelLog
    } ).done( function( rdResult ) {
      console.log( '%o', rdResult );
      $( 'a#logID-' + entryID ).text( 'log cleaned' ).removeAttr( 'onclick' ).removeAttr( 'style' ).removeAttr( 'title' );// Might change this later so the onclick takes you to the log entry to review it.
    } );
  }


/* ************************************************************** */
/* Allow "Random page" link in [[MW:Sidebar]] to work for anon
/* readers despite system caching setup.
/* 
/* Author: [[User:Technical_13]]
/* Date:   2022/08/04
/* 
//*/ 

  if ( mw.config.get( 'wgUserName' ) === null ) {
    ( new mw.Api ).get( {
      action : 'query',
      list   : 'random',
      format : 'json',
      rnlimit: 'max'
    } ).done( data => {
      var titles = [];
      data.query.random.forEach( res => { titles.push( res.title.replace( / /g, '_' ) ); } );
      $( 'li#n-Random-page > a')[ 0 ].href = 'https://ddowiki.com/page/' + titles[ Math.floor( Math.random() * data.query.random.length - 1 ) ];      
    } );
  }