MediaWiki:Wikia.js: Difference between revisions

m Initial creating, taken from RuneScape Wikia
m Fixed link
 
(9 intermediate revisions by the same user not shown)
Line 11: Line 11:
     ] );
     ] );
     var includes = {  
     var includes = {  
        /**
        * Taken from RuneScape Wiki.
        *
        * Add extra links to the on wiki tab tab on wiki navigation.
        *
        * @author Ryan PM
        * @author Suppa chuppa
        * @author Sactage
        * @author Cqm
        */
        addTabLinks: {
            conditional: ( conf.wgAction === 'view' ),
            exec: function () {
                $( '.WikiHeader nav ul li.marked ul' )
                    .append(
                        /*$( '<li>' )
                            .addClass( 'subnav-2-item' )
                            .append(
                                $( '<a>' )
                                    .addClass( 'subnav-2a' )
                                    .attr( 'href', mw.util.wikiGetlink( 'Elite Dangerous:About' ) )
                                    .text( 'About us' )
                            ),*/
                        $( '<li>' )
                            .addClass( 'subnav-2-item' )
                            .append(
                                $( '<a>' )
                                    .addClass( 'subnav-2a' )
                                    .attr( 'href', mw.util.wikiGetlink( 'Elite Dangerous Wiki:Policies' ) )
                                    .text( 'Policies' )
                            )
                    );
            }
        },
         /**
         /**
        * Taken from RuneScape Wiki.
        *
         * Add custom masthead boxes to profile masthead
         * Add custom masthead boxes to profile masthead
         *
         *
Line 32: Line 68:
   
   
                         // bot
                         // bot
                         'KyoukoBot':  'BOT'
                         'Kyouko Bot':  'BOT',
   
   
                         // bureaucrat
                         // bureaucrat
                       
                        // Frontier staff
                        'BrettC Frontier':  'FRONTIER'
                     },
                     },
                     $masthead;
                     $masthead;
Line 46: Line 85:
                     $masthead = $( '.UserProfileMasthead' );
                     $masthead = $( '.UserProfileMasthead' );
   
   
                     // remove old rights
                     // remove old rights if not from Frontier
                     $masthead
                     if(rights[ title ] !== 'FRONTIER'){
                        .find( '.tag' )
                        $masthead
                        .remove();
                            .find( '.tag' )
                            .remove();
                    }
                     // add new rights
                     // add new rights
                     $masthead
                     $masthead
Line 63: Line 103:
         },
         },
          
          
        /**
        * Ratings sidebar module (oasis)
        */
        /**ratings: {
            conditional: (
                conf.wgAction === 'view' &&
                conf.wgNamespaceNumber === 0
            ),
            scripts: 'MediaWiki:Wikia.js/ratings.js'
        },*/
     };
     };