User:Nightwatchc/vector.js

// 2feb09 move left panel to bottom of page // commented out 19dec2011 importScript('user:js/bottomSidebar.js') //user:js/bottomSidebar // function getUserSpaceWikiLink(page, name) { return getWikiLink('User:'+wgUserName+'/'+page, (name?name:page)); } function getWikiLink(page, name) { return ''+(name?name:page)+''; } function insertUserLink(id, page, name) { var talklink = document.getElementById('pt-mytalk'); var newuserlink = document.createElement('LI'); newuserlink.id = 'pt-' + id; newuserlink.innerHTML = getUserSpaceWikiLink(page, (name?name:page)); talklink.parentNode.insertBefore(newuserlink, talklink); } $(function {        insertUserLink('mycss', 'vector.css', 'css');        insertUserLink('myjs', 'vector.js', 'js'); }); // /*

// 11May09 hilite Admins importScript('User:Ais523/adminrights.js') //hilight AdminsRetrieved from "http://en.wikipedia.org/wiki/User:Oosoom/monobook.js"Personal tools

// 28dec2011 for Vector only - toggle sidebar (adds option to MORE dropdown menu). Try again 5mar2015 //importScript("User:PleaseStand/hide-vector-sidebar.js");

// 7june2012 try faded watchlist importScript('User:Equazcion/ReverseMarked.js');

// 12june2015 live split screen preview in EDIT // User:TheDJ/ActualLivePreview.js //mw.loader.load('//en.wikipedia.org/w/index.php?title=User:TheDJ/ActualLivePreview.js&action=raw&ctype=text/javascript'); importScript('User:TheDJ/ActualLivePreview.js');

// 12june2015 importScript("User:PleaseStand/userinfo.js");

/* hide-vector-sidebar.js: Adds a button to toggle visibility of the Vector sidebar. Written by PleaseStand. Public domain; all copyright claims waived as described in http://en.wikipedia.org/wiki/Template:PD-self */

( function ( mw, $ ) {	var sidebarSwitch;

function sidebarHide { document.getElementById( 'mw-panel' ).style.visibility = 'hidden'; document.getElementById( 'mw-head-base' ).style.marginLeft = '0'; document.getElementById( 'content' ).style.marginLeft = '0'; document.getElementById( 'left-navigation' ).style.marginLeft = '0'; document.getElementById( 'footer' ).style.marginLeft = '0'; if ( sidebarSwitch ) { sidebarSwitch.parentNode.removeChild(sidebarSwitch); }		sidebarSwitch = mw.util.addPortletLink( 'p-cactions', '#', 'Show sidebar', 'ca-sidebar', 'Show the navigation links', 'a' ); $( sidebarSwitch ).click( function ( e ) {			e.preventDefault;			sidebarShow;		} ); }	function sidebarShow { document.getElementById( 'mw-panel' ).style.visibility = ''; document.getElementById( 'mw-head-base' ).style.marginLeft = ''; document.getElementById( 'content' ).style.marginLeft = ''; document.getElementById( 'left-navigation' ).style.marginLeft = ''; document.getElementById( 'footer' ).style.marginLeft = ''; if ( sidebarSwitch ) { sidebarSwitch.parentNode.removeChild(sidebarSwitch); }		sidebarSwitch = mw.util.addPortletLink( 'p-cactions', '#', 'Hide sidebar', 'ca-sidebar', 'Hide the navigation links', 'a' ); $( sidebarSwitch ).click( function ( e ) {			e.preventDefault;			sidebarHide;		} ); }	// Only activate on Vector skin if ( mw.config.get( 'skin' ) === 'vector' ) { $.when($.ready,mw.loader.using('mediawiki.util')).then(function{			// Change this if you want to show the sidebar by default			sidebarHide;		} ); } }( mediaWiki, jQuery ) );