MediaWiki:Gadget-listStyles.js

// //( 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' ){        // WhatLinksHere        path = $( 'ul#mw-whatlinkshere-list' );	        addPtLink( path );      } else if ( specialPageName == 'Contributions' ) {        // Contributions        path = $( 'span.mw-revdelundel-link' ).parents( 'ul' );        addPtLink( path );      } else if ( specialPageName == 'Activeusers' ){        // 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 ); //