Diferencia entre revisiones de «Usuario:Caiser~eswikibooks/monobook.js»
Contenido eliminado Contenido añadido
Sin resumen de edición |
Sin resumen de edición |
||
Línea 262: | Línea 262: | ||
document.write('<'+'script src="/w/wiki.phtml?title='+nombre+'&ctype=text/javascript&action=raw&dontcountme=s" type="text/javascript"><'+'/script>'); |
document.write('<'+'script src="/w/wiki.phtml?title='+nombre+'&ctype=text/javascript&action=raw&dontcountme=s" type="text/javascript"><'+'/script>'); |
||
} |
} |
||
/* <nowiki> */ |
|||
function closevfd(bold, notbold){ |
|||
var form = document.editform; |
|||
var txt = form.wpTextbox1; |
|||
txt.value = "{{subst:vt}} '''" + bold + "'''" + notbold + ". – ~~~~\n" + txt.value + "\n{{subst:vb}}\n"; |
|||
form.wpSummary.value = "close discussion: " + bold + notbold; |
|||
form.wpWatchthis.checked = false; |
|||
} |
|||
function fixformat(){ |
|||
var form = document.editform; |
|||
var txt = form.wpTextbox1; |
|||
txt.value = txt.value |
|||
.replace(/<\/?(b|strong)>/gi, "'''") |
|||
.replace(/<\/?(i|em|var)>/gi, "''") |
|||
.replace(/\{\{([Ss]u[bp])\|([^}]+)\}\}/g, "{{subst:$1|$2}}"); |
|||
form.wpSummary.value += "formatting"; |
|||
form.wpMinoredit.checked = true; |
|||
} |
|||
function replace(){ |
|||
var s = prompt("Search regexp?"); |
|||
if(s){ |
|||
var r = prompt("Replace regexp?"); |
|||
if(!r && r != '') return; |
|||
var txt = document.editform.wpTextbox1; |
|||
txt.value = txt.value.replace(new RegExp(s, "g"), r); |
|||
} |
|||
} |
|||
function moveprotect(){ |
|||
document.getElementById('wpReasonProtect').value = "prevent page moves"; |
|||
document.getElementById('wpMoveOnly').checked = true; |
|||
} |
|||
function vfdresult(){ |
|||
var res = prompt("Result?"); |
|||
if(!res) return; |
|||
var form = document.editform; |
|||
form.wpSummary.value = 'VFD result - ' + res.replace(/'/g, ''); |
|||
var txt = form.wpTextbox1; |
|||
if(txt.value.length > 0) txt.value += '\n'; |
|||
txt.value += '==VFD==\nOn [[DAY MONTH]] [[2005]], this article was nominated for deletion. The result was ' + res + '. See [[Wikipedia:Votes for deletion/{{subst:PAGENAME}}]] for a record of the discussion. – ~~~~'; |
|||
txt.focus(); |
|||
} |
|||
function hidevfd(){ |
|||
var divs = document.getElementsByTagName("div"); |
|||
for(var x = 0; x < divs.length; ++x) |
|||
if(divs[x].className.indexOf("vfd") != -1) |
|||
divs[x].style.display = "none"; |
|||
document.getElementById('footer').style.display = 'none'; |
|||
} |
|||
function showvfd(){ |
|||
var divs = document.getElementsByTagName("div"); |
|||
for(var x = 0; x < divs.length; ++x) |
|||
if(divs[x].className.indexOf("vfd") != -1) |
|||
divs[x].style.display = ""; |
|||
document.getElementById('footer').style.display = ''; |
|||
} |
|||
function addlilink(tabs, url, name, id){ |
|||
var na = document.createElement('a'); |
|||
na.href = url; |
|||
na.id = id; |
|||
na.appendChild(document.createTextNode(name)); |
|||
var li = document.createElement('li'); |
|||
li.appendChild(na); |
|||
tabs.appendChild(li); |
|||
return li; |
|||
} |
|||
function addPurge(){ |
|||
ta['ca-purge'] = ['g', 'Purgar el caché interno de la página']; |
|||
if(!document.getElementById) return; |
|||
var x = document.getElementById('ca-history'); |
|||
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; |
|||
if(!x) return; |
|||
if(x.children) x = x.children[0]; |
|||
else x = x.childNodes[0]; |
|||
addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purgar', 'ca-purge'); |
|||
} |
|||
function addEditSection0(){ |
|||
ta['ca-edit-0'] = ['', 'Editar la sección 0 de esta página']; |
|||
if(!document.getElementById) return; |
|||
var x = document.getElementById('ca-edit'); |
|||
if(!x) return; |
|||
var y = document.createElement('LI'); |
|||
y.id = 'ca-edit-0'; |
|||
if(x.className == 'selected'){ |
|||
if(/&action=edit§ion=0$/.test(window.location.href)){ |
|||
x.className = 'istalk'; |
|||
y.className = 'selected'; |
|||
} else { |
|||
x.className = 'selected istalk'; |
|||
} |
|||
} else if(x.className == 'selected istalk'){ |
|||
if(/&action=edit§ion=0$/.test(window.location.href)){ |
|||
x.className = 'istalk'; |
|||
y.className = 'selected istalk'; |
|||
} else { |
|||
y.className = 'istalk'; |
|||
} |
|||
} else { |
|||
y.className = x.className; |
|||
x.className = 'istalk'; |
|||
} |
|||
var z = document.createElement('A'); |
|||
if(x.children){ |
|||
z.href = x.children[0].href + '§ion=0'; |
|||
z.appendChild(document.createTextNode('0')); |
|||
y.appendChild(z); |
|||
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling); |
|||
}else{ |
|||
z.href = x.childNodes[0].href + '§ion=0'; |
|||
z.appendChild(document.createTextNode('0')); |
|||
y.appendChild(z); |
|||
document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling); |
|||
} |
|||
} |
|||
function changeLinks(){ |
|||
if(!document.getElementById) return; |
|||
document.getElementById('pt-mytalk').firstChild.innerHTML = 'Mi Buzón'; |
|||
document.getElementById('pt-preferences').firstChild.innerHTML = 'Preferencias'; |
|||
document.getElementById('pt-watchlist').firstChild.innerHTML = 'Lista de seguimiento'; |
|||
document.getElementById('pt-mycontris').firstChild.innerHTML = 'Contribuciones'; |
|||
document.getElementById('pt-logout').firstChild.innerHTML = 'Salir'; |
|||
if(document.getElementById('ca-talk')) |
|||
document.getElementById('ca-talk').firstChild.innerHTML = 'Discusión'; |
|||
if(document.getElementById('ca-edit')) |
|||
document.getElementById('ca-edit').firstChild.innerHTML = 'Editar'; |
|||
if(document.getElementById('ca-nstab-wp')) |
|||
document.getElementById('ca-nstab-wp').firstChild.innerHTML = 'Acerca de'; |
|||
} |
|||
function addForceSummary(){ |
|||
if(!/&action=edit/.test(window.location.href)) return; |
|||
if(/§ion=new/.test(window.location.href)) return; |
|||
if(!document.forms.editform) return; |
|||
document.forms.editform.wpSave.onclick = forceSummary; |
|||
} |
|||
function forceSummary(){ |
|||
var form = document.forms.editform; |
|||
if(!form.wpSummary.value.replace(/^(\/\*.*\*\/)? *(.*) *$/,'$2')){ |
|||
var r = prompt('¿Estás seguro de que quieres grabar sin enviar un resumen?\nPara añadir un resumen, escribelo en la caja de abajo:',form.wpSummary.value); |
|||
if(r == null) return false; |
|||
form.wpSummary.value = r; |
|||
} |
|||
return true; |
|||
} |
|||
function vfddelete(){ |
|||
document.forms.deleteconfirm.wpReason.value = '[[Wikipedia:Votes for deletion/' + unescape(window.location.href.replace(/^.*\?title=([^&]+)&action=delete.*$/, '$1').replace(/_/g, ' ')).replace(/^(Talk|Wikipedia( talk)?):/, '') + ']]'; |
|||
} |
|||
function morelinks(){ |
|||
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; |
|||
if(document.title.indexOf("Editing Wikipedia:Votes for deletion") == 0){ |
|||
addlilink(tabs, 'javascript:closevfd("Mantener", "")', 'K', ''); |
|||
addlilink(tabs, 'javascript:closevfd("Fusionar y redireccionar", " to [[" + prompt("Merge and redirect to?") + "]]")', 'M&R', ''); |
|||
addlilink(tabs, 'javascript:closevfd("redirect", " a [[" + prompt("Redirect to?") + "]]")', 'R', ''); |
|||
addlilink(tabs, 'javascript:closevfd("transwiki", " a " + prompt("Transwiki to?"))', 'T', ''); |
|||
addlilink(tabs, 'javascript:closevfd("transwiki", " a Wiktionary")', 'WIKT', ''); |
|||
addlilink(tabs, 'javascript:closevfd("borrado rápido", "")', 'SD', ''); |
|||
addlilink(tabs, 'javascript:closevfd("borrar", "")', 'D', ''); |
|||
addlilink(tabs, 'javascript:closevfd(prompt("¿Resultado?"), "")', 'Oth', ''); |
|||
}else if(document.title.indexOf("Editando ") == 0){ |
|||
addlilink(tabs, 'javascript:replace()', 'Reemplazar', ''); |
|||
addlilink(tabs, 'javascript:fixformat()', 'Formato', ''); |
|||
addlilink(tabs, 'javascript:vfdresult()', 'VFD', ''); |
|||
}else if(document.title.indexOf("Confirma el borrado - borrar") == 0){ |
|||
addlilink(tabs, 'javascript:vfddelete()', 'VFD', ''); |
|||
}else if(document.title.indexOf("Confirm protection - Proteger") == 0){ |
|||
addlilink(tabs, 'javascript:moveprotect()', 'MV', ''); |
|||
}else if(document.title.indexOf("Wikipedia:Votes for deletion") == 0){ |
|||
addlilink(tabs, 'javascript:hidevfd()', 'Esconder', 'ca-hide'); |
|||
addlilink(tabs, 'javascript:showvfd()', 'Mostrar', 'ca-show'); |
|||
} |
|||
} |
|||
function addToolBoxLinks(){ |
|||
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; |
|||
addlilink(tb, '/wiki/Special:Newpages', 'Páginas Nuevas', ''); |
|||
addlilink(tb, '/wiki/Special:Shortpages', 'Páginas cortas', ''); |
|||
} |
|||
function myLoadFuncs(){ |
|||
addPurge(); |
|||
addEditSection0(); |
|||
changeLinks(); |
|||
addForceSummary(); |
|||
morelinks(); |
|||
addToolBoxLinks(); |
|||
} |
|||
if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false); |
|||
else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs); |
|||
else{ |
|||
window._old_Caiser_onload = window.onload; |
|||
window.onload = function(){ |
|||
window._old_Caiser_onload(); |
|||
myLoadFuncs(); |
|||
} |
|||
} |
|||
/* </nowiki> */ |
Revisión del 01:19 14 jul 2005
/*********** incluir conversor Wiki a HTML ***********/
document.write('<script type="text/javascript" src="/w/index.php?title=Usuario:Caiser/wikicode.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
window.onload = Main;
function Main()
{
loadButtons();
LivePreviewInstall();
createNavigationBarToggleButton();
}
/*********** Fin del módulo para Live Preview ***********/
/*********** Botonera ***********/
// Para añadir búsquedas
function goSearch(i)
{
urls = new Array(
"http://en.wikipedia.org/wiki/",
"http://de.wikipedia.org/wiki/",
"http://fr.wikipedia.org/wiki/",
"http://ca.wikipedia.org/wiki/",
"http://enciclopedia.us.es/index.php/",
"http://buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_HTML=2&TIPO_BUS=2&LEMA=",
"http://google.com/search?q="
);
var text = document.getElementById("searchInput");
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="en" title="Wikipedia en inglés"');
btSearch += buttonCode('onclick="goSearch(1)" value="de" title="Wikipedia en alemán"');
btSearch += buttonCode('onclick="goSearch(2)" value="fr" title="Wikipedia en francés"');
btSearch += buttonCode('onclick="goSearch(3)" value="Ca" title="Wikipedia en catalán"');
btSearch += buttonCode('onclick="goSearch(4)" value="EL" title="Enciclopedia Libre"');
btSearch += buttonCode('onclick="goSearch(5)" value="DRAE" title="Diccionario de la Real Academia Española"');
btSearch += buttonCode('onclick="goSearch(6" value="Google" title="Busqueda on-line"');
var buttons = '<div>';
// Para poner botones
/* Botón del mapa de la ayuda */
buttons += '<a class="mybutton" title="Mapa de la ayuda" href="http://es.wikibooks.org/wiki/Wikibooks:Mapa" style="text-decoration:none;" >?</a>';
/* Botón de la zona de pruebas */
buttons += '<a class="mybutton" title="Zona de pruebas"href="http://es.wikibooks.org/wiki/Wikibooks:Zona de pruebas">#</a>';
/* Botón Ay */
buttons += '<a class="mybutton" title="Ayuda de edición"href="http://es.wikibooks.org/wiki/Wikibooks:C%C3%B3mo_se_edita_una_p%C3%A1gina">Ay</a>';
/* Botón Café */
buttons += '<a class="mybutton" title="café"href="http://es.wikibooks.org/wiki/Wikibooks:Caf%C3%A9">C</a>';
/* 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 Usuario */
buttons += '<a class="mybutton" title="Usuario: selecciona antes el texto" href="javascript:Usuario()" style="background:#54FF9F" >U</a>';
/* Botón Discusión */
buttons += '<a class="mybutton" title="Discusión: selecciona antes el texto" href="javascript:Discusión()" style="background:#54FF9F" >D</a>';
/* Botón REDIRECT */
buttons += '<a class="mybutton" title="Redirect: marca antes el título correcto" href="javascript:REDIRECT()" style="background:#54FF9F" >R</a>';
/* Botón Bienvenidas */
buttons += '<a class="mybutton" title="Bienvenida" href="javascript:Bienvenida()" style="background:#3CB371" ><code style="background:yellow"></code>Bi</a>';
/* Botón Miniesbozo */
buttons += '<a class="mybutton" title="Miniesbozo" href="javascript:Miniesbozo()" style="background:#87CEFF" ><code style="background:#87CEFF"></code>M</a>';
/* Botón Esbozo */
buttons += '<a class="mybutton" title="Esbozo" href="javascript:Esbozo()" style="background:#87CEFF" ><code style="background:#87CEFF"></code>E</a>';
/* Botón IW */
buttons += '<a class="mybutton" title="Interwiki" href="javascript:IW()" style="background:#E6E6FA" ><code style="background:Orange Red 1"></code>IW</a>';
/* Botón Copy */
buttons += '<a class="mybutton" title="Plantilla:Copyvio" href="javascript:Copy()" style="background:#FF4500" >C</a>';
/* Botón Borrar */
buttons += '<a class="mybutton" title="Plantilla:Borrar" href="javascript:Borrar()" style="background:#FF4500" >B</a>';
var toolbox = document.getElementById("p-navigation");
toolbox.innerHTML += '<h5>Mi botonera</h5>'+buttons;
var boxSearch = document.getElementById("searchform");
if (boxSearch)
boxSearch.innerHTML += btSearch;
}
// Javascropts para que funcione lo anterior
function ponWEI()
{
insertTags('<code style="background:yellow">','</code>','');
}
function Usuario()
{
insertTags('[[Usuario:','|',']] ')
}
function Discusión()
{
insertTags('[[Usuario Discusión:','|',']]')
}
function REDIRECT()
{
insertTags('#REDIRECT [[',']]')
}
function Bienvenida()
{
insertTags('{{Bienvenido usuario}}Bueno, gracias por colaborar con nosotros en la construcción de una enciclopedia libre. Espero que estos enlaces te sean de utilidad. Si necesitas algo más pregunta a cualquiera de los que estamos por aquí.Esperando pases buenos momentos--~~'+'~~','')
}
function Miniesbozo()
{
insertTags('{'+'{miniesbozo}}','')
}
function Esbozo()
{
insertTags('{'+'{esbozo de|','}}')
}
function IW()
{
insertTags('{'+'{Subst:IW|{'+'{Subst:PAGENAME}}'+'}}','')
}
function Copy()
{
insertTags('{'+'{copyvio|1=','|2=~~'+'~~|3={'+'{subst:CURRENTDAY}}|4={'+'{subst:CURRENTMONTHNAME}}'+'}}')
}
function Borrar()
{
insertTags('{'+'{borrar|{'+'{subst:CURRENTDAY}}|{'+'{subst:CURRENTMONTHNAME}}|borrar.motivo=','|borrar.si=~~'+'~~ *|borrar.no=}}','')
}
/*********** Fin botonera ***********/
/*********** Mis herramientas ***********/
function addLoadEvent(func) {
if (window.addEventListener) {
window.addEventListener("load", func, false);
} else if (window.attachEvent) {
window.attachEvent("onload", func);
}
}
function nouvelleBoite() {
var l = document.getElementById("column-one");
if (l) {
l.innerHTML = l.innerHTML
+ '<div class="portlet" id="p-nbx">'
+ ' <h5>Herramientas personales</h5>'
+ ' <div class="pBody">'
+ ' <ul>'
+ ' <li><a href="http://es.wikibooks.org/wiki/Usuario:Caiser/monobook.js">Monobook.js</a></li>'
+ ' <li><a href="http://es.wikibooks.org/wiki/Usuario:Caiser/monobook.css">Monobook.css</a></li>'
+ ' </ul>'
+ ' </div>'
+ '</div> ';
}
}
addLoadEvent(nouvelleBoite);
/*********** Fin Mis herramientas ***********/
/*********** Añadido para plantillas plegables ***********/
// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
var indexNavigationBar = 0;
// iterate over all <div>-elements
for(
var i=0;
NavFrame = document.getElementsByTagName("div")[i];
i++
) {
// if found a navigation bar
if (NavFrame.className == "NavFrame") {
indexNavigationBar++;
var NavToggle = document.createElement("a");
NavToggle.className = 'NavToggle';
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');
var NavToggleText = document.createTextNode(NavigationBarHide);
NavToggle.appendChild(NavToggleText);
// add NavToggle-Button as first div-element
// in <div class="NavFrame">
NavFrame.insertBefore(
NavToggle,
NavFrame.firstChild
);
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
}
}
// if more Navigation Bars found than Default: hide all
if (NavigationBarShowDefault < indexNavigationBar) {
for(
var i=1;
i<=indexNavigationBar;
i++
) {
toggleNavigationBar(i);
}
}
}
/*********** Fin del módulo para plantillas despegables ***********/
/*********** Motor de módulos ***********/
/* Éste es el que pone en marcha los módulos.
/* No debes cambiar esta parte NUNCA.
/* Para configurar tus módulos, vete a la sección del
/* final, donde pone "Configuración de módulos".
/*********************************************************/
var plugin=new Array();
function pluginRun()
{
//Cargar todos los plugins
for (i=0;i<plugin.length;i++)
{
plugin[i]();
}
}
function pluginLoad(nombre)
{
plugin[plugin.length++]=nombre;
}
function pluginImport(nombre) //Cargar plugin(i)
{
document.write('<'+'script src="/w/wiki.phtml?title='+nombre+'&ctype=text/javascript&action=raw&dontcountme=s" type="text/javascript"><'+'/script>');
}
/* <nowiki> */
function closevfd(bold, notbold){
var form = document.editform;
var txt = form.wpTextbox1;
txt.value = "{{subst:vt}} '''" + bold + "'''" + notbold + ". – ~~~~\n" + txt.value + "\n{{subst:vb}}\n";
form.wpSummary.value = "close discussion: " + bold + notbold;
form.wpWatchthis.checked = false;
}
function fixformat(){
var form = document.editform;
var txt = form.wpTextbox1;
txt.value = txt.value
.replace(/<\/?(b|strong)>/gi, "'''")
.replace(/<\/?(i|em|var)>/gi, "''")
.replace(/\{\{([Ss]u[bp])\|([^}]+)\}\}/g, "{{subst:$1|$2}}");
form.wpSummary.value += "formatting";
form.wpMinoredit.checked = true;
}
function replace(){
var s = prompt("Search regexp?");
if(s){
var r = prompt("Replace regexp?");
if(!r && r != '') return;
var txt = document.editform.wpTextbox1;
txt.value = txt.value.replace(new RegExp(s, "g"), r);
}
}
function moveprotect(){
document.getElementById('wpReasonProtect').value = "prevent page moves";
document.getElementById('wpMoveOnly').checked = true;
}
function vfdresult(){
var res = prompt("Result?");
if(!res) return;
var form = document.editform;
form.wpSummary.value = 'VFD result - ' + res.replace(/'/g, '');
var txt = form.wpTextbox1;
if(txt.value.length > 0) txt.value += '\n';
txt.value += '==VFD==\nOn [[DAY MONTH]] [[2005]], this article was nominated for deletion. The result was ' + res + '. See [[Wikipedia:Votes for deletion/{{subst:PAGENAME}}]] for a record of the discussion. – ~~~~';
txt.focus();
}
function hidevfd(){
var divs = document.getElementsByTagName("div");
for(var x = 0; x < divs.length; ++x)
if(divs[x].className.indexOf("vfd") != -1)
divs[x].style.display = "none";
document.getElementById('footer').style.display = 'none';
}
function showvfd(){
var divs = document.getElementsByTagName("div");
for(var x = 0; x < divs.length; ++x)
if(divs[x].className.indexOf("vfd") != -1)
divs[x].style.display = "";
document.getElementById('footer').style.display = '';
}
function addlilink(tabs, url, name, id){
var na = document.createElement('a');
na.href = url;
na.id = id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
tabs.appendChild(li);
return li;
}
function addPurge(){
ta['ca-purge'] = ['g', 'Purgar el caché interno de la página'];
if(!document.getElementById) return;
var x = document.getElementById('ca-history');
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(!x) return;
if(x.children) x = x.children[0];
else x = x.childNodes[0];
addlilink(tabs, x.href.replace(/=history/, "=purge"), 'purgar', 'ca-purge');
}
function addEditSection0(){
ta['ca-edit-0'] = ['', 'Editar la sección 0 de esta página'];
if(!document.getElementById) return;
var x = document.getElementById('ca-edit');
if(!x) return;
var y = document.createElement('LI');
y.id = 'ca-edit-0';
if(x.className == 'selected'){
if(/&action=edit§ion=0$/.test(window.location.href)){
x.className = 'istalk';
y.className = 'selected';
} else {
x.className = 'selected istalk';
}
} else if(x.className == 'selected istalk'){
if(/&action=edit§ion=0$/.test(window.location.href)){
x.className = 'istalk';
y.className = 'selected istalk';
} else {
y.className = 'istalk';
}
} else {
y.className = x.className;
x.className = 'istalk';
}
var z = document.createElement('A');
if(x.children){
z.href = x.children[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling);
}else{
z.href = x.childNodes[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling);
}
}
function changeLinks(){
if(!document.getElementById) return;
document.getElementById('pt-mytalk').firstChild.innerHTML = 'Mi Buzón';
document.getElementById('pt-preferences').firstChild.innerHTML = 'Preferencias';
document.getElementById('pt-watchlist').firstChild.innerHTML = 'Lista de seguimiento';
document.getElementById('pt-mycontris').firstChild.innerHTML = 'Contribuciones';
document.getElementById('pt-logout').firstChild.innerHTML = 'Salir';
if(document.getElementById('ca-talk'))
document.getElementById('ca-talk').firstChild.innerHTML = 'Discusión';
if(document.getElementById('ca-edit'))
document.getElementById('ca-edit').firstChild.innerHTML = 'Editar';
if(document.getElementById('ca-nstab-wp'))
document.getElementById('ca-nstab-wp').firstChild.innerHTML = 'Acerca de';
}
function addForceSummary(){
if(!/&action=edit/.test(window.location.href)) return;
if(/§ion=new/.test(window.location.href)) return;
if(!document.forms.editform) return;
document.forms.editform.wpSave.onclick = forceSummary;
}
function forceSummary(){
var form = document.forms.editform;
if(!form.wpSummary.value.replace(/^(\/\*.*\*\/)? *(.*) *$/,'$2')){
var r = prompt('¿Estás seguro de que quieres grabar sin enviar un resumen?\nPara añadir un resumen, escribelo en la caja de abajo:',form.wpSummary.value);
if(r == null) return false;
form.wpSummary.value = r;
}
return true;
}
function vfddelete(){
document.forms.deleteconfirm.wpReason.value = '[[Wikipedia:Votes for deletion/' + unescape(window.location.href.replace(/^.*\?title=([^&]+)&action=delete.*$/, '$1').replace(/_/g, ' ')).replace(/^(Talk|Wikipedia( talk)?):/, '') + ']]';
}
function morelinks(){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(document.title.indexOf("Editing Wikipedia:Votes for deletion") == 0){
addlilink(tabs, 'javascript:closevfd("Mantener", "")', 'K', '');
addlilink(tabs, 'javascript:closevfd("Fusionar y redireccionar", " to [[" + prompt("Merge and redirect to?") + "]]")', 'M&R', '');
addlilink(tabs, 'javascript:closevfd("redirect", " a [[" + prompt("Redirect to?") + "]]")', 'R', '');
addlilink(tabs, 'javascript:closevfd("transwiki", " a " + prompt("Transwiki to?"))', 'T', '');
addlilink(tabs, 'javascript:closevfd("transwiki", " a Wiktionary")', 'WIKT', '');
addlilink(tabs, 'javascript:closevfd("borrado rápido", "")', 'SD', '');
addlilink(tabs, 'javascript:closevfd("borrar", "")', 'D', '');
addlilink(tabs, 'javascript:closevfd(prompt("¿Resultado?"), "")', 'Oth', '');
}else if(document.title.indexOf("Editando ") == 0){
addlilink(tabs, 'javascript:replace()', 'Reemplazar', '');
addlilink(tabs, 'javascript:fixformat()', 'Formato', '');
addlilink(tabs, 'javascript:vfdresult()', 'VFD', '');
}else if(document.title.indexOf("Confirma el borrado - borrar") == 0){
addlilink(tabs, 'javascript:vfddelete()', 'VFD', '');
}else if(document.title.indexOf("Confirm protection - Proteger") == 0){
addlilink(tabs, 'javascript:moveprotect()', 'MV', '');
}else if(document.title.indexOf("Wikipedia:Votes for deletion") == 0){
addlilink(tabs, 'javascript:hidevfd()', 'Esconder', 'ca-hide');
addlilink(tabs, 'javascript:showvfd()', 'Mostrar', 'ca-show');
}
}
function addToolBoxLinks(){
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
addlilink(tb, '/wiki/Special:Newpages', 'Páginas Nuevas', '');
addlilink(tb, '/wiki/Special:Shortpages', 'Páginas cortas', '');
}
function myLoadFuncs(){
addPurge();
addEditSection0();
changeLinks();
addForceSummary();
morelinks();
addToolBoxLinks();
}
if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false);
else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs);
else{
window._old_Caiser_onload = window.onload;
window.onload = function(){
window._old_Caiser_onload();
myLoadFuncs();
}
}
/* </nowiki> */