Nota: Depois de publicar, deve limpar o cachê do seu navegador para ver as alterações.

  • Firefox e 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)
  • Internet Explorer e Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
/*FastButtons, baseado no trabalho original do [[w:es:Usuario:Racso]] da Wikipédia em espanhol 
  e das adaptações do [[w:en:User:Macy/FastButtons.js]] da Wikipédia em inglês e do [[Utilizador:Vitorbraziledit~ptwikinews/FastButtons.js]] do Wikinotícias em português.
  Última atualização: 01/08/2017 às 01:46 (UTC)
*/

//<pre>
//Variáveis gerais
var pagina =''; var mot=''; var txt=''; var botoes=''; var usuario=''; var temporal='';
var sep="|"; var sysop=false;
var ufb = ', usando [[WN:FB|FastButtons]]';
var dire="http://pt.wikinews.org/w/index.php?title=";
var fin_outro="edit&borrar=outro-";
var fin_aviso="edit&section=new&aviso=";
var texto="Página:";
var FBpessoal = false; //Configuração pessoal
//Variáveis para eliminação
var FBSub= true;	//Subpáginas de usuário
var FBSite = true;	//Endereços de websites no título
var FBAbsurdo = true;	//Títulos absurdos, conteúdo movido para...
var FBRecorrente = true;	//Aparecimento recorrente (se o conteúdo for igual ao eliminado por votação)
var FBSpam = true;	//Página cujo título ou único conteúdo é um anúncio
var FBEngano = true;	//Próprio criador reconhece que se enganou
var FBTemp = true;	//Eliminações temporárias sem perda de histórico para resolver problemas técnicos (somente admin)
var FBRedirect = true;	//Eliminar redirect, página sem histórico relevante (mover página atual redirect para cá)
var FBErrado = true;	//Namespaces que não existem (Wikinoticias, Ajuda)
var FBImagens = true;	//Imagens, somente por quem a carregou
var FBVDA = true;  //Violação de Direitos Autorais
var FBDuplicado = true;	//Ficheiros (arquivos) duplicados (ex. {{NowCommons1}} ou {{NowCommons|nome do ficheiro}})
var FBTalk = true;	//Discussão cujos notícias não existem (para todos os domínios)
var FBImproprio = true;	//Lixo e impróprio
var FBOutro = true;	//Outro motivo
//Variáveis para manutenção
var FBWikificar = true;    //Wkificar
var FBSemRef = true;	//Sem fontes
var FBReciclagem = true;	//Reciclagem
var FBPOV = true;	//Parcial
var FBApagar = false;	//Apagar
var FBProteger = false;	//Proteger
var FBAviso = true;	//Aviso
var FBBoasVindas = true;	//Boas vindas
var FBBVIP = true;	//Boas vindas ao IP
 
//Todos os dados estão aqui:
for (i=0; i<wgUserGroups.length; i++)
   {  if (wgUserGroups[i] == "sysop") sysop=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=="Especial:Contribuições")
{usuario=location.href.substring(location.href.indexOf('Contribuições/')+14,location.href.length);}
 
//</pre>
 
//<pre>
 
//Início
 
 if (sysop)
{
tmp='';
 
 	if (FBApagar){tmp+= '[<a href='+dire+'delete>Apagar</a>] '; }
	if (FBProteger){tmp+= '[<a href='+dire+'edit&protected=yes>Proteger</a>] '; }
	if (FBProteger){tmp+= '[<a href='+dire+'edit&protected=semi>Proteger-ip</a>] '; }
	
if (tmp!=''){botoes = botoes + 'Botões para administradores: ' +tmp+'<br>';}
}
 
