User:Nethac DIU/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
// Basado en la botonera de [[es:Usuario:Cookie/monobook.js|Cookie]] v0.3 // editada por [[es:Usuario:Pilaf|Pilaf]] el 25/01/2005 // // ...que estaba tratando de combinar la botonera con el // Live Preview... ¡con éxito! <code style="background:yellow">:D</code> // // Y después yo, a cambiar cosas. [[User:Nethac DIU|Nethac DIU]] // // Must I translate text above? <code style="background:yellow">|O Puff</code> // <nowiki> // incluir conversor Wiki a HTML document.write('<script type="text/javascript" src="/w/index.php?title=User:Pilaf/instaview.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); window.onload = loadButtons; /*********** Botonera ***********/ function goSearch(i) { urls = new Array( "http://es.wikipedia.org/wiki/", "http://enciclopedia.us.es/index.php/", "http://en.wiktionary.org/wiki/", "http://buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_HTML=2&TIPO_BUS=2&LEMA=", "http://google.com/search?q=", "http://www.gnu.org/cgi-bin/htsearch?words=", "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=search&term=" ); var text = document.getElementById("searchInput"); var buscaventanita = window.open(urls[i] + escape(text.value)); } function buttonCode(strCode) { return ' <input type="button" class="searchButton" '+strCode+' />'; } function loadButtons() { var btSearch = '<br>'; btSearch += buttonCode('onclick="goSearch(0)" value="w:es" title="Spanish Wikipedia"'); btSearch += buttonCode('onclick="goSearch(1)" value="EL" title="Free Enciclopedia"'); btSearch += buttonCode('onclick="goSearch(2)" value="Wiktionary"'); btSearch += buttonCode('onclick="goSearch(3)" value="DRAE" title="Diccionario de la Real Academia Española"'); btSearch += buttonCode('onclick="goSearch(4)" value="Google"'); btSearch += buttonCode('onclick="goSearch(5)" value="FSF" title="Free Software Foundation"'); btSearch += buttonCode('onclick="goSearch(6)" value="PubMed"'); var buttons = '<div>'; // Help button buttons += '<a class="mybutton" title="Help" href="http://en.wikipedia.org/wiki/Help:Contents" style="text-decoration:none;" >?</a>'; // Sandbox button buttons += '<a class="mybutton" title="Sandbox" href="http://en.wikipedia.org/wiki/Wikipedia:Sandbox">#</a>'; // Button WEI buttons += '<a class="mybutton" title="Wei: mark text before you use it" href="javascript:ponWEI()" style="background:yellow"><code>:\)</code></a>'; // Signing buttons += '<a class="mybutton" title="Sign" href="javascript:firma()" style="background:#FF8800" >~</a>'; // Link to "Pages to be merged" buttons += '<a class="mybutton" title="PM" href="http://en.wikipedia.org/wiki/Category:Articles_to_be_merged" style="background:red">PM</a>' // Button for a usual table buttons += '<br><input type=button name="tablaboton" value="Table, now!" onclick="javascript:tablita()"><br>'; buttons += '<a href="http://en.wikipedia.org/wiki/Wikipedia:How_to_use_tables">Help! Tables</a>' // Finish buttons += '</div>'; var toolbox = document.getElementById("p-navigation"); toolbox.innerHTML += '<h5><a href="http://en.wikipedia.org/w/index.php?title=User:Nethac_DIU/monobook.js&action=edit">my button bar</a></h5>'+buttons; var boxSearch = document.getElementById("searchform"); if (boxSearch) boxSearch.innerHTML += btSearch; } function ponWEI() {insertTags('<code style="background:yellow">','</code>','');} function ponENLAZANDO() {insertTags('[[',']]','');} function firma() {insertTags('<p style=\"text-align:right; font-family:tahoma\">—[[User:Nethac DIU|Nethac DIU]], would never stop to talk [[User_talk:Nethac DIU|here]]—<br><small>~~~~~</small></p>','','');} function tablita() {insertTags('\n{| border=1 style="float:right; margin:0 0 1em 1em"\n', '\n|}\n', '|+Caption\n!Header 1!!Header 2\n|-\n|cell1||cell2');} /*********** Fin botonera ************/ //</nowiki>