User:Macy/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | The accompanying .css page for this skin is at User:Macy/monobook.css. |
//<pre>
var pagina =''; var mot=''; var txt=''; var botones=''; var usuario=''; var temporal='';
var sep="|"; var biblio=false;
var ufb = ', using FastButtons';
var dire="http://en.wikipedia.org/w/index.php?title=";
var fin_otro="edit&borrar=otro-";
var fin_aviso="edit&aviso=";
var vec="http://es.wikipedia.org/w/index.php?title=Wikipedia:Vandalismo_en_curso&action=edit§ion=1&motivoVEC=";
var textopruebas="Aviso:\n(nada): Prueba\n0a: Wikietiqueta\n0b: Estilo\n0c: Spam\n2: Ediciones sin sentido\n2a: Blanqueo\n3: Detente\n4: Última advertencia\n5: Bloqueo";
var FBpersonales = false; //¿Activar config personal?
var FBpruebas= true; //Pruebas de edición
var FBblanco = true; //Prueba de edición blanqueadas
var FBne = true; //No enciclopédico
var FBinfra = true; //Infraesbozo
var FBautopromo = true; //Página de usuario que viola WP:PU
var FBotro = true; //Globalize (custom)
var FBwikify = true; //Wikify
var FBunref = true; //Unreferenced
var FBcleanup = true; //Cleanup
var FBnpov = true; //POV
var FBborrar = false; //Borrado instantáneo
var FBvec = false; //Reportar en WP:VEC
var FBaviso = false; //More tags
/* Toma de datos */
for (i=0; i<wgUserGroups.length; i++)
{ if (wgUserGroups[i] == "sysop") biblio=true; }
pagina=encodeURI(wgPageName);
if (pagina.match("&"))
{
pagina=pagina.replace("&","%26");
}
dire=dire+pagina+"&action=";
usuario=pagina.split(":")[1];
if (pagina=="Especial:Contributions")
{usuario=location.href.substring(location.href.indexOf('Contributions/')+14,location.href.length);}
//</pre>
//<pre>
/* Inicio */
if (biblio==false)
{
tmp='';
if (FBpruebas){tmp+= '[<a href='+dire+'edit&borrar=pruebas>test</a>] '; }
if (FBblanco){tmp+= '[<a href='+dire+'edit&borrar=blanco>vandalism</a>] '; }
if (FBne){tmp+= '[<a href='+dire+'edit&borrar=NE>nonsense</a>] '; }
if (FBinfra){tmp+= '[<a href='+dire+'edit&borrar=infra>attack</a>] '; }
if (FBautopromo){tmp+= '[<a href='+dire+'edit&borrar=autopromo>globalize (USA)</a>] '; }
if (FBotro){tmp+= '[<a onclick="mot=prompt(/Please enter country/);location.href=dire + fin_otro +encodeURI(mot) ;"> globalize (custom) </a>] ';}
if (tmp!='') { botones= botones + 'CSD/Tags: ' + tmp + '<br>';}
}
if (biblio)
{
tmp='';
if (FBborrar){tmp+= '[<a href='+dire+'delete&rapido=si>¡Borrar!</a>] '; }
if (tmp!=''){botones = botones + 'Para biblios: ' +tmp+'<br>';}
}
tmp='';
if (FBwikify){tmp+= '[<a href='+dire+'edit&plant=wikify>wikify</a>] '; }
if (FBunref){tmp+= '[<a href='+dire+'edit&plant=unref>unreferenced</a>] '; }
if (FBcleanup){tmp+= '[<a href='+dire+'edit&plant=cleanup>cleanup</a>] '; }
if (FBnpov){tmp+= '[<a href='+dire+'edit&plant=npov>POV</a>] '; }
if (tmp!=''){botones = botones + 'Maintenance templates: ' +tmp+'<br>';}
tmp='';
if (FBaviso){tmp+='[<a onclick="mot=prompt(textopruebas);location.href=dire + fin_aviso +encodeURI(mot) ;">More tags</a>] ';}
//if (biblio==false)
//{if (FBvec){tmp+= '[<a onclick=";mot=prompt(/Motivo/);location.href=vec + usuario + sep + mot;">Reportar en VEC</a>] ';}}
if (tmp!=''){botones = botones + 'Special: ' +tmp+'<br>';}
/* Botones funcionando */
addOnloadHook(function ()
{
if (document.getElementById('contentSub').innerHTML!='')
{document.getElementById('contentSub').innerHTML+='<br>';}
document.getElementById('contentSub').innerHTML = document.getElementById('contentSub').innerHTML+ botones;
if (location.href.match("borrar=blanco"))
{
txt=document.getElementById("wpTextbox1").value;
if (txt.match("{destruir")==null)
{
txt= '{{db-test}}\n' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Requesting speedy deletion G2'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=pruebas"))
{
txt=document.getElementById("wpTextbox1").value;
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{db-vandalism}}\n' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Requesting speedy deletion G3'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=NE"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{db-nonsense}}\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Requesting speedy deletion G1'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=infra"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{db-attack}}\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Requesting speedy deletion G10'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=autopromo"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{globalize/USA}}\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Tagged with {{globalize/USA}}'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=otro"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
mot=location.href.substring(location.href.indexOf('otro-')+5, location.href.length)
if (mot!=null)
{
txt='{{globalize|'+decodeURI(mot)+'}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Quick {{globalize|+decodeURI(mot)'+ufb;
document.editform.submit();
}
}
}
else if (location.href.match("plant=wikify"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{wikify}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Tagged with {{wikify}}'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=unref"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{unreferenced}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Tagged with {{unreferenced}}'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=cleanup"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{cleanup}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Tagged with {{cleanup}}'+ufb;
document.editform.wpSave.click();
}
}
else if (location.href.match("plant=npov"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{POV}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Tagged with {{POV}}'+ufb;
document.editform.wpSave.click();
}
}
else if (location.href.match("rapido=si"))
{
document.getElementById ("wpConfirmB").click();
}
else if (location.href.match("motivoVEC="))
{
var txt2;
var strt="Añade la siguiente solicitud debajo de esta línea.-->";
mot=location.href.substring(location.href.indexOf('motivoVEC=')+10, location.href.length);
txt=document.getElementById("wpTextbox1").value;
txt2=txt.split(strt).join(strt+"\n\n{{subst:Reportevandalismo|"+decodeURI(mot)+"|~~~~}}");
document.getElementById("wpTextbox1").value=txt2;
document.editform.wpSummary.value = 'Reportando'+ufb;
document.editform.submit();
}
else if (location.href.match("aviso="))
{
txt=document.getElementById("wpTextbox1").value;
mot=location.href.substring(location.href.indexOf('aviso=')+6, location.href.length);
txt=txt+'\n\n{{subst:prueba'+decodeURI(mot)+'}} --~~~~';
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Aviso al usuario'+ufb;
document.editform.submit();
}
});
//</pre>