if (sysop===false)
if (autoconfirmed===true)
{
	tmp='';
 	//Eliminação
	if( wgNamespaceNumber ==  2 || wgNamespaceNumber ==  3 )
	if (FBSub){tmp+= '[<a href='+dire+'edit&borrar=Sub>Subpágina</a>] '; }
	if( wgNamespaceNumber ==  0 )
 	if (FBSite){tmp+= '[<a href='+dire+'edit&borrar=Site>Website</a>] '; }
	if( wgNamespaceNumber ==  0 )
	if (FBAbsurdo){tmp+= '[<a href='+dire+'edit&borrar=Absurdo>Título absurdo</a>] '; }
	if( wgNamespaceNumber ==  0 )
 	if (FBRecorrente){tmp+= '[<a href='+dire+'edit&borrar=Recorrente>Aparecimento recorrente</a>] '; }
 	if( wgNamespaceNumber ==  0 )
	if (FBSpam){tmp+= '[<a href='+dire+'edit&borrar=Spam>Spam</a>] '; }
 	if( wgNamespaceNumber ==  0 )
	if (FBEngano){tmp+= '[<a href='+dire+'edit&borrar=Engano>Engano</a>] '; }
	if( wgNamespaceNumber ==  0 )
	if (FBTemp){tmp+= '[<a href='+dire+'edit&borrar=Temp>Temporário</a>] '; }
	if( wgNamespaceNumber ==  0 )
	if (FBRedirect){tmp+= '[<a href='+dire+'edit&borrar=Redirect>Redirect</a>] '; }
	if( wgNamespaceNumber ==  2 || wgNamespaceNumber ==  3 || wgNamespaceNumber ==  4 || wgNamespaceNumber ==  5 || wgNamespaceNumber ==  6 || wgNamespaceNumber ==  7 || wgNamespaceNumber ==  8 || wgNamespaceNumber ==  9 || wgNamespaceNumber ==  10 || wgNamespaceNumber ==  11 || wgNamespaceNumber ==  12 || wgNamespaceNumber ==  13 || wgNamespaceNumber ==  14 || wgNamespaceNumber ==  15 || wgNamespaceNumber ==  100 || wgNamespaceNumber ==  101 )
	if (FBErrado){tmp+= '[<a href='+dire+'edit&borrar=Errado>Domínio inexistente</a>] '; }
	if( wgNamespaceNumber ==  6 )
	if (FBImagens){tmp+= '[<a href='+dire+'edit&borrar=Imagens>Imagem</a>] '; }
	if( wgNamespaceNumber ==  0 )
	if (FBVDA){tmp+= '[<a href='+dire+'edit&borrar=VDA>VDA</a>] '; }
	if( wgNamespaceNumber ==  6 )
	if (FBDuplicado){tmp+= '[<a href='+dire+'edit&borrar=Duplicado>Imagem duplicada</a>] '; }
	if( wgNamespaceNumber ==  1 || wgNamespaceNumber ==  3 || wgNamespaceNumber ==  5 || wgNamespaceNumber ==  7 || wgNamespaceNumber ==  9 || wgNamespaceNumber ==  11 ||wgNamespaceNumber ==  13 || wgNamespaceNumber ==  15 || wgNamespaceNumber ==  101 )
	if (FBTalk){tmp+= '[<a href='+dire+'edit&borrar=Talk>Discussão</a>] '; }
	if( wgNamespaceNumber ==  0 || wgNamespaceNumber ==  1 || wgNamespaceNumber ==  2 || wgNamespaceNumber ==  3 || wgNamespaceNumber ==  4 || wgNamespaceNumber ==  5 || wgNamespaceNumber ==  6 || wgNamespaceNumber ==  7 || wgNamespaceNumber ==  8 || wgNamespaceNumber ==  9 || wgNamespaceNumber ==  10 || wgNamespaceNumber ==  11 || wgNamespaceNumber ==  12 || wgNamespaceNumber ==  13 || wgNamespaceNumber ==  14 || wgNamespaceNumber ==  15 || wgNamespaceNumber ==  100 || wgNamespaceNumber ==  101 )
	if (FBImproprio){tmp+= '[<a href='+dire+'edit&borrar=Improprio>Impróprio</a>] '; }
 	if( wgNamespaceNumber ==  0 )
	if (FBOutro){tmp+= '[<a onclick="mot=prompt(/Justificativa:/);location.href=dire + fin_outro +encodeURI(mot) ;">Outro motivo</a>] ';}
 
	if (tmp!='') { botoes= botoes + 'Eliminação: ' + tmp + '<br>';}
 
}
 
 
tmp='';
//Manutenção
if( wgNamespaceNumber ==  0 || wgNamespaceNumber == 1 )
if (FBWikificar){tmp+= '[<a href='+dire+'edit&plant=Wikificar>Wikificar</a>] '; }
if( wgNamespaceNumber ==  0 || wgNamespaceNumber == 1 )
if (FBSemRef){tmp+= '[<a href='+dire+'edit&plant=SemRef>Sem fontes</a>] '; } 
if( wgNamespaceNumber ==  0 || wgNamespaceNumber == 1 )
if (FBReciclagem){tmp+= '[<a href='+dire+'edit&plant=Reciclagem>Reciclar</a>] '; }
if( wgNamespaceNumber ==  0 || wgNamespaceNumber == 1 )
if (FBPOV){tmp+= '[<a href='+dire+'edit&plant=POV>Parcial</a>] '; }
 
if (tmp!=''){botoes = botoes + 'Manutenção: ' +tmp+'<br>';}

tmp='';
//Botões exclusivos para página de discussão do usuário
if( wgNamespaceNumber ==  3 )
if (FBAviso){tmp+= '[<a onclick="mot=prompt(/Página:/);location.href=dire + fin_aviso +encodeURI(mot) ;">Avisar usuário</a>] ';}
if( wgNamespaceNumber ==  3 )
if (FBBoasVindas){tmp+= '[<a href='+dire+'edit&plant=BoasVindas>Boas-vindas</a>] '; }
if( wgNamespaceNumber ==  3 )
if (FBBVIP){tmp+= '[<a href='+dire+'edit&plant=BVIP>Boas-vindas IP</a>] '; }

