User:ARandomCitizen/global.js

importArticles(	{   		type: 'script',		articles: [			'u:dev:MediaWiki:ListFiles/code.js',			'u:dev:MediaWiki:ThemeToggler.js',			'u:dev:MediaWiki:CatFilter/code.js',			'u:dev:MediaWiki:TemplatesUsedModule.js',			'u:dev:MediaWiki:ImportJSPage/code.js',			'u:dev:MediaWiki:NullEditButton/code.js',			'u:dev:MediaWiki:RestoreRevButton.js',			//'u:dev:MediaWiki:NoImageLightbox/code.js',		]	} ); $( function {	$('aside.page__right-rail').prepend( $(' ', { id: 'stickyRightRailButton'} ).prepend(			$("button.right-rail-toggle").css({'position':'sticky', 'top':'58px'})		).css({'position':'absolute', 'right':'0', 'height':'100%', 'padding-bottom':'430px', 'padding-top':'15px'}) ); });

$( function {	$('#my-tools-menu.wds-list').append( $('', {'class':'overflow'}).append(   		$('', { href: 'https://help.fandom.com/wiki/Extension:DPL3/Manual', text: 'DPL Manual' })		),		$('', {'class':'overflow'}).append(   		$('', { href: 'https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual', text: 'Lua' })		),		$('', {'class':'overflow'}).append(   		$('', { href: mw.util.getUrl('User:ARandomCitizen/sandbox'), text: 'Sandbox' })		)	); } );

$( function {	$('.wds-dropdown.explore-menu ul.wds-list.wds-is-linked').append( $('').append(   		$('', { href: mw.util.getUrl('Special:SocialActivity') }).append( $(' ', { text: 'Social' }) )   	)    ); } );

$( function {	$('#p-views.page-header__actions #p-cactions > ul.wds-list.wds-is-linked').append( $('').append(			$('',{ href: mw.util.getUrl(mw.config.get('wgPageName')) + '?useskin=fandommobile', text: 'FandomMobile' })		)	);	});

$( function {	var allpagesbutton = $('.fandom-community-header__local-navigation .explore-menu a[data-tracking="explore-all-pages"]').parent;	$(allpagesbutton).addClass('wds-dropdown-level-nested is-calculated').find('a').addClass('wds-dropdown-level-nested__toggle').append( $(' ') ).after( $(' ',{'class': 'wds-is-not-scrollable wds-dropdown-level-nested__content'}).append(			$('', {'class': 'wds-list wds-is-linked'}).append( $('').append(					$('',{ href: mw.util.getUrl('Special:AllPages') + '?from=&to=&namespace=10', text: 'Templates' })				),				$('').append(					$('<a>',{ href: mw.util.getUrl('Special:AllPages') + '?from=&to=&namespace=8', text: 'MediaWiki' })				),				$('<li>').append(					$('<a>',{ href: mw.util.getUrl('Special:AllPages') + '?from=&to=&namespace=828', text: 'Modules' })				)			)		)	); } );

$(function {	$('.action-submit .page.page-is-edit .page__main').append( $(' ', { id: 'ToggleRightRailPreview-container'}).append(			$(' ', { id:'ToggleRightRailPreview'}).append( $(' ', { text: 'Rail' }) )   	)    );    $('#ToggleRightRailPreview-container').css({'position': 'absolute', 'top': '50px', 'right': '-15px', 'height': '100%', 'padding-bottom': '430px'});    $("#ToggleRightRailPreview").css({'position': 'sticky', 'top': '75px'});    var checkRightRailPreview = 0;    $("#ToggleRightRailPreview").click(function { if (checkRightRailPreview === 0) { $('#wikiPreview .mw-parser-output').css({'width': 'calc(100% - 336px)'}); checkRightRailPreview = 1; } else { $('#wikiPreview .mw-parser-output').removeAttr('style'); checkRightRailPreview = 0; }	} ); } );

$( function {	if ($('body').hasClass('is-gamepedia')) {		$('#my-tools-menu.wds-list').prepend( $('<li>', {'class':'overflow'}).append(   		$('<a>', { href: mw.util.getUrl('Special:CargoTables'), text: 'Cargo' })			)		);	} }); /*$( function {	// visual	mw.hook( 've.activationComplete' ).add( function { if ($('#ToggleRightRailPreview-ve').length === 0) { $('.page__main').append(				$(' ', { id:'ToggleRightRailPreview-ve'}).append( $(' ', { text: 'Rail' }) )   		);		}		$("#ToggleRightRailPreview-ve").css({'position': 'absolute', 'top': '50px', 'right': '-15px'}); var checkRightRailPreview_ve = 0; $("#ToggleRightRailPreview-ve").click(function {   		if (checkRightRailPreview_ve === 0) {    			$('#content .ve-ui-surface-visual').css({'width': 'calc(100% - 286px)'});    			checkRightRailPreview_ve = 1;    		} else {    			$('#content .ve-ui-surface-visual').removeAttr('style');    			checkRightRailPreview_ve = 0;    		}		} ); } );	//visual source	mw.hook( 'wikipage.content' ).add( function { $('.ve-ui-summaryPanel-previewButton .oo-ui-buttonElement-button').click(function{			if ($('#ToggleRightRailPreview-vse').length === 0) {				$('.oo-ui-window-content').append( $(' ', { id:'ToggleRightRailPreview-vse'}).append(   					$(' ', { text: 'Rail' })     				) );			}		});	} ); } );

$( function {	$('.new.mw-userlink').each( function { var userlink = $(this).attr('href'); $(this).attr('href', userlink.replace('?action=edit&redlink=1','') ); $(this).removeAttr('data-uncrawlable-url'); }); });