Abrir menu principal

UESPWiki β

Alterações

Utilizador:Fru1tbat/common.js

2 020 bytes adicionados, 01h42min de 21 de outubro de 2015
revert test
mw.util.addPortletLink ('p-tb', wgServer+wgArticlePath.replace("$1", "Special:PrefixIndex/"+wgPageName+"/"), 'Subpages'); // add subpages link to left

/* Copied from:
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
Probably won't work for monobook, but who knows? */


( 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', '#', 'Hide sidebar', 'ca-sidebar', 'Hide 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' ) {
$( function() {
// Change this if you want to change default
sidebarShow();
} );
}

}( mediaWiki, jQuery ) );
21
edições