User:Americhino/global.js

if (wgCityId === '177' || 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; forking code by Fandyllic var adminWikis = { calvinandhobbes: 'Calvin and Hobbes Wiki', paladins: 'Paladins Wiki', americhino: 'Americhino Wiki', dev: 'FANDOM Open Source Library', }; var otherWikis = { community: 'Community Central', wlb: 'Wikia Language Brigade', 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', brooklyn99: 'Brooklyn Nine-Nine Wiki', elenaofavalor: 'Elena of Avalor 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])			) )	});	// Add "Block" button to admin wikis list // Not blocking users on wrong wikis lol if (wgCityId === 680, 1304663, 1452453) { $adminWikisList.append(   		$('').append( $('') .attr('href', '/wiki/Special:Block/') .attr('target', '_blank') .attr('id', 'AdminBlockButton') .addClass('wds-button wds-is-secondary wds-global-navigation__link-button') .text('Block') )   	);    	$('#NotAdminBlockButton').remove; } else { $adminWikisList.append(   		$('').append( $('') .attr('target', '_blank') .attr('id', 'NotAdminBlockButton') .addClass('wds-button wds-is-secondary wds-global-navigation__link-button wds-is-disabled') .text('Block') )   	);    	$('#AdminBlockButton').remove; }   /* Don't try to add Active Wikis menu, if it appears to already exist */ if (!window.otherWikis || $('#OtherWikis').length) { return; }   /* Star building My Other Wikis menu */ var $otherWikisList = $('').addClass('wds-list wds-is-linked'); var $otherWikis = $('') //.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('Wikis'), $(' ') ),			$(' ')				.addClass('wds-is-not-scrollable wds-dropdown-level-2__content')				.append($otherWikisList)		); // Add links from active wikis list Object.keys(window.otherWikis).forEach(function (key) {       $otherWikisList.append( $('<li>').append(               $('<a>')                    .attr('href', '//' + key + '.wikia.com/')                    .attr('target', '_blank')                    .text(window.otherWikis[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($otherWikis); /* 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: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:EditConflictAlert/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:MediaWiki:SeeMoreActivityButton/code.js', 'u:dev:MediaWiki:CodeLinksDropdown.js', 'u:dev:MediaWiki:FindAndReplace/code.js', 'u:dev:MediaWiki:SandboxLink/code.js', 'u:dev:MediaWiki:AjaxBlock/code.js', 'u:community:User:Americhino/AdminTools.javascript', 'u:diepio:Gadget-WDSButtons.js', 'u:dev:NullEditButton/code.js', 'u:dev:MassProtect/code.js', 'u:dev:MassRename/code.js', 'u:dev:MassRenameRevert/code.js', 'u:dev:AnchoredRollback/code.js', 'u:dev:ViewDeleted/code.js', 'u:dev:MassRedirect/code.1.js', 'u:dev:AutoEditPages/code.js', 'u:dev:CleanWantedFiles/code.js', 'u:dev:Linksweeper/code.js', 'u:dev:AjaxBatchUndelete.js', ] });