User:ARandomCitizen/global.js

importArticles(	{   		type: 'script',		articles: [        			'u:dev:MediaWiki:ThemeToggler.js',			'u:dev:MediaWiki:HeaderLinks/code.js', 			'u:dev:MediaWiki:OriginalImages.js',			'u:dev:MediaWiki:ListFiles/code.js',			'u:dev:MediaWiki:CatFilter/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: mw.util.getUrl('User:ARandomCitizen/sandbox'), text: 'Sandbox' })	) ); } );

/*$( function {	if ($('#ca-ve-edit').length === 0 && $('#ca-ve-edit-2').length === 0) {		page = mw.config.get('wgPageName');		$('#p-cactions > ul').prepend( $('').prepend(				$('', { id: 'ca-ve-edit-2', href: '/wiki/'+ page + '?veaction=edit', 'accesskey': 'v', text: 'VisualEditor' })			)		);	} } ); */

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

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

$(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 {	var wikiname = mw.config.get('wgDBname');	if ((wikiname === 'wikia') || (wikiname === 'dev')) {		// stolen from dev:ThemeToggler		$.when( $.get(mw.util.wikiScript( 'wikia' ) + '?controller=ThemeApi&method=themeVariables&variant=dark&cb=' + ( new Date.getTime ) ), $.get( mw.util.wikiScript( 'load' ) + '?modules=ext.fandom.DesignSystem.GlobalNavigation.brand.dark.css%7Cext.fandom.DesignSystem.brand.dark.css&only=styles' ) )		.done( function( wikiTheme, brandTheme ) { var css = wikiTheme[0] + brandTheme[0]; var $s = $( ' ' ).attr( 'id', 'pcjThemeSwitch' ).appendTo('body'); $($s).text(css); $( 'body' ).removeClass( 'theme-fandomdesktop-light' ).addClass( 'theme-fandomdesktop-dark' ); mw.config.set( 'isDarkTheme', !mw.config.get( 'isDarkTheme' ) ); } );	} } );

$( function {	if ($('body').hasClass('is-gamepedia')) {		$('#my-tools-menu.wds-list').prepend( $('', {'class':'overflow'}).append(   		$('', { href: '/wiki/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' })     				) );			}		});	} ); } );