User:Withersoul 235/global.js

importScriptPage("MediaWiki:PageMakerPro/code.js", "dev") ; importScriptPage('LightBlock/code.js', 'dev'); importScriptPage('FluidButton/code.js', 'dev'); importArticles({   type: 'script',    articles: [        'u:dev:LastEdited/code.js',    ] });

importArticles({   type: 'script',    articles: [        // ...        'u:dev:MediaWiki:RestoreContributeButton/code.js',        // ...    ] });

// Importing required plugin(s) importArticles({       type: 'script',        articles: [            'u:dev:Colors/code.js'        ]    }); // MediaWiki variables var mw_config = mw.config.get([           'wgUserName',            'skin',            'wgPageName',            'wgServer',            'wgUserGroups'        ]), // Masthead configurations masthead = $.extend({}, config, {           staffLogo: 'https://images.wikia.nocookie.net/common/extensions/wikia/DesignSystem/bower_components/design-system/dist/svg/wds-company-logo-fandom.svg',            theme_color: ''        }); mw.hook('dev.colors').add(function createStylesheet{       var style =            '.UserPageHeader .UserIdentityBox {\                background-color: $body;\            }\            .UserPageHeader .UserIdentityBox .masthead-content .masthead-header {\                border-bottom: 2px solid $header;\                color: $text;\            }\            .UserPageHeader .tabs-container {\                background-color: $tabs;\            }\            .UserPageHeader .tabs-container ._tab > a {\                color: $link; \            } \            .UserPageHeader .tabs-container ._tab:hover > a {\                background-color: $tabshover;\            } \            .UserIdentityBox .masthead-header .tag-container .tag { \                background-color: $menu; \                color: $text; \            }';        window.dev.colors.css(style, { tabs: window.dev.colors.parse(window.dev.colors.wikia.header).lighten(15).hex, tabshover: window.dev.colors.parse(window.dev.colors.wikia.header).lighten(-10).hex });   });    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('_', ' ')        }).done($.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 = $(''); row1.html([                           $('').html([ $('').text(_user.name), $('').html((_user.realName !== ) ? ' aka ' + _user.realName : ), $(' ').html(_user.tags.map(function(group, index){ return $('').html(function{                                       var tag_html = '';                                        if (group == 'Staff'){                                            tag_html = group + ' ';                                            tag_html = tag_html.concat('<img class="staff-logo" src="' + masthead.staffLogo + '" />');                                        } else {                                            tag_html = group;                                        }                                        return tag_html;                                    }); }))                           ]),                            $(' ').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')                                ])*/ ])                       ]);                        return [row1, row2]; });                   return [$avatar, $masthead_body];                }); $tabs.html(Object.keys(tabs).map(function(name, index){ if ('User Activity' == name){ var db_name = wgServer.replace(/^https?:\/\/(.+)\.wikia\.com/g, '$1'); if (                           ['c', 'community'].indexOf(db_name) > -1                            && wgPageName.indexOf(wgUserName) > -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));        if (window.dev.colors) createStylesheet;        $masthead_old.replaceWith($masthead);    } })(this.mediaWiki, this.jQuery, this.masthead || {});
 * (function(mw, $, config){