User:ARandomCitizen/global.js

importArticles(	{   		type: 'script',		articles: [        			'u:dev:MediaWiki:ThemeToggler.js',			'u:dev:MediaWiki:HeaderLinks/code.js', 			'u:dev:MediaWiki:OriginalImages.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 {	$newmem = $('.new.mw-userlink');	$newmem.attr('href', $newmem.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') {		// 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' ) ); } );	} } );