User:Americhino/global.js

if (mw.config.get('wgCityId') === '177' || mw.config.get('wgCityId') === '7931') { importArticles({       type: 'script',        articles: [            'u:dev:MediaWiki:FANSUN.js',        ],        type: 'style',        articles: [            'u:dev:MediaWiki:FANSUN.css',        ]    }); } // 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', }; $(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   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;    }    /* 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('add-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:dev:MediaWiki:UserAccountAge/code.js',        'u:dev:MediaWiki:MastheadGender/code.js',        'u:dev:MediaWiki:LastEdited/code.js',        'u:dev:MediaWiki:ContribsLink/code.js',        'u:dev:MediaWiki:VSTFReport.js',         'u:dev:MediaWiki:WHAM/code.2.js',         'u:dev:MediaWiki:QuickDiff/code.js',         'u:dev:MediaWiki:MassProtect/code.js',         'u:dev:MediaWiki:MassEdit/code.js',         'u:dev:MediaWiki:PreferenceLinks.js', // end of ucp and legacy working        'u:community:User:Americhino/AdminTools.javascript', // works on legacy        'u:community:User:Americhino/DevTools.javascript', // works on legacy        'u:dev:MediaWiki:MastheadRightsBadge.js',        'u:dev:MediaWiki:WDSIcons/code.js',        'u:dev:MediaWiki:NullEditButton/code.js',        'u:dev:MediaWiki:PortableListUsers.js',        // Unknown compatibility from this point on        'u:dev:MediaWiki:GlobalEditcount/code.js', 'u:dev:MediaWiki:RevealAnonIP/usercode.js', 'u:dev:MediaWiki:WorkingMoreUsersCount.js', 'u:dev:MediaWiki:FandomizedWikiFeatures/adaptable.js', 'u:dev:MediaWiki:QuickLogs/code.js', 'u:dev:MediaWiki:EditConflictAlert/code.js', 'u:dev:MediaWiki:CodeLinksDropdown.js', // MY SCRIPT FIX IT        'u:dev:MediaWiki:SeeMoreActivityButton/code.js', 'u:dev:MediaWiki:FindAndReplace/code.js', 'u:dev:MediaWiki:SandboxLink/code.js', 'u:dev:MediaWiki:AjaxBlock/code.js', 'u:dev:MediaWiki:MassRename/code.js', 'u:dev:MediaWiki:MassRenameRevert/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', 'u:dev:MediaWiki:ViewDeleted/code.js', 'u:dev:MediaWiki:MassRedirect/code.1.js', 'u:dev:MediaWiki:CleanWantedFiles/code.js', 'u:dev:MediaWiki:Linksweeper/code.js', 'u:dev:MediaWiki:AjaxBatchUndelete.js', 'u:dev:MediaWiki:NotesModule/code.js', ] });