MediaWiki:Common.css: Unterschied zwischen den Versionen

Aus Sokradia
Zur Navigation springen Zur Suche springen
KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 10: Zeile 10:


/* Manipulation der Toolbox im SideBar */
/* Manipulation der Toolbox im SideBar */
function ModifySidebar( action, section, name, link ) {
try {
switch ( section ) {
case 'languages':
var target = 'p-lang';
break;
case 'toolbox':
var target = 'p-tb';
break;
case 'navigation':
var target = 'p-navigation';
break;
default:
var target = 'p-' + section;
break;
}
if ( action == 'add' ) {
var node = document.getElementById( target )
  .getElementsByTagName( 'div' )[0]
  .getElementsByTagName( 'ul' )[0];
var aNode = document.createElement( 'a' );
var liNode = document.createElement( 'li' );
aNode.appendChild( document.createTextNode( name ) );
aNode.setAttribute( 'href', link );
liNode.appendChild( aNode );
liNode.className = 'plainlinks';
node.appendChild( liNode );
}
if ( action == 'remove' ) {
var list = document.getElementById( target )
  .getElementsByTagName( 'div' )[0]
  .getElementsByTagName( 'ul' )[0];
var listelements = list.getElementsByTagName( 'li' );
for ( var i = 0; i < listelements.length; i++ ) {
if (
listelements[i].getElementsByTagName( 'a' )[0].innerHTML == name ||
listelements[i].getElementsByTagName( 'a' )[0].href == link
)
{
list.removeChild( listelements[i] );
}
}
}
} catch( e ) {
// Lass uns einfach ignorieren, was passiert ist
return;
}
}
function CustomizeModificationsOfSidebar() {
// fügt [[Special:AllPages|Special:AllPages]] der Toolbox hinzu
ModifySidebar( 'add', 'toolbox', 'AllPages', 'https://cc-zeitlos.synology.me/mediawiki/index.php/Special:AllPages' );
// Entfernt [[Special:Upload|Special:Upload]] aus der Toolbox
ModifySidebar( 'remove', 'toolbox', 'Upload file', 'https://cc-zeitlos.synology.me/mediawiki/index.php/Special:Hochladen' );
}
jQuery( CustomizeModificationsOfSidebar );

Version vom 29. Januar 2022, 11:15 Uhr

/* Das folgende CSS wird für alle Benutzeroberflächen geladen. */
/* Changes the background color behind the top half of the logo and at top of each page: */
#mw-page-base {
  background-color: #FFBF00;
}
/* Changes the background color of the bottom and left of each page, up to behind half of the logo: */
body {
  background-color: #FFBF00;
}

/* Manipulation der Toolbox im SideBar */