Usuario:Piolinfax/monobook.js
De Wiktionary, el diccionario libre
Nota: Tras guardar el archivo, debe refrescar la caché de su navegador para ver los cambios:
- Mozilla / Firefox / Safari: pulsa Mayúsculas. mientras haces click en el botón Recargar, o pulsa si no Ctrl-F5 o Ctrl-R (Command-R en un Macintosh)
- Konqueror: Haz click en el botón Reload o pulsa F5;
- Opera: Limpia la caché en Herramientas → Preferencias;
- Internet Explorer: pulsa Ctrl mientras haces click en Refresh, o pulsa Ctrl-F5.
//------------------------------------------------ //[[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 [[Wikipedia:Botonera]] //------------------------------------------------ /*********** Botonera ***********/ window.onload = loadButtons; function goSearch(i) { urls = new Array( "http://en.wiktionary.org/wiki/", "", "http://nah.wiktionary.org/wiki/", "", "http://is.wiktionary.org/wiki/", "", "http://de.wiktionary.org/wiki/", "", "http://es.wikipedia.org/wiki/", "", "http://en.wikipedia.org/wiki/", "", "http://enciclopedia.us.es/index.php/", "", "http://es.wiktionary.org/w/wiki.phtml?title=Especial:Allpages&from=", "", "http://ar.education.yahoo.com/search/ar?p=", "", "http://www.websters-online-dictionary.org/definition/english/", ".html", "http://www.websters-online-dictionary.org/definition/translation-english/", ".html", "http://www.dwds.de/cgi-bin/portalL.pl?search=", "", "http://google.com/search?q=", "", "http://www.altavista.com/web/results?itag=wrx&q=", "", "http://multiwordnet.itc.it/online/multiwordnet.php?language=italian&word=", "", "http://ohui.net/aulex/es-nah/?busca=", "", "http://www.logosdictionary.org/pls/dictionary/new_dictionary.gdic.main?word=", "", "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user=", "&dbname=eswiktionary_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="en" title="Wikcionario en inglés"'); btSearch += buttonCode('onclick="goSearch(1)" value="nah" title="Wikcionario en náhuatl"'); btSearch += buttonCode('onclick="goSearch(2)" value="is" title="Wikcionario en islandés"'); btSearch += buttonCode('onclick="goSearch(3)" value="de" title="Wikcionario en alemán"'); btSearch += buttonCode('onclick="goSearch(4)" value="wp" title="Wikipedia es:"'); btSearch += buttonCode('onclick="goSearch(5)" value="wp:en" title="Wikipedia en:"'); btSearch += buttonCode('onclick="goSearch(6)" value="EL" title="Enciclopedia Libre"'); btSearch += buttonCode('onclick="goSearch(7)" value="Todas" title="Lista de todos los lemas contenidos en Wikcionario"'); btSearch += buttonCode('onclick="goSearch(8)" value="Am.Her." title="Diccionario American Heritage (español-inglés inglés-español)"'); btSearch += buttonCode('onclick="goSearch(9)" value="Wbs en:" title="Websters dictionary en:. The Rosetta Edition"'); btSearch += buttonCode('onclick="goSearch(10)" value="Wbs trans:" title="Webster dictionary multilingüe. The Rosetta Edition"'); btSearch += buttonCode('onclick="goSearch(11)" value="DWDS:" title="Das digitale Wörterbuch der deutschen Sprache"'); btSearch += buttonCode('onclick="goSearch(12)" value="Google"'); var buttons = '<div>'; btSearch += buttonCode('onclick="goSearch(13)" value="Altavista"'); var buttons = '<div>'; btSearch += buttonCode('onclick="goSearch(14)" value="MWN it:" title="Multiwordnet en italiano"'); var buttons = '<div>'; btSearch += buttonCode('onclick="goSearch(15)" value="Aulex nah:" title="Náhuatl"'); var buttons = '<div>'; btSearch += buttonCode('onclick="goSearch(16)" value="Logos" title="Diccionario multilingüe"'); var buttons = '<div>'; btSearch += buttonCode('onclick="goSearch(17)" value="Est" title="Wikciestadísticas"'); /* Botón WEI */ buttons += '<a class="mybutton" title="wei: selecciona antes el texto a resaltar" href="javascript:ponWEI()" style="background:yellow" ><code style="background:yellow">:\)</code></a>'; /* Botón caracajaDadl */ buttons += '<a class="mybutton" title="carcajaDadl: Inserta una carcajada ornitocósmica :)" href="javascript:carcajaDadl()" style="background:yellow" ><code style="background:yellow">X\D</code></a>'; /* Botón andgerl */ buttons += '<a class="mybutton" title="andgerl: Inserta un trocito de himminninn :)" href="javascript:andgerl()" style="background:yellow" ><code style="background:yellow">0\:</code></a>'; /* Botón sonriSissota */ buttons += '<a class="mybutton" title="sonriSissota: Ñej, ñej, ñej :)" href="javascript:sonriSissota()" style="background:yellow" ><code style="background:yellow">:\Ð</code></a>'; /* Botón Alienderl */ buttons += '<a class="mybutton" title="Alienderl: Inserta una invasión silenciosa :)" href="javascript:Alienderl()" style="background:lightgreen" ><code style="background:lightgreen">>\)</code></a>'; /* Botón colorin */ buttons += '<a class="mybutton" title="Para cambiar el color de las letras" href="javascript:colorin()" style="background:red" ><code style="background:red">C</code></a>'; /* Botón separa */ buttons += '<a class="mybutton" title="Evita que las fotos se metan en las tablas" href="javascript:separa()" style="background:orange" ><code style="background:orange">—</code></a>'; /* Botón especies */ buttons += '<a class="mybutton" title="Inserta formato de especie" href="javascript:especies()" style="background:orange" ><code style="background:orange">e</code></a>'; /* Botón underl ;) */ buttons += '<a class="mybutton" title="Código para escribir texto subrayado" href="javascript:underl()" style="background:lightblue"><code style="background:lightblue"><u>u</u></code></a>'; /* Botón small */ buttons += '<a class="mybutton" title="Código para escribir texto en letra pequeña" href="javascript:small()" style="background:lightblue"><code style="background:lightblue"><small>p</small></code></a>'; /* Botón big */ buttons += '<a class="mybutton" title="Código para escribir texto en letra grande" href="javascript:big()" style="background:lightblue"><code style="background:lightblue"><big>G</big></code></a>'; /* Botón strike */ buttons += '<a class="mybutton" title="Código para escribir texto tachado" href="javascript:strike()" style="background:lightblue"><code style="background:lightblue"><s>t</s></code></a>'; /* Botón sup */ buttons += '<a class="mybutton" title="Código para escribir texto volado (o suscrito cambiando «p» por «b»" href="javascript:sup()" style="background:lightblue"><code style="background:lightblue">²</code></a>'; /* Botón firma */ buttons += '<a class="mybutton" title="Inserta mi firma rellenable" href="javascript:firma()" style="background:plum"><code style="background:plum"><i>f</i></code></a>'; /* Botón encab */ buttons += '<a class="mybutton" title="Inserta formato de encabezado menor" href="javascript:encab()" style="background:orange" ><code style="background:plum">*</code></a>'; /* Botón encabezamiento */ buttons += '<a class="mybutton" title="Inserta un encabezado general" href="javascript:encabezamiento()" style="background:plum"><code style="background:plum">E</code></a>'; /* Botón sust */ buttons += '<a class="mybutton" title="Inserta formatos de flexión para sustantivos" href="javascript:sust()" style="background:plum"><code style="background:plum">s</code></a>'; /* Botón adj */ buttons += '<a class="mybutton" title="Inserta formatos de flexión para adjetivos" href="javascript:adj()" style="background:plum"><code style="background:plum">a</code></a>'; /* Botón trad */ buttons += '<a class="mybutton" title="Inserta formato general para traducciones" href="javascript:trad()" style="background:plum"><code style="background:plum">T</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 carcajaDadl() {insertTags('[[Image:XD-smiley.png|20px]]','','');} function andgerl() {insertTags('[[Image:Angel-smiley.png|26px]]','','');} function sonriSissota() {insertTags('[[Image:Biggrin-smiley.png|20px]]','','');} function Alienderl() {insertTags('[[Image:Alien-smiley.png]]','','');} function colorin() {insertTags('<font color=green>','</font>','');} function separa() {insertTags('<br clear="all">','','');} function especies () {insertTags('** *#CA: *#DE: *#EN: *#ES: *#FR: *#FR: *#SQ: *#SV:','','');} function underl () {insertTags('<u>','</u>','');} function small () {insertTags('<small>','</small>','');} function big () {insertTags('<big>','</big>','');} function strike () {insertTags('<s>','</s>','');} function sup () {insertTags('<sup>','</sup>','');} function firma () {insertTags('-- [[User:Piolinfax|',']] <small><sup>([[User talk:Piolinfax|...]])</sup></small> --~~','');} function encab () {insertTags(':*: ','','');} function encabezamiento () {insertTags('{{ES}} {{Lema|{{-subst:PAGENAME}}}} {{pronunciación}} {{etimología}} ==Acepciones== === === [[Categoría:]] ;1: :*: ==Conjugación== {{w.es.v.conj.ar|am}}','');} function sust () {insertTags('{{inflect.es.sust.reg}} {{inflect.es.sust.reg-cons}} {{inflect.es.sust.invariante}} {{inflect.es.sust.sing.tantum}} {{inflect.es.sust.plur.tantum}} {{inflect.es.sust.-ón| }} {{inflect.es.sust.ad-lib| | }} {{inflect.sust.sg-pl||}}','','');} function adj () {insertTags('{{inflect.es.adj.reg|}} {{inflect.es.adj.reg-cons}} {{inflect.es.adj.no-género}} {{inflect.es.adj.-ón|raíz}} {{inflect.es.adj.no-género-cons}} {{inflect.es.adj.ad-lib|masc sing|masc pl|fem sing|fem pl}}','','');} function trad () {insertTags('==Traducciones== {{trad-arriba}} {{trad-centro}} {{trad-abajo}}','');} /*********** Fin de la botonera ************/ // ------------------------------------------------------------ // Favicon.js - Change favicon dynamically [http://ajaxify.com/run/favicon]. // Copyright (c) 2008 Michael Mahemoff. Icon updates only work in Firefox and Opera. // Background and MIT License notice at end of file, see the homepage for more. /* USAGE: favicon.change("/icon/active.ico", "new title"); // Cancels any animation/scrolling favicon.change("/icon/active.ico"); // leaves title alone. Cancels any animation. favicon.change(null, "new title"); // leaves icon alone. Cancels any scrolling. favicon.animate(["icon1.ico", "icon2.ico", ...]); favicon.animate(["icon1.ico", "icon2.ico", ...], {delay: 500} ); // Tip: Use "" as the last element to make an empty icon between cycles. // Default delay is 2000ms // animate() cancels any previous animation favicon.scrollTitle("new title"); favicon.scrollTitle("new title", { delay: 200, gap: "------"} ) // delay is delay between each scroll unit // gap is string appended to title (default: " ") // scrollTitle() cancels any previous scrolling favicon.unscroll(); favicon.unanimate(); */ var favicon = { // -- "PUBLIC" ---------------------------------------------------------------- change: function(optionalIconURL, optionalDocTitle) { if (optionalIconURL) { clearTimeout(this.animateTimer); this.addLink(optionalIconURL, true); } if (optionalDocTitle) { clearTimeout(this.scrollTimer); document.title = optionalDocTitle; } }, animate: function(iconSequence, options) { this.unanimate(); options = options || {}; options["delay"] = parseInt(options["delay"]) || 2000; this.preloadIcons(iconSequence); this.iconSequence = iconSequence; favicon.index = 0; favicon.change(iconSequence[0]); this.animateTimer = setInterval(function() { favicon.index = (favicon.index+1) % favicon.iconSequence.length; favicon.addLink(favicon.iconSequence[favicon.index], false); }, options["delay"]); }, unanimate: function() { clearTimeout(this.animateTimer); }, scrollTitle: function(title, options) { this.unscroll(); options = options || {}; options["delay"] = options["delay"] || 250; options["gap"] = options["gap"] || " "; title = title+options["gap"]; document.title = title; titleOffset = 0; this.scrollTimer = setInterval(function() { var startPos = (titleOffset++) % title.length; var newTitle = title.substr(startPos); newTitle += title.substr(0,startPos); document.title = newTitle; }, options["delay"]); }, unscroll: function() { clearTimeout(this.scrollTimer); }, changeTitle: function(title) { document.title = title; }, // -- "PRIVATE" --------------------------------------------------------------- scrollTimer: null, animateTimer: null, preloadIcons: function(iconSequence) { var dummyImageForPreloading = document.createElement("img"); for (var i=0; i<iconSequence.length; i++) { dummyImageForPreloading.src = iconSequence[i]; } }, addLink: function(iconURL) { var link = document.createElement("link"); link.type = "image/x-icon"; link.rel = "shortcut icon"; link.href = iconURL; this.removeLinkIfExists(); this.docHead.appendChild(link); }, removeLinkIfExists: function() { var links = this.docHead.getElementsByTagName("link"); for (var i=0; i<links.length; i++) { var link = links[i]; if (link.type=="image/x-icon" && link.rel=="shortcut icon") { this.docHead.removeChild(link); return; // Assuming only one match at most. } } }, docHead:document.getElementsByTagName("head")[0] } favicon.change("http://members.chello.at/spacebirdy/piolinfax/favicon.ico");