User:Americhino/global.js

if (wgCityId == '177') {importStylesheetPage('MediaWiki:FANSUN.css', 'dev');} if (wgCityId == '7931') {importStylesheetPage('MediaWiki:FANSUN.css', 'dev');} AutoCreateUserPagesConfig = { content: { 2: ,       3: ,        1202: ''    },    summary: 'Creating pages automatically' }; var qtUserPageTemplate = ''; var qtMessageWallGreetingTemplate = ''; // Adding favorite wikis to menu dropdown; borrowing code by Fandyllic var adminWikis = { calvinandhobbes: 'Calvin and Hobbes Wiki', paladins: 'Paladins Wiki', elenaofavalor: 'Elena of Avalor Wiki', americhino: 'Americhino Wiki', }; var activeWikis = { dev: 'FANDOM Open Source Library', community: 'Community Central', wlb: 'Wikia Language Brigade', }; var infoWikis = { marvelcinematicuniverse: 'MCU Wiki', overwatch: 'Overwatch Wiki', fortnite: 'Fortnite Wiki', ddlc: 'DDLC Wiki', evangelion: 'Evangelion', ranma: 'Ranma Wiki', kpop: 'K-Pop Wiki', gameofthrones: 'Game of Thrones Wiki', naruto: 'Narutopedia', hataraku: 'The Devil is a Part-Timer! Wiki', brooklyn99: 'Brooklyn Nine-Nine Wiki', }; $(function {	'use strict';    $('.wds-global-navigation__link-group .wds-dropdown__content').addClass('wds-is-not-scrollable');    /* Don't try to add Admin Wikis menu, if it appears to already exist */	if (!window.adminWikis || $('#AdminWikis').length) {		return;	}    /* Start building My Favorite Wikis menu */	var $adminWikisList = $('').addClass('wds-list wds-is-linked');	var $adminWikis = $('')		.attr('id', 'AdminWikis')		.addClass('wds-dropdown-level-2')		.append( $('') .attr('href', '#') .addClass('wds-dropdown-level-2__toggle') .attr('data-tracking', 'custom-level-2') .append(					$(' ').text('Admin'),					$(' ')				), $(' ')				.addClass('wds-is-not-scrollable wds-dropdown-level-2__content') .append($adminWikisList) );

// Add links from admin wikis list Object.keys(window.adminWikis).forEach(function (key) {		$adminWikisList.append( $('').append(				$('')					.attr('href', '//' + key + '.wikia.com/')					.attr('target', '_blank')					.text(window.adminWikis[key])			) );	});   /* Don't try to add Active Wikis menu, if it appears to already exist */ if (!window.activeWikis || $('#ActiveWikis').length) { return; }   /* Star building My Other Wikis menu */ var $activeWikisList = $('').addClass('wds-list wds-is-linked'); var $activeWikis = $('') //.attr('id', 'MyFavWikis2') .addClass('wds-dropdown-level-2') .append(			$('')				.attr('href', '#')				.addClass('wds-dropdown-level-2__toggle')				.attr('data-tracking', 'custom-level-2')				.append( $(' ').text('Active'), $(' ') ),			$(' ')				.addClass('wds-is-not-scrollable wds-dropdown-level-2__content')				.append($activeWikisList)		); // Add links from active wikis list Object.keys(window.activeWikis).forEach(function (key) {       $activeWikisList.append( $('').append(               $('')                    .attr('href', '//' + key + '.wikia.com/')                    .attr('target', '_blank')                    .text(window.activeWikis[key])            ) );	}); /* Don't try to add info Wikis menu, if it appears to already exist */ if (!window.infoWikis || $('#InfoWikis').length) { return; }   /* Star building Info Wikis menu */ var $infoWikisList = $('').addClass('wds-list wds-is-linked'); var $infoWikis = $('') //.attr('id', 'MyFavWikis2') .addClass('wds-dropdown-level-2') .append(			$('<a>')				.attr('href', '#')				.addClass('wds-dropdown-level-2__toggle')				.attr('data-tracking', 'custom-level-2')				.append( $(' ').text('Info'), $('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="12" height="12" class="wds-icon wds-icon-tiny wds-dropdown-chevron"><path d="M6.003 10.002a.997.997 0 0 1-.707-.293L.293 4.706a1 1 0 1 1 1.414-1.414l4.296 4.295 4.293-4.293A1 1 0 1 1 11.71 4.71l-5 5a.997.997 0 0 1-.707.293" fill-rule="evenodd"> ') ),			$(' ')				.addClass('wds-is-not-scrollable wds-dropdown-level-2__content')				.append($infoWikisList)		); // Add links from active wikis list Object.keys(window.infoWikis).forEach(function (key) {       $infoWikisList.append( $('<li>').append(               $('<a>')                    .attr('href', '//' + key + '.wikia.com/')                    .attr('target', '_blank')                    .text(window.infoWikis[key])            ) );	});   /* Add completed other wikis (favWikis2) HTML blob to profile menu */ $('div.wds-global-navigation__link-group > div.wds-dropdown__content > ul.wds-list > li:first-child') .before($infoWikis);

/* Add completed other wikis (favWikis2) HTML blob to profile menu */ $('div.wds-global-navigation__link-group > div.wds-dropdown__content > ul.wds-list > li:first-child') .before($activeWikis); /* Add completed fav wikis (favWikis) HTML blob to profile menu */ $('div.wds-global-navigation__link-group > div.wds-dropdown__content > ul.wds-list > li:first-child') .before($adminWikis); });

/* Start a Wiki Icon; thank you Speedit */ mw.hook('dev.wds').add(function(wds) {   $('.wds-global-navigation__link-button[data-tracking-label="start-a-wiki"]').html((function(i) {        i.setAttribute('fill', '#ccc !important');        return i;    }(wds.icon('plus-small')))); }); /* Share icon */ $('#ShareEntryPoint').empty; mw.hook('dev.wds').add(function(wds) {   $('#ShareEntryPoint').html((function(i) {        return i;    }(wds.icon('share-small')))); }); /* Imports */ importArticles({   type: 'script',    articles: [        'u:kocka:User:KockaAdmiralac/AutoCreateUserPages.javascript',        'u:dev:UserAccountAge/code.js',        'u:dev:MastheadGender/code.js',        'u:dev:GlobalEditcount/code.js',        'u:dev:LastEdited/code.js',        'u:dev:RevealAnonIP/usercode.js',        'u:dev:MediaWiki:WorkingMoreUsersCount.js',        'u:dev:EditBio/code.js',        'u:americhino:MediaWiki:QuickCreateMessageWallGreetingShort.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:VSTFReport.js',        'u:americhino:MediaWiki:ModernPortableCSSPad/code.js',        'u:dev:MediaWiki:ModernBackToTopButton/code.js',        'u:dev:MediaWiki:EditBio/code.js',        'u:dev:MediaWiki:FandomizedWikiFeatures/adaptable.js',        'u:dev:MediaWiki:QuickLogs/code.js',        'u:dev:MediaWiki:WDSIcons/code.js',        'u:dev:MediaWiki:MastheadRightsBadge.js', 'u:dev:MediaWiki:WHAM/code.2.js', 'u:dev:MediaWiki:QuickDiff/code.js', 'u:dev:AjaxDelete/code.js', 'u:dev:MediaWiki:SeeMoreActivityButton/code.js', 'u:dev:MediaWiki:CodeLinksDropdown.js', 'u:dev:MediaWiki:FindAndReplace/code.js', 'u:dev:MediaWiki:CodeSelectAll.js', 'u:dev:MediaWiki:SandboxLink/code.js', ] });