Usuário(a):Fiendian Reptiloid, Demon/monobook.js
Aspeto
Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.
- Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
- Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
- Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5.
/** FastButtons ***********************************************************************
* Origem: [[MediaWiki:Gadget-fastbuttons.js]]
* Ajuda: [[Wikipedia:Software/Scripts/FastButtons]]
* Descrição: Acrescenta pequenos botões para manutenção e eliminação de páginas.
* Autor: [[:es:Usuario:Racso]]
********************************************************************************************/
//FastButtons, baseado no trabalho original do usuário Racso da Wikipédia em Espanhol,
//traduzido por Macy (Inglês) e HyperBroad (Português).
//<pre>
var pagina =''; var mot=''; var txt=''; var botones=''; var usuario=''; var temporal='';
var sep="|"; var biblio=true;
var ufb = ', usando [[Wikipedia:Software/Scripts/FastButtons|FastButtons]]';
var dire="https://pt.wikipedia.org/w/index.php?title=";
var fin_otro="edit&borrar=otro-";
var fin_aviso="edit&aviso=";
var fin_prod="edit&prod=";
var vec="http://pt.wikipedia.org/wiki/Wikipedia:Página de testes&action=edit&motivoVEC=";
var textopruebas="Aviso:\n1|(article): Level 1\n2|(article): Level 2\n3|(article): Level 3\n4|(article): Level 4\n4im|(article): Level 4im";
var prodreason="Por favor, informe o motivo para a eliminação:";
var FBpersonales = false; //Configuração pessoal
var FBpruebas= true; //spu
var FBblanco = true; //website
var FBne = true; //absurdo
var FBinfra = true; //spam
var FBautopromo = true; //Promotional
var FBotro = true; //Custom CSD
var FBcommons = true; //NowCommons
var FBimfu = false; //No fair use rationale
var FBprod = false; //PROD pages
var FBwikify = true; //Wikifcar
var FBunref = true; //sem fontes
var FBcleanup = true; //reciclagem
var FBnpov = true; //parcial
var FBglobal = true; //contexto
var FBcedit = true; //controverso
var FBborrar = false; //Apagar
var FBvec = false; //Denunciar
var FBprotect = false; //Protegida
var FBaviso = false; //Aviso
var FBwelcome = false; //Boas vindas
//Todos os dados estão aqui:
for (i=0; i<wgUserGroups.length; i++)
{ if (wgUserGroups[i] == "sysop") biblio=true; }
for (i=0; i<wgUserGroups.length; i++)
{ if (wgUserGroups[i] == "autoconfirmed") autoconfirmed=true; }
pagina=encodeURI(wgPageName);
if (pagina.match("&"))
{
pagina=pagina.replace("&","%26");
}
dire=dire+pagina+"&action=";
usuario=pagina.split(":")[1];
if (pagina=="Special:Contributions")
{usuario=location.href.substring(location.href.indexOf('Contributions/')+14,location.href.length);}
//</pre>
//<pre>
//Start
if (biblio)
{
tmp='';
if (FBborrar){tmp+= '[<a href='+dire+'delete>apagar!</a>] '; }
if (FBprotect){tmp+= '[<a href='+dire+'edit&protected=yes>proteger</a>] '; }
if (FBprotect){tmp+= '[<a href='+dire+'edit&protected=semi>proteger-ip</a>] '; }
if (tmp!=''){botones = botones + 'Botões para sysop: ' +tmp+'<br>';}
}
if (biblio===true)
if (autoconfirmed===true)
{
tmp='';
if (FBpruebas){tmp+= '[<a href='+dire+'edit&borrar=blanco>spu</a>] '; }
if (FBblanco){tmp+= '[<a href='+dire+'edit&borrar=pruebas>website</a>] '; }
if (FBne){tmp+= '[<a href='+dire+'edit&borrar=NE>absurdo</a>] '; }
if (FBinfra){tmp+= '[<a href='+dire+'edit&borrar=infra>spam</a>] '; }
if (FBautopromo){tmp+= '[<a href='+dire+'edit&borrar=autopromo>impróprio/lixo</a>] '; }
if( wgNamespaceNumber == 6 )
if (FBimfu){tmp+= '[<a href='+dire+'edit&borrar=norat>no fair use</a>] '; }
if( wgNamespaceNumber == 6 )
if (FBcommons){tmp+= '[<a href='+dire+'edit&borrar=commons>commons</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBprod){tmp+='[<a onclick="mot=prompt(prodreason);location.href=dire + fin_prod +encodeURI(mot) ;">PROD</a>] ';}
if (FBotro){tmp+= '[<a onclick="mot=prompt(/Justificativa:/);location.href=dire + fin_otro +encodeURI(mot) ;"> Outros casos </a>] ';}
if (tmp!='') { botones= botones + 'Eliminação: ' + tmp + '<br>';}
}
tmp='';
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBwikify){tmp+= '[<a href='+dire+'edit&plant=wikify>wikificar</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBunref){tmp+= '[<a href='+dire+'edit&plant=unref>sem fontes</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBcleanup){tmp+= '[<a href='+dire+'edit&plant=cleanup>reciclagem</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBnpov){tmp+= '[<a href='+dire+'edit&plant=npov>parcial</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBglobal){tmp+= '[<a href='+dire+'edit&plant=global>contexto</a>] '; }
if( wgNamespaceNumber == 0 || wgNamespaceNumber == 1 )
if (FBcedit){tmp+= '[<a href='+dire+'edit&plant=cedit>controverso</a>] '; }
if (tmp!=''){botones = botones + 'Manutenção: ' +tmp+'<br>';}
tmp='';
if( wgNamespaceNumber == 3 )
if (FBaviso){tmp+='[<a onclick="mot=prompt(textopruebas);location.href=dire + fin_aviso +encodeURI(mot) ;">warn user</a>] ';}
if( wgNamespaceNumber == 2 || wgNamespaceNumber == 3 )
{
if (FBvec){tmp+= '[<a onclick=";mot=prompt(\n/Informe o motivo abaixo/);location.href=vec + usuario + sep + mot;">AIV report</a>] ';}
}
if( wgNamespaceNumber == 3 )
if (FBcedit){tmp+= '[<a href='+dire+'edit&plant=welcome>welcome user</a>] '; }
//if (tmp!=''){botones = botones + 'Especial: ' +tmp+'<br>';}
/* Botones funcionando */
$(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= '{{er1|01|2=~~~~}}<!--\n' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 01)'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=pruebas"))
{
txt=document.getElementById("wpTextbox1").value;
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{er1|02|2=~~~~}}<!--\n' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 02)'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=NE"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{er1|03|2=~~~~}}<!--\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 03)'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=infra"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{spam|1=~~~~}}<!--\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 06)'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=autopromo"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{er1|20|2=~~~~}}<!--\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 20)'+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='{{er1|1=0|2=~~~~|3='+decodeURI(mot)+'}}<!--\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página proposta para eliminação rápida'+ufb;
document.editform.submit();
}
}
}
else if (location.href.match("borrar=norat"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{er1|14|2=~~~~}}\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Proposta para eliminação rápida (regra 14)'+ufb;
document.editform.submit();
}
}
else if (location.href.match("borrar=commons"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '{{db-i6}}\n' + txt
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Proposta para eliminação rápida:'+ufb;
document.editform.submit();
}
}
else if (location.href.match("protected=yes"))
{
txt=document.getElementById("wpTextbox1").value;
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página protegida'+ufb;
document.editform.submit();
}
}
else if (location.href.match("protected=semi"))
{
txt=document.getElementById("wpTextbox1").value;
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt= '' + txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página protegida contra IPs'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=wikify"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{subst:wkf}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada para wikificar'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=unref"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{sem-fontes|data={{subst:CURRENTMONTHNAME}} de {{subst:CURRENTYEAR}}}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada como sem fontes'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=cleanup"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{reciclagem|data={{subst:CURRENTMONTHNAME}} de {{subst:CURRENTYEAR}}}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada para reciclagem'+ufb;
document.editform.wpSave.click();
}
}
else if (location.href.match("plant=npov"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{parcial}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada como parcial'+ufb;
document.editform.wpSave.click();
}
}
else if (location.href.match("plant=global"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{contextualizar}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada para contextualizar'+ufb;
document.editform.wpSave.click();
}
}
else if (location.href.match("plant=cedit"))
{
txt=document.getElementById("wpTextbox1").value
if ((txt.match("{destruir")==null) && (txt!=""))
{
txt='{{controverso}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Página marcada como controverso'+ufb;
document.editform.submit();
}
}
else if (location.href.match("plant=welcome"))
{
txt=document.getElementById("wpTextbox1").value
if (txt.match("{destruir")==null)
{
txt='{{subst:w-basic}}\n'+txt;
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Welcoming user'+ufb;
document.editform.submit();
}
}
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:vandal|"+decodeURI(mot)+"}} --~~~~");
document.getElementById("wpTextbox1").value=txt2;
document.editform.wpSummary.value = 'Reporting [[Special:Contributions/' + uid + '|' + uid + ']]'+ufb;
document.editform.submit();
}
else if (location.href.match("aviso="))
{
txt=document.getElementById("wpCombobox1").value;
mot=location.href.substring(location.href.indexOf('aviso=')+6, location.href.length);
txt=txt+'\n\n{{subst:uw-vandalism'+decodeURI(mot)+'}} --~~~~';
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Warning user'+ufb;
document.editform.submit();
}
else if (location.href.match("prod="))
{
txt=document.getElementById("wpTextbox1").value;
mot=location.href.substring(location.href.indexOf('aviso=')+6, location.href.length);
txt=txt+'{{subst:prod|'+decodeURI(mot)+'}}';
document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Warning user'+ufb;
document.editform.submit();
}
});
//</pre>
//Special FastButtons start here
//Edit count FastButton
$(function() {
if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history
return;
if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
var username = encodeURIComponent( wgTitle );
var checkurl = "http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user="+ username +"&site=&dbname=ptwiki_p" ;
mw.util.addPortletLink("p-cactions", checkurl, "cde", "ca-contrib", "Ver o número de edições deste utilizador.");
}
});
//Special:Prefixindex FastButton
$(function() {
if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history
return;
if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
var username = encodeURIComponent( wgTitle );
var checkurl = wgServer + "/w/index.php?title=Special:Prefixindex&from=" + username + "&namespace=2" ;
mw.util.addPortletLink("p-cactions", checkurl, "todas as páginas", "ca-contrib", "Ver todas as páginas deste utilizador.");
}
});
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Fiendian Reptiloid, Demon/global.js&action=raw&ctype=text/javascript');
/** Atalhos *********************************************************************************
* Ajuda: [[Wikipedia:Software/Scripts/Atalhos]]
* Descrição: Acrescenta ligações personalizadas num menu lateral
* Autor: [[:en:User:Jsimlo]]
********************************************************************************************/
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Jsimlo/shortcuts.js&action=raw&ctype=text/javascript' );
function shortcutsInit ()
{
shortcutsStartSection ('utilidades');
shortcutsAddLink ( 'Animanga', 'Wikipedia:Projetos/Animangá' );
shortcutsAddLink ( 'Games', 'Wikipedia:Projetos/Games' );
shortcutsAddLink ( 'Pokemon', 'Wikipedia:Projetos/Pokemon' );
shortcutsAddLink ( 'Notoriedade', 'Wikipedia:Critérios de notoriedade' );
}