Usuario:Lourdes Cardenal/monobook.js
Nota: Después de publicar, quizás necesite actualizar la caché de su navegador para ver los cambios.
- Firefox/Safari: Mantenga presionada la tecla Shift mientras pulsa el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
- Google Chrome: presione Ctrl+Shift+R (⌘+Shift+R en Mac)
- Internet Explorer/Edge: mantenga presionada Ctrl mientras pulsa Actualizar, o presione Ctrl+F5
- Opera: Presiona Ctrl+F5.
//------------------------------------------------
//Creada por Piolinfax el 23 de marzo, 2006 para Lourdes
//basándose en botoneras anteriores y en la suya propia.
//Botoneras anteriores de:
//[[Usuario:Javier Carro/monobook.js]] versión 15:33 23 ago, 2004 Basada en
//[[Usuario:Pybalo/monobook.js]] v0.2:2004.07.30
// a su vez basada en [[Usuario:Comae/monobook.js]]
//
// Para más detalles véase [[w:Wikipedia:Botonera]]
//------------------------------------------------
/*********** Botonera ***********/
window.onload = loadButtons;
function goSearch(i)
{
urls = new Array(
"http://es.wikipedia.org/wiki/", "",
"http://enciclopedia.us.es/index.php/", "",
"http://buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_HTML=2&TIPO_BUS=2&LEMA=", "",
"http://es.wiktionary.org/w/wiki.phtml?title=Especial:Allpages&from=", "",
"http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=", "&dbname=eswiki_p"
);
var text = document.getElementById("searchInput");
if(i==8)
subdir=text.value.substr(0,2)+"/";
else
subdir="";
window.open(urls[i*2] + escape(subdir) + escape(text.value) + urls[i*2+1]);
}
function buttonCode(strCode)
{
return ' <input type="button" class="searchButton" '+strCode+' />';
}
function loadButtons()
{
var btSearch = '<br/>';
btSearch += buttonCode('onclick="goSearch(0)" value="W:es" title="Wikipedia en español"');
btSearch += buttonCode('onclick="goSearch(1)" value="EL" title="Enciclopedia Libre"');
btSearch += buttonCode('onclick="goSearch(2)" value="DRAE" title="Diccionario de la Real Academia Española"');
btSearch += buttonCode('onclick="goSearch(3)" value="Todas" title="Todas las páginas "');
btSearch += buttonCode('onclick="goSearch(4)" value="Est" title="Wikiestadísticas"');
/* Botón WEI */
buttons += '<a class="mybutton" title="Emoticono: Selecciona antes el texto a resaltar" href="javascript:ponWEI()" style="background:yellow" ><code style="background:yellow">:\)</code></a>';
/* Botón subraya */
buttons += '<a class="mybutton" title="Código para subrayar texto" href="javascript:subraya()" style="background:lightblue"><code style="background:lightblue"><u>s</u></code></a>';
/* Botón pequenya */
buttons += '<a class="mybutton" title="Código para escribir texto en letra pequeña" href="javascript:pequenya()" style="background:lightblue"><code style="background:lightblue"><small>p</small></code></a>';
/* Botón grande */
buttons += '<a class="mybutton" title="Código para escribir texto en letra grande" href="javascript:grande()" style="background:lightblue"><code style="background:lightblue"><big>G</big></code></a>';
/* Botón tacha */
buttons += '<a class="mybutton" title="Código para tachar texto" href="javascript:tacha()" style="background:lightblue"><code style="background:lightblue"><s>t</s></code></a>';
/* Botón categ */
buttons += '<a class="mybutton" title="Escribe [[Categoría:]]" href="javascript:categ()" style="background:orange"><code style="background:orange">cat</code></a>';
buttons += '</div>';
var toolbox = document.getElementById("p-navigation");
toolbox.innerHTML += '<h5>Mi botonera</h5>'+buttons;
var boxSearch = document.getElementById("searchform");
if (boxSearch)
boxSearch.innerHTML += btSearch;
}
function ponWEI()
{insertTags('<code style="background:yellow">','</code>','');}
function subraya ()
{insertTags('<u>','</u>','');}
function pequenya ()
{insertTags('<small>','</small>','');}
function grande ()
{insertTags('<big>','</big>','');}
function tacha ()
{insertTags('<s>','</s>','');}
function categ ()
{insertTags('[[Categoría:]]','','');}
/*********** Fin botonera ************/