Usuário:Rjclaudio/FastButtons.js

Origem: Wikipédia, a enciclopédia livre.

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)
  • Internet Explorer / Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
  • Opera: Pressione Ctrl-F5.
//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="http://pt.wikipedia.org/w/index.php?title=";

var fin_otro="edit&apagar=otro-";
var fin_esr="edit&apagar=esrgen-";
var fin_titulo="edit&apagar=titulo-";
var fin_spam="edit&apagar=spam-";
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 FBesr1 = true;	//ESR geral
var FBbsre = true;	//ESR Biografia sem Relevo Enciclopédico
var FBbanda = true;	//ESR Banda
var FBspu= true;	//spu
var FBuser = true;	//Página de usuário
var FBcat = true;	//Categoria
var FBpredef = true;	//Predefinição
var FBdisc = true;	//Discussão
var FBrdd = true;	//RDD
var FBvda = true;	//VDA
var FBmatrad = true;	//Matrad
var FBtitulo = true;	//título
var FBspam = true;	//spam
var FBredir = true;	//Redirect
var FBpróprio = true;	//Pedido do criador
var FBotro = true;	//Custom CSD

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 FBapagar = 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 (FBapagar){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 (FBesr1){tmp+= '[<a href='+dire+'edit&esr=esr1>esr</a>] '; }

	// Usuário
	if( wgNamespaceNumber ==  2 || wgNamespaceNumber == 3 ) {
          if (FBspu){tmp+= '[<a href='+dire+'edit&borrar=spu>spu</a>] '; }
          if (FBuser){tmp+= '[<a href='+dire+'edit&borrar=user>user</a>] '; }
	}

        // Predefinição
	if( wgNamespaceNumber ==  10 || wgNamespaceNumber == 11 )
          if (FBpredef){tmp+= '[<a href='+dire+'edit&borrar=predef>predef</a>] '; }

	// Categoria
	if( wgNamespaceNumber ==  14 || wgNamespaceNumber == 15 )
          if (FBcat){tmp+= '[<a href='+dire+'edit&apagar=cat>cat</a>] '; }

	// Discussão
	if( wgNamespaceNumber ==  1 || wgNamespaceNumber == 3 || wgNamespaceNumber == 5 || wgNamespaceNumber == 7 || wgNamespaceNumber == 9 || wgNamespaceNumber == 11 || wgNamespaceNumber == 13 || wgNamespaceNumber == 15 ) {
          if (FBrdd){tmp+= '[<a href='+dire+'edit&apagar=rdd>rdd</a>] '; }
          if (FBdisc){tmp+= '[<a href='+dire+'edit&apagar=disc>disc</a>] '; }
        }

	// Artigo
	if( wgNamespaceNumber ==  0 || wgNamespaceNumber ==  102 ) {
          if (FBbanda){tmp+= '[<a href='+dire+'edit&apagar=banda>banda</a>] '; }
	  if (FBbsre){tmp+= '[<a href='+dire+'edit&apagar=bsre>bsre</a>] '; }
	  if (FBvda){tmp+= '[<a onclick="mot=prompt(/Origem do VDA:/);location.href=dire + fin_otro +encodeURI(mot) ;">VDA</a>] ';}
	  if (FBmatrad){tmp+= '[<a href='+dire+'edit&apagar=FBmatrad>matrad</a>] '; }
        }

	// Excessão para alguns domínios
	if(!( wgNamespaceNumber =  2 || wgNamespaceNumber =  3 )) {
	  if (FBtitulo){tmp+= '[<a onclick="mot=prompt(/Justificativa:/);location.href=dire + fin_título +encodeURI(mot) ;">título</a>] ';}

	// Geral
	if (FBspam){tmp+= '[<a onclick="mot=prompt(/Justificativa:/);location.href=dire + fin_spam +encodeURI(mot) ;">spam</a>] ';}
	if (FBredir){tmp+= '[<a href='+dire+'edit&apagar=redir>redir</a>] '; }
	if (FBpróprio){tmp+= '[<a href='+dire+'edit&apagar=próprio>próprio</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;
 
// Regras de eliminação

if (location.href.match("esr=esr1")) 
{
	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='{{subst:esr-banda|1=~~~~}}\n' + txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Página proposta para [[WP:ESR|eliminação semirrápida]] (banda)'+ufb;
	 		document.editform.submit();
		}
	}
}

else if (location.href.match("apagar=spu")) 
{
	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("apagar=user"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{er1|U1|2=~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra U1)'+ufb;
		document.editform.submit();
	}
}

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

else if (location.href.match("apagar=predef"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{er1|P1|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("apagar=disc"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{er1|D1|2=~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra D1)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("apagar=rdd"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{er1|R2|2=~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra R2 - Redirecionamento de página de discussão)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("apagar=vda")) 
{
	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='{{subst:VDA|1='+decodeURI(mot)+'}}\n' + txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Página marcada como VDA'+ufb;
	 		document.editform.submit();
		}
	}
}

else if (location.href.match("apagar=matrad"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{subst:av-matrad}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página marcada como Má tradução'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("apagar=titulo")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		mot=location.href.substring(location.href.indexOf('titulo-')+7, location.href.length)
		if (mot!=null)
		{
			txt='{{er1|1=15|2=~~~~|3='+decodeURI(mot)+'}}\n' + txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 15)'+ufb;
	 		document.editform.submit();
		}
	}
}

else if (location.href.match("apagar=spam")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		mot=location.href.substring(location.href.indexOf('spam-')+5, location.href.length)
		if (mot!=null)
		{
			txt='{{er1|1=06|2=~~~~|3='+decodeURI(mot)+'}}\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("apagar=bsre")) 
{
	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='{{subst:esr-bio|1=~~~~}}\n' + txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Página proposta para [[WP:ESR|eliminação semirrápida]] (BSRE)'+ufb;
	 		document.editform.submit();
		}
	}
}

else if (location.href.match("apagar=banda")) 
{
	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='{{subst:esr-banda|1=~~~~}}\n' + txt;
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'Página proposta para [[WP:ESR|eliminação semirrápida]] (banda)'+ufb;
	 		document.editform.submit();
		}
	}
}

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


else if (location.href.match("apagar=próprio"))
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt= '{{er1|7|2=~~~~}}\n' + txt;
		document.getElementById ("wpTextbox1").value=txt;
		document.editform.wpSummary.value = 'Página proposta para eliminação rápida (regra 07)'+ufb;
		document.editform.submit();
	}
}

else if (location.href.match("apagar=otro")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		mot=location.href.substring(location.href.indexOf('otro-')+5, location.href.length)
		txt='{{er1|1=20|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();
		}
	}
}

// Usado para encerrar as PEs

else if (location.href.match("pe=perd")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
var result=''; var redirect='';

		result =location.href.substring(location.href.indexOf('perd-')+5, location.href.indexOf('-perd_dest-')) ;
		redirect =location.href.substring(location.href.indexOf('-perd_dest-')+11, location.href.length) ;
		if (redirect!=null)
		{
			txt='#Redirecionamento [['+decodeURI(redirect)+']]';
			document.getElementById ("wpTextbox1").value=txt;
			document.editform.wpSummary.value = 'PE encerrada: redirecionar para ' + redirect + ' (' + result + ')';
	 		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();
	}
}


// Marcação de manutenção

else if (location.href.match("plant=wikify")) 
{
	txt=document.getElementById("wpTextbox1").value
	if ((txt.match("{destruir")==null) && (txt!=""))
	{
		txt='{{Wikificação}}\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.");
 
  }
});