Usuario:Coordinador/monobook.js
De Wikipedia
(Diferencia entre revisiones)
												
			
			| Revisión de 20:59 8 abr 2007 Coordinador (Discusión | contribuciones) ← Ir a diferencia anterior  | 
				Revisión actual Coordinador (Discusión | contribuciones)  | 
			||
| Línea 1: | Línea 1: | ||
| - | var NavigationBarHide = 'Plegar'; | ||
| - | var NavigationBarShow = 'Desplegar'; | ||
| - | var NavigationBarShowDefault = 1; | ||
| - | |||
| - | function toggleNavigationBar(indexNavigationBar) | ||
| - | { | ||
| - | var NavToggle = document.getElementById("NavToggle" + indexNavigationBar); | ||
| - | var NavFrame = document.getElementById("NavFrame" + indexNavigationBar); | ||
| - | |||
| - | if (!NavFrame || !NavToggle) { | ||
| - | return false; | ||
| - | } | ||
| - | |||
| - | // if shown now | ||
| - | if (NavToggle.firstChild.data == NavigationBarHide) { | ||
| - | for ( | ||
| - | var NavChild = NavFrame.firstChild; | ||
| - | NavChild != null; | ||
| - | NavChild = NavChild.nextSibling | ||
| - | ) { | ||
| - | if (NavChild.className == 'NavPic') { | ||
| - | NavChild.style.display = 'none'; | ||
| - | } | ||
| - | if (NavChild.className == 'NavContent') { | ||
| - | NavChild.style.display = 'none'; | ||
| - | } | ||
| - | if (NavChild.className == 'NavToggle') { | ||
| - | NavChild.firstChild.data = NavigationBarShow; | ||
| - | } | ||
| - | } | ||
| - | |||
| - | // if hidden now | ||
| - | } else if (NavToggle.firstChild.data == NavigationBarShow) { | ||
| - | for ( | ||
| - | var NavChild = NavFrame.firstChild; | ||
| - | NavChild != null; | ||
| - | NavChild = NavChild.nextSibling | ||
| - | ) { | ||
| - | if (NavChild.className == 'NavPic') { | ||
| - | NavChild.style.display = 'block'; | ||
| - | } | ||
| - | if (NavChild.className == 'NavContent') { | ||
| - | NavChild.style.display = 'block'; | ||
| - | } | ||
| - | if (NavChild.className == 'NavToggle') { | ||
| - | NavChild.firstChild.data = NavigationBarHide; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||

