Ir al contenido

Usuario:Fito hg/monobook.js

De Wikipedia, la enciclopedia libre

Nota: Después de guardar, debes refrescar la caché de tu navegador para ver los cambios. Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar. Firefox: mientras presionas Mayús pulsas el botón Actualizar, (o presiona Ctrl-Shift-R). Los usuarios de Google Chrome y Safari pueden simplemente pulsar el botón Recargar. Para más detalles e instrucciones acerca de otros exploradores, véase Ayuda:Cómo limpiar la caché.

// incluir conversor Wiki a HTML
document.write('<script type="text/javascript" src="/w/index.php?title=Usuario:Pilaf/wikicode.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

window.onload = Main;

function Main()
{
  loadButtons();
  LivePreviewInstall();
}

/*********** Botonera ***********/

function goSearch(i)
{
  urls = new Array(
    "http://en.wikipedia.org/wiki/", 
    "http://de.wikipedia.org/wiki/",
    "http://google.com/search?q=",
    "http://www.answers.com/",
    "http://es.wiktionary.org/wiki/"
  );

  var text = document.getElementById("searchInput");
  
  window.open(urls[i] + escape(text.value));
}

function buttonCode(strCode)
{
  return '&nbsp;<input type="button" class="searchButton" '+strCode+' />';
}

function loadButtons()
{
var btSearch = '<br/>';
btSearch += buttonCode('onclick="goSearch(0)" value="English" style="font-size:10px" title="Wikipedia en inglés"');
btSearch += buttonCode('onclick="goSearch(1)" value="Deutsch" style="font-size:10px" title="Wikipedia en alemán"');
btSearch += buttonCode('onclick="goSearch(2)" value="Google" style="font-size:10px" title="Búsqueda en Google"');
btSearch += buttonCode('onclick="goSearch(3)" value="Answers" style="font-size:10px" title="Answers.com"');
btSearch += buttonCode('onclick="goSearch(4)" value="Wikcionario" style="font-size:10px" title="Wikcionario"');
var buttons = '<div>';

/* Botón de la zona de pruebas */
buttons += '<font color=#F9F9F9>.</font>  <a title="Zona de pruebas" href="http://es.wikipedia.org/wiki/Wikipedia:Zona de pruebas" style="font-size:12px">Zona de pruebas</a>  -  ';

/* Botón Café */
buttons += '<a title="Café" href="http://es.wikipedia.org/wiki/Wikipedia:Caf%C3%A9" style="font-size:12px" >Café</a>  ';

/* Botón Copy */
buttons += '<font color=#F9F9F9>.</font>  <a title="Plantilla:Copyvio" href="javascript:Copy()" style="font-size:12px" >Copyvio</a>  -  ';

/* Botón Destruir */
buttons += '  <a title="Plantilla:Destruir" href="javascript:Destruir()" style="font-size:12px" >Destruir</a>';

buttons += '</div>';

var toolbox = document.getElementById("p-nav");
toolbox.innerHTML += '<h5>mi botonera</h5>'+buttons;

var boxSearch = document.getElementById("searchform");
if (boxSearch)
  boxSearch.innerHTML += btSearch;

}

function Copy()
 {
   insertTags('{'+'{copyvio|página|[[Usuario:Fito hg|Fito]] 01:58 17 abr, 2005 (CEST)}}','')
 }

function Destruir()
 {
   insertTags('{'+'{destruir}}','')
 }

/*********** Fin botonera ************/

function morelinks() {
  var tabs = document.getElementById('p-cactions').cloneNode(true);
  tabs.id = 'mytabs';
  var listitems = tabs.getElementsByTagName('LI');
  for (i=0;i<listitems.length;i++) {
    if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;
  }
  document.getElementById('column-content').appendChild(tabs);
}
if (window.addEventListener) window.addEventListener("load",morelinks,false);
else if (window.attachEvent) window.attachEvent("onload",morelinks);