Usuario:Coordinador/monobook.js
De Wikipedia
(Diferencia entre revisiones)
| Revisión de 20:51 8 abr 2007 Coordinador (Discusión | contribuciones) ← Ir a diferencia anterior |
Revisión de 20:59 8 abr 2007 Coordinador (Discusión | contribuciones) Ir a siguiente diferencia → |
||
| Línea 1: | Línea 1: | ||
| - | /* | + | var NavigationBarHide = 'Plegar'; |
| - | Monobook desarrollado por [[Usuario:Axxgreazz]]. Cada módulo especifica su origen y autor. | + | var NavigationBarShow = 'Desplegar'; |
| - | *Puedes ver las funcionalidades contenidas aquí en [[Usuario:Axxgreazz/Monobook-Suite# Módulos|Módulos del Monobook-Suite]] | + | |
| - | *Si quieres instrucciones para instalarlo revisa: [[Usuario:Axxgreazz/Monobook-Suite#Instalación del monobook.js|Instalación del Monobook-Suite]] | + | |
| - | *Si necesitas mayores detalles sobre la configuración revisa: [[Usuario:Axxgreazz/Monobook-Suite/Configuración|Configuración del Monobook-Suite]] */ | + | |
| - | //<pre><nowiki> | + | var NavigationBarShowDefault = 1; |
| - | /* Sección 1: Inicialización de monobook (No modificar) */ | + | function toggleNavigationBar(indexNavigationBar) |
| + | { | ||
| + | var NavToggle = document.getElementById("NavToggle" + indexNavigationBar); | ||
| + | var NavFrame = document.getElementById("NavFrame" + indexNavigationBar); | ||
| - | incluir ("","","init.js"); | + | if (!NavFrame || !NavToggle) { |
| - | incluir ("","","funciones.js"); | + | return false; |
| + | } | ||
| - | /* Sección 2: Personalización de Modulos */ | + | // if shown now |
| - | /* (Copia cualquiera de los archivos indicados a continuación a tu espacio de usuario */ | + | if (NavToggle.firstChild.data == NavigationBarHide) { |
| - | /* y personaliza tus botones de la barra de herramientas, busqueda y enlaces wiki */ | + | 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; | ||
| + | } | ||
| + | } | ||
| - | incluir ("","","misparametros.js"); | + | // if hidden now |
| - | incluir ("","","misfunciones.js"); | + | } else if (NavToggle.firstChild.data == NavigationBarShow) { |
| - | incluir ("","","misbotones-full.js"); | + | for ( |
| - | incluir ("","","misbuscadores-full.js"); | + | var NavChild = NavFrame.firstChild; |
| - | incluir ("","","misenlaces.js"); | + | NavChild != null; |
| - | incluir ("","","misflotantes.js"); | + | NavChild = NavChild.nextSibling |
| - | + | ) { | |
| - | /* Sección 3 : Modulos del monobook | + | if (NavChild.className == 'NavPic') { |
| - | /* Puedes desactivar cualquiera de los módulo agregando dos barras ("//") al inicio */ | + | NavChild.style.display = 'block'; |
| - | /* de la línea. Además puedes incorporar un módulo de esta u otra wiki */ | + | } |
| - | /* Tan sólo especifica el host de la wiki, el nombre del usuario y el nombre de archivo */ | + | if (NavChild.className == 'NavContent') { |
| - | + | NavChild.style.display = 'block'; | |
| - | incluir ("","","toolbarextendido.js"); /*Módulo de Barra de herramientas */ | + | } |
| - | incluir ("","","enlaceswiki.js"); /*Módulo de Enlaces Wiki */ | + | if (NavChild.className == 'NavToggle') { |
| - | incluir ("","","modulobusqueda.js"); /*Módulo de Búsqueda */ | + | NavChild.firstChild.data = NavigationBarHide; |
| - | incluir ("","","popups.js"); /*Módulo de Popups */ | + | } |
| - | incluir ("","","livepreview2.js"); /*Módulo de LivePreview v1.2 de Sanbec*/ | + | } |
| - | incluir ("","","recent.js"); /*Módulo Anti-vandalismo */ | + | } |
| - | incluir ("","","reversion.js"); /*Módulo de Reversión */ | + | |
| - | incluir ("","","statuschanger.js"); /*Administración de estados */ | + | |
| - | incluir ("","","quickedit.js"); /*Edición rápida */ | + | |
| - | incluir ("","","panelcontrol.js"); /*Panel de control del Monobook */ | + | |
| - | incluir ("","","quickimgdelete.js"); /*Mantenimiento de imágenes (prueba)*/ | + | |
| - | //incluir ("","","botoneraflotante.js"); /*Botonera flotante */ | + | |
| - | + | ||
| - | /* Sección 4: Función base (No modificar) */ | + | |
| - | + | ||
| - | function incluir(url,usuario,nombre) | + | |
| - | { | + | |
| - | if (url=="") {url = 'es.wikipedia.org'; } | + | |
| - | if (usuario=="") {usuario = 'Axxgreazz'; }; /*no cambiar */ | + | |
| - | document.write('<script type="text/javascript" src="' | + | |
| - | + 'http://' + url + '/w/index.php?title=User:' + usuario | + | |
| - | + '/' + nombre + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); | + | |
| } | } | ||
| - | |||
| - | //</nowiki></pre> | ||
Revisión de 20:59 8 abr 2007
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;
}
}
}
}

