User:Ultimate Dark Carnage/wikia.js

var mw_config = mw.config.get([       'wgUserName',        'skin',        'wgPageName',        'wgServer',        'wgUserGroups'    ]); function toLink(page){ return mw.util.wikiGetlink(page); }   if (        ['oasis', 'wikia'].indexOf(mw_config.skin) > -1        && $('#UserProfileMasthead').length    ){ var $masthead_old = $('#WikiaUserPagesHeader'), $masthead = $(''); $.nirvana.getJson('UserProfilePage', 'renderUserIdentityBox', {           title: mw_config.wgPageName.replace('_', ' ')        }, $.proxy(function renderBox(data){ var _user = data.user; $masthead.html(function createIdentityBox{               var $reloadURI = $(''.replace('$reload_uri', _user.userPage)),                    $masthead_content = $(''),                    $tabs = $(''),                    tabs = {                        'Profile': mw_config.wgServer + toLink('User:' + _user.name),                        'Talk Page': mw_config.wgServer + toLink('User talk:' + _user.name),                        'Blog': mw_config.wgServer + toLink('User blog:' + _user.name),                        'Contributions': mw_config.wgServer + toLink('Special:Contributions/' + _user.name),                        'Following': mw_config.wgServer + toLink('Special:Following'), 'User Activity': mw_config.wgServer + toLink('Special:UserActivity') };               $masthead_content.html(function{                    var $avatar = $(''),                        $masthead_body = $('');                    $avatar.html(function{ var $avatar_img = $(''.replace('$avatar', _user.avatar.replace(/\/scale-to-width-down\/(\d*)/, '/scale-to-width-down/' + 120))), $button = $('') .html('Edit Avatar'); return [$avatar_img, $button]; });                   $masthead_body.html(function{ var row1 = $(''), row2 = $(''), row3 = $(''); row1.html([                           $('').html([ $('').text(_user.name), $('').html((_user.realName !== ) ? ' aka ' + _user.realName : ), $(' ').html(_user.tags.map(function(group, index){ return $('<span class="tag tag-' + index + '" />').text(group); }))                           ]),                            $(' ').html([ $(' ').html([                                   $('<h3 class="masthead-section-head" />').text('I live in'),                                    $(' ').html(_user.location)                                ]), $(' ').html([                                   $('<h3 class="masthead-section-head" />').text('My occupation is'),                                    $(' ').html(_user.occupation || 'None')                                ]), $(' ').html([                                   $('<h3 class="masthead-section-head" />').text('I am'),                                    $(' ').html(_user.gender)                                ]) ]),                           $(' ').html([ $(' ').html([                                   $('<strong class="edit-counter" />').text(_user.edits),                                    $(' ').text('edits')                                ]), $(' ').html([                                   $('<strong class="tally-head" />').text('Joined:'),                                    $(' ').text(_user.registration)                                ]) ])                       ]);                        row2.html([                            $(' ').html([ $(' ').html([                                   $('<h3 class="masthead-section-head" />').text('Favorite wikis'),                                    $('<ul class="masthead-section-body wikis" />').html(_user.topWikis.filter(function(wiki){                                        return wiki.wikiName !== false;                                    }).map(function(wiki){                                        var $item = $(' ').html('' + wiki.wikiName + '</a>');                                        return $item;                                    }))                                ])/*, $(' ').html([                                   $('<h3 class="masthead-section-head" />').text('My occupation is'),                                    $(' ').text(_user.occupation || 'None')                                ])*/ ])                       ]);                        row3.html([                            $(' ')                        ]); return [row1, row2, row3]; });                   return [$avatar, $masthead_body];                }); $tabs.html(Object.keys(tabs).map(function(name, index){ if ('User Activity' == name){ var db_name = wgServer.replace(/http:\/\/(.*)\.wikia\.com/g, '$1'); if (['c', 'community'].indexOf(db_name) > -1){ return $('<div class="tab-item _tab" />').html('' + name + '</a>'); }                   } else { return $('<div class="tab-item _tab" />').html('' + name + '</a>'); }               }));                return [$reloadURI, $masthead_content, $tabs]; });       }, this));        $masthead_old.replaceWith($masthead);    } })(this.mediaWiki, this.jQuery, this.masthead || {});
 * (function(mw, $, config){