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. 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:Gadget-listStyles.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>
//( function ( $, mw ) {
  var path = $( 'ul' );
  function addPtLink( path ) {
    var listStyle = mw.util.addPortletLink(
      'p-personal',
      '#',
      '(list style)',
      'pt-liststyle',
      'Switch list style between bullet and numbered [alt-shift-`]',
      '`',
      '#pt-userpage'
    );
    $( listStyle ).click( function ( e ) {
      e.preventDefault();
      path.css( 'list-style-image', 'none' );
      path.css( 'list-style-type', function ( i, val ) {
        return val === "decimal" ? "disc" : "decimal";
      } );
    } );
  }
  var pageAction = mw.config.get( 'wgAction' );
  if ( pageAction !== 'history' ){
    var nsNumber = mw.config.get( 'wgNamespaceNumber' );
    if ( nsNumber === -1 ) {
      // Special: pages
      var specialPageName = mw.config.get( 'wgCanonicalSpecialPageName' );
      if ( specialPageName === 'Whatlinkshere' ){
        // [[Special:WhatLinksHere]]
        path = $( 'ul#mw-whatlinkshere-list' );	
        addPtLink( path );
      } else if ( specialPageName === 'Contributions' || specialPageName === 'DeletedContributions' ) {
        // [[Special:Contributions]] [[Special:DeletedContributions]]
        path = $( 'span.mw-revdelundel-link' ).parents( 'ul' );
        addPtLink( path );
      } else if ( specialPageName === 'Activeusers' ){
        // [[Special:ActiveUsers]]
        path = $( 'a.mw-userlink' ).parents( 'ul' );
        addPtLink( path );
      }
    } else if ( nsNumber != 14 ) {
      var pageName = mw.config.get( 'wgPageName' );
    } else {
      // [[Category:]]
      path = $( 'div.mw-content-ltr' ).find( 'ul' );
      addPtLink( path );
    }
  } else {
    // &action=history
    path = $( 'ul#pagehistory' );
    addPtLink( path );
  }
//} )( mediaWiki, jQuery );
//</nowiki>[[Category:Gadgets]]