Hauptmenü öffnen

AntamarWiki β

Änderungen

MediaWiki:Common.js

4.381 Bytes entfernt, 12:39, 30. Mai 2013
Click Event für NavHead hinzugefügt
/* Begin of mw.loader.using callback */
 
/**
* Load scripts specific to Internet Explorer
} );
} )();
/**
* Collapsible tables ********************************************************* * * Description: Allows tables to be collapsed, showing only the header. See * [[Wikipedia:NavFrame]].click events * Maintainers: [[User:R. Koot]]@author Gaddezwerch
*/
var autoCollapse = 2;var collapseCaption = 'verstecken';var expandCaption = 'anzeigen'; window.collapseTable = function ( tableIndex ) { var Button = document.getElementById( 'collapseButton' + tableIndex ); var Table = document.getElementById( 'collapsibleTable' + tableIndex ); if ( !Table || !Button ) { return false; } var Rows = Table.rows; var i; if ( Button.firstChild.data === collapseCaption ) { for ( i = 1; i < Rows.length; i++ ) { Rows[i].style.display = 'none'; } Button.firstChild.data = expandCaption; } else { for ( i = 1; i < Rows.length; i++ ) { Rows[i].style.display = Rows[0].style.display; } Button.firstChild.data = collapseCaption; }}; function createCollapseButtons() { var tableIndex = 0; var NavigationBoxes = {}; var Tables = document.getElementsByTagName( 'table' ); var i; function handleButtonLink( index, e ) { window.collapseTable( index ); e.preventDefault(); } for ( i = 0; i < Tables.length; i++ ) { if ( jQuery( Tables[i] )".hasClass( 'collapsible' NavHead") ) { /* only add button and increment count if there is a header row to work with */ var HeaderRow = Tables[i].getElementsByTagName( 'tr' )[0]; if ( !HeaderRow ) continue; var Header = HeaderRow.getElementsByTagName( 'th' )[0]; if ( !Header ) continue; NavigationBoxes[ tableIndex ] = Tables[i]; Tables[i].setAttribute( 'id', 'collapsibleTable' + tableIndex ); var Button = document.createElement( 'span' ); var ButtonLink = document.createElement( 'a' ); var ButtonText = document.createTextNode( collapseCaption ); Button.className = 'collapseButton'; /* Styles are declared in Common.css */ ButtonLink.style.color = Header.style.color; ButtonLink.setAttribute( 'idcursor', 'collapseButtonpointer' + tableIndex ); ButtonLink.setAttribute( 'href', '#' ); jQuery( ButtonLink ".NavHead").on( 'click', jQuery.proxy( handleButtonLink, ButtonLink, tableIndex ) ); ButtonLink.appendChild( ButtonText ); Button.appendChild( document.createTextNode( '[' ) ); Button.appendChildfunction( ButtonLink ); Button.appendChild( document.createTextNode( ']' ) ); Header.insertBefore( Button, Header.firstChild ); tableIndex++; } } for ( i = 0; i < tableIndex; i++ ) { if ( jQuery( NavigationBoxes[i] ).hasClass( 'collapsed' ) || ( tableIndex >= autoCollapse && jQuery( NavigationBoxes[i] this).hasClass( 'autocollapse' ) ) ) { window.collapseTable( i ); } else if ( jQueryparent( NavigationBoxes[i] ).hasClass find( 'innercollapse' ) ) { var element = NavigationBoxes[i]; while ((element = element.parentNode)) { if ( jQuery( element ).hasClass( 'outercollapseNavContent' ) ) { window.collapseTable toggle( i ); break; } } } }} jQuery( createCollapseButtons );
/**
* Maintainers: UNMAINTAINED
*/
/* set up the words in your language */var NavigationBarHide = '[' + collapseCaption + 'verstecken]';var NavigationBarShow = '[' + expandCaption + 'anzeigen]';
/**
NavToggle.setAttribute( 'id', 'NavToggle' + indexNavigationBar );
NavToggle.setAttribute( 'href', '#' );
//jQuery( NavToggle ).on( 'click', jQuery.proxy( window.toggleNavigationBar, window, indexNavigationBar ) );
var isCollapsed = jQuery( NavFrame ).hasClass( 'collapsed' );
jQuery( createNavigationBarToggleButton );
/** * Uploadwizard_newusers * Switches in a message for non-autoconfirmed users at [[Wikipedia:Upload]] * * Maintainers: [[User:Krimpet]] */function uploadwizard_newusers() { if ( mw.config.get( 'wgNamespaceNumber' ) === 4 && mw.config.get( 'wgTitle' ) === 'Upload' && mw.config.get( 'wgAction' ) === 'view' ) { var oldDiv = document.getElementById( 'autoconfirmedusers' ), newDiv = document.getElementById( 'newusers' ); if ( oldDiv && newDiv ) { var userGroups = mw.config.get( 'wgUserGroups' ); if ( userGroups ) { for ( var i = 0; i < userGroups.length; i++ ) { if ( userGroups[i] === 'autoconfirmed' ) { oldDiv.style.display = 'block'; newDiv.style.display = 'none'; return; } } } oldDiv.style.display = 'none'; newDiv.style.display = 'block'; return; } }} jQuery(uploadwizard_newusers);
/**