if (tmp!=''){botoes = botoes + 'Especial: ' +tmp+'<br>';}


/* Botões funcionando */
 
$(function ()
{
 
if (document.getElementById('contentSub').innerHTML!='')
{document.getElementById('contentSub').innerHTML+='<br>';}
 
document.getElementById('contentSub').innerHTML = document.getElementById('contentSub').innerHTML+ botoes;
 
 
if (location.href.match("borrar=Sub")) 
{
	txt=document.getElementById("wpTextbox1").value;
	if (txt.match("{ER")==null)
	{
		txt= '{{ER|1|~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 1)'+ufb;
		document.editform.submit();
	}
}
 
else if (location.href.match("borrar=Site")) 
{
	txt=document.getElementById("wpTextbox1").value;
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|2|~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 2)'+ufb;
		document.editform.submit();
	}
}
 
else if (location.href.match("borrar=Absurdo")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|3|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 3)'+ufb;
		document.editform.submit();
	}
}
 
else if (location.href.match("borrar=Recorrente")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|5|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 5)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Spam"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|6|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 6)'+ufb;
		document.editform.submit();
	}
}
 
else if (location.href.match("borrar=Engano"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|7|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 7)'+ufb;
		document.editform.submit();
	}
} 

else if (location.href.match("borrar=Temp"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|8|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 8)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Redirect"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|9|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 9)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Errado")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|10|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 10)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Imagens"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|12|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 12)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=VDA"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|13|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 13)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Duplicado"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|14|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 14)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Talk"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|18|~~~~}}\n' + txt
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 18)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("borrar=Improprio"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		txt= '{{ER|20|~~~~}}\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=outro")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{ER")==null) && (txt!=""))
	{
		mot=location.href.substring(location.href.indexOf('outro-')+6, location.href.length)
		if (mot!=null)
		{
			txt='{{ER|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("plant=Wikificar")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{Wkf")==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=SemRef")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{Sem referências")==null) && (txt!=""))
	{
		txt='{{Sem referências}}\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=Reciclagem")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{Reciclagem")==null) && (txt!=""))
	{
		txt='{{Reciclagem}}\n'+txt;
		document.getElementById ("wpTextbox1").value=txt; 
		document.editform.wpSummary.value = 'Página marcada para reciclagem'+ufb;
		document.editform.submit();
	} 
}

else if (location.href.match("plant=POV")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{Parcial")==null) && (txt!=""))
	{
		txt='{{Parcial}}\n'+txt;
		document.getElementById ("wpTextbox1").value=txt; 
		document.editform.wpSummary.value = 'Página marcada como parcial'+ufb;
		document.editform.submit();
	} 
}

else if (location.href.match("aviso=")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{Pare")==null) && (txt!=""))
	{
		mot=location.href.substring(location.href.indexOf('aviso=')+6, location.href.length)
		if (mot!=null)
		{
			txt='{{subst:Pare|1='+decodeURI(mot)+'}}~~~~\n'+txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Avisando usuário'+ufb;
	 		document.editform.submit();
		}
	}
} 

else if (location.href.match("plant=BoasVindas")) 
{
	txt=document.getElementById("wpTextbox1").value
	if (txt.match("{Bv")==null)
	{
		txt='{{subst:Bv}} ~~~~\n'+txt;
		document.getElementById ("wpTextbox1").value=txt; 
		document.editform.wpSummary.value = 'Dando boas-vindas ao utilizador'+ufb;
		document.editform.submit();
	} 
}

else if (location.href.match("plant=BVIP")) 
{
	txt=document.getElementById("wpTextbox1").value
	if (txt.match("{Bv-ip")==null)
	{
		txt='{{subst:Bv-ip}} ~~~~\n'+txt;
		document.getElementById ("wpTextbox1").value=txt; 
		document.editform.wpSummary.value = 'Dando boas-vindas ao utilizador anônimo'+ufb;
		document.editform.submit();
	} 
}

});

//</pre>

//Botões especiais
//Contador de edições
$(function() {
  if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //sem subpáginas ou histórico
     return;
  if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
    var username = encodeURIComponent( wgTitle );
    var checkurl = "https://tools.wmflabs.org/xtools-ec/?user="+ username +"&lang=pt&wiki=wikinews" ;
 
       mw.util.addPortletLink("p-cactions", checkurl, "edc", "ca-contrib", "Veja as contribuições deste usuário");
 
  }
});

//Especial:Índice por prefixo
$(function() {
  if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //sem subpáginas ou histórico
     return;
  if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {
     var username = encodeURIComponent( wgTitle );
     var checkurl = wgServer + "/w/index.php?title=Especial:Índice_por_prefixo&from=" + username + "&namespace=2" ;
 
    mw.util.addPortletLink("p-cactions", checkurl, "all pages", "ca-contrib", "Lista de páginas criadas por este usuário");
 
  }
});