Utilizador:Danilo.mac/fastbuttons.js: diferenças entre revisões

Origem: Wikcionário, o dicionário livre.
Conteúdo apagado Conteúdo adicionado
m teste
teste
Linha 121: Linha 121:
}
}
}
}
/** Consulta o API do Wikcionário usando AJAX **/
/** Consulta o API da Wikipedia usando AJAX **/
function fbapi(fapi){
function fbapi(fapi){
var fbajax = sajax_init_object();
var fbajax = sajax_init_object();
if (!fbajax) return;
if (fapi == "afl") url += "list=backlinks\&bllimit=1\&blfilterredir=nonredirects\&blnamespace=0\&bltitle="+encodeURIComponent(wgPageName);
var url = wgServer+wgScriptPath+"/api.php?format=xml\&action=query\&";
if (fapi == "esb"){
var esb = document.getElementById("esbinput");
if (esbtxt == esb.value || esbtxt2 == esb.value) return;
esbtxt = esb.value;
if (esbtxt == esb.value.substr(0,(esb.value.length - 1))) return;
url += "list=allpages\&apnamespace=10\&aplimit=1\&apprefix="+encodeURI("Esboço-")+encodeURIComponent(esb.value);
}
else if (fapi == "afl") url += "list=backlinks\&bllimit=1\&blfilterredir=nonredirects\&blnamespace=0\&bltitle="+encodeURIComponent(wgPageName);
else if (fapi == "PV") url += "list=watchlist\&wlexcludeuser="+encodeURIComponent(wgUserName)+"\&wlprop=user|comment|title|sizes";
else if (fapi == "PV") url += "list=watchlist\&wlexcludeuser="+encodeURIComponent(wgUserName)+"\&wlprop=user|comment|title|sizes";
else if (fapi == "PN") url += "list=recentchanges\&rctype=new\&rcnamespace=0\&rcshow=!patrolled\&rcprop=user|comment|title|sizes|ids";
else if (fapi == "PN") url += "list=recentchanges\&rctype=new\&rcnamespace=0\&rcshow=!patrolled\&rcprop=user|comment|title|sizes|ids";
Linha 151: Linha 160:
fb2.innerHTML = info;
fb2.innerHTML = info;
}
}
else if (fapi == "esb"){ // Esboço temático
api = api.getElementsByTagName("p");
if (api) api = api[0].getAttribute("title").replace(/Predefinição:Esboço-/gi, "");
else return;
if ((esb.setSelectionRange||esb.createTextRange||typeof(esb.selectionStart) != 'undefined' && typeof(esb.selectionEnd) != 'undefined')
&& esb.value == api.substr(0,esb.value.length)){ // Exibe sugestões. Baseado no script do HotCat
var inicio = esb.value.length;
esb.value = api;
esbtxt2 = api;
if (esb.setSelectionRange) esb.setSelectionRange (inicio, api.length);
else if (esb.createTextRange){
var sel = esb.createTextRange();
sel.move ("character", inicio);
sel.move ("character", inicio);
sel.moveEnd ("character", api.length - inicio);
sel.moveEnd ("character", api.length - inicio);
Linha 159: Linha 180:
esb.selectionEnd = api.length;
esb.selectionEnd = api.length;
}
}
}
}
else if (fapi == "PV"){ // Páginas vigiadas
api = api.getElementsByTagName("item");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = (api[i].getAttribute("newlen")-api[i].getAttribute("oldlen"));
if (tamanho > 0) tamanho = "+" + tamanho;
var coment = api[i].getAttribute("comment").replace("/*", "→");
if (coment) coment = "(" + coment.replace("*/", ":") + ")";
coment = coment.replace("[[Ajuda:Guia de edição/Menus e ferramentas/Sumário de edição|←]]", "");
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&diff=last\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
else if (fapi == "PN"){ // Páginas novas
api = api.getElementsByTagName("rc");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = "+" + api[i].getAttribute("newlen");
var coment = api[i].getAttribute("comment");
if (coment) coment = "(" + coment.replace("[[Ajuda:SEA|←]] ", "") + ")";
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&redirect=no\&rcid="+api[i].getAttribute("rcid")+"\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
else if (fapi == "MR"){ // Mudanças recentes
api = api.getElementsByTagName("rc");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = (api[i].getAttribute("newlen")-api[i].getAttribute("oldlen"));
if (tamanho > 0) tamanho = "+" + tamanho;
var coment = api[i].getAttribute("comment").replace("/*", "→");
if (coment) coment = "(" + coment.replace("*/", ":") + ")";
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&diff=last\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
}
else if (fapi == "usu"){ // Informações do usuário
else if (fapi == "usu"){ // Informações do usuário
Linha 167: Linha 240:
+ "</font> | <a href=\""+wgServer+"/wiki/Especial:Contribui%C3%A7%C3%B5es/"+encodeURI(user)+"\">contribuições</a> | <a href=\""
+ "</font> | <a href=\""+wgServer+"/wiki/Especial:Contribui%C3%A7%C3%B5es/"+encodeURI(user)+"\">contribuições</a> | <a href=\""
+ wgServer+"/wiki/Especial:Registo/"+encodeURI(user)+"\">registros</a> | <a href=\""
+ wgServer+"/wiki/Especial:Registo/"+encodeURI(user)+"\">registros</a> | <a href=\""
+ wgServer+wgScript+"?title=Especial%3ARegisto\&type=block\&page=Usu%C3%A1rio%3A"+encodeURI(user)+"\">registros de bloqueio</a> | <span class=\"plainlinks\"><a href=\"http://toolserver.org/~river/cgi-bin/count_edits?user="+encodeURI(user)+"\&dbname=ptwiktionary_p\" class=\"external text\">contador de edições</a></span>";
+ wgServer+wgScript+"?title=Especial%3ARegisto\&type=block\&page=Usu%C3%A1rio%3A"+encodeURI(user)+"\">registros de bloqueio</a> | <span class=\"plainlinks\"><a href=\"http://toolserver.org/~river/cgi-bin/count_edits?user="+encodeURI(user)+"\&dbname=ptwiki_p\" class=\"external text\">contador de edições</a></span>";
}
}
}
}

Revisão das 23h35min de 13 de julho de 2010

//<pre>
 
if (wgNamespaceNumber == 2 || wgNamespaceNumber == 3) fbUser = (wgTitle.indexOf(wgUserName)  == 0) ? true : false;
else fbUser = false;
function fbLink(fbf, ltxt, ltit, lobs){ //Cria os links que ativam a função fb()
if (fbf == "ER") fbf = "obs=prompt(\"Se necessário, coloque uma observação.\");fb(\""+fbf+ltxt+"\",obs)";
else if (lobs) fbf = "obs=prompt(\""+lobs+"\");fb(\""+fbf+"\",obs)";
else fbf = "fb(\""+fbf+"\")";
return " <a onMouseOver='this.style.cursor=\"pointer\"' title='"+ltit+"' onClick='"+fbf+"'>"+ltxt+"</a> ";
}
/*** Menu [ER] ***/
var fbER = "Regra:"
fbER += "|" + fbLink("ER", "LX", "Lixo, puro vandalismo.");
fbER += "|" + fbLink("ER", "R1", "Redirecionamento desnecessário, indevido, quebrado e órfão.");
fbER += (wgNamespaceNumber == 0) ?  "|" + fbLink("ER", "T", "Título errado, inapropriado, mal formatado e/ou impróprio.") : "| T ";
fbER += (wgNamespaceNumber%2 == 1) ?  "|" + fbLink("ER", "R1", "Redirecionamento de página de discussão") : "| R2 ";
fbER += "|" + fbLink("ER", "IM", "Conteúdo impróprio que não atende aos critérios de inclusão.");
fbER += (wgNamespaceNumber == 14) ?  "|" + fbLink("ER", "C1", "Categoria vazia, desnecessária ou substituída.") : "| C1 ";
fbER += (wgNamespaceNumber == 10) ?  "|" + fbLink("ER", "P1", "Predefinição sem uso, desnecessária ou substituída.") : "| P1 ";
fbER += (wgNamespaceNumber == 1) ?  "|" + fbLink("ER", "D1", "Discussão de página inexistente.") : "| D1 ";
fbER += (wgNamespaceNumber%2 == 1) ?  "|" + fbLink("ER", "D2", "Discusão de histórico/conteúdo irrelevante e/ou inapropriado.") : "| D2 ";
fbER += "|" + fbLink("ER", "ER1", "Página de aparecimento recorrente já eliminada anteriormente, cujo conteúdo é igual ao eliminado por votação.)");
fbER += "|" + fbLink("ER", "ER2", "Conteúdo propagandista.");
fbER += (fbUser) ?  fbLink("ER", "U1", "Página ou subpágina do próprio proponente.") : " U1 ";
fbER += (wgNamespaceNumber == 0) ?  "|" + fbLink("ER", "U2", "Página de usuário que não existe.") : "| U2 ";
/*** Menu [manuteção] ***/
fbMan += "|" + fbLink("reciclagem", "reciclagem", "Página precisa ser reciclada de acordo com o livro de estilo.");
fbMan += "|" + fbLink("sem definição", "sem definição", "Verbete precisa de uma definição.");
fbMan += "|" + fbLink("Esboço", "esboço", "Verbete precisa ser ampliado, pois não contém todas as informações.");
fbMan += "|" + fbLink("fusão", "fusão", "Página duplicada, carece de fusão.", "Fusão com qual página?");
fbMan += "|" + fbLink("confirmar", "a confirmar", "Página com informação não confirmada, duvidosa.", "O que precisa ser confimado?");
fbMan += "|" + fbLink("?", "duvidoso", "Verbete com informação e/ou estrutura duvidosas.");
fbMan += "|" + fbLink("subst:VDA", "VDA", "Cópia/Violação de direito autoral.", "Informe o url da página copiada", "http://");
fbMan += "|" + fbLink("categoria incorreta", "cat incorreta", "Categoria com nome incorreto e que não deve ser usada.");
/*** Menu [aviso] ***/
fbAv += "|" + fbLink("subst:bem-vindo", "BV", "Bem-vindo ao Wikcionário");
fbAv = fbLink("subst:bem-vindo ip", "BV-IP", "Boas-vindas para usuário não registrado");
fbAv += "|" + fbLink("subst:aviso", "1º aviso", "Primeiro aviso sobre erro em verbete", "Aviso sobre qual verbete?");
fbAv += "|" + fbLink("subst:aviso2", "2º aviso", "Segundo aviso sobre erro em verbete", "Aviso sobre qual verbete?");
fbAv += "|" + fbLink("subst:cópia", "cópia", "Aviso sobre definição copiada de fonte externa/VDA", "Preencha usando \\\"|2=\\\" como separador: página do Wikcionário|2=url da página copiada");
fbAv += "|" + fbLink("subst:aviso-categoria", "não categorizou", "Aviso sobre falta de categorização em verbete editado", "Aviso sobre qual verbete?");
fbAv += "|" + fbLink("subst:aviso-assinatura", "av-ass", "Não assine os verbetes que edita…", "Em que verbete o usuário assinou?");
fbAv += "|" + fbLink("subst:ortografia", "ortografia", "Não mude a versão da língua");
fbAv += "|" + fbLink("subst:salvamento sucessivo", "salvamento sucessivo", "Não faça salvamentos sucessivos, utilize o botão\"Mostrar previsão\"", "Em que página o usuário fez salvamentos sucessivos?");
fbAv += "|" + fbLink("subst:voto", "voto", "Não possui ainda direito ao voto", "Em que página de votação o usuário votou?");
 
/** On load **/
addOnloadHook( function() {
var contentSub = document.getElementById("contentSub");
var fb1 = document.createElement ('div');
fb2 = document.createElement ('div');
contentSub.appendChild(fb1);
contentSub.appendChild(fb2);
if (wgAction=="view"||wgAction=="edit"){
fb2.innerHTML = "";
fb1.innerHTML = "[<a onMouseOver='this.style.cursor=\"default\"' onClick='fbabrir(fbER)'>ER</a>]";
if (wgNamespaceNumber==0||wgNamespaceNumber==102) {
fb1.innerHTML += " ["
 + fbLink("subst:apagar|1=<includeonly>{{subst:lc:{{subst:</includeonly>#time:j \"de\" F|+15 days}}}}", "PE", "Marcar para eliminação por votação")+"] [<a onMouseOver='this.style.cursor=\"default\"' onClick='fbabrir(fbMan)'>Manutenção</a>] [<a href=\"http://www.google.com/#hl="+wgUserLanguage+"\&q="+encodeURIComponent(wgTitle)+"\" style=\"color:#36b\">busca</a>]";
if (wgAction=="view") fbapi("afl");
}
if (wgNamespaceNumber==2 || wgNamespaceNumber==10) fb1.innerHTML += " ["+fbLink("subst:apagar", "PE", "Marcar para eliminação por votação")+"]";
if (wgNamespaceNumber==3) fb1.innerHTML += " [<a onMouseOver='this.style.cursor=\"default\"' onClick='fbabrir(fbAv)'>Aviso</a>]";
if (wgNamespaceNumber==2 || wgNamespaceNumber==3) fb1.innerHTML += " [<a onMouseOver='this.style.cursor=\"default\"' onClick='fbapi(\"usu\")'>sobre o usuário</a>]";
}
fb1.innerHTML += " [<a onMouseOver='this.style.cursor=\"default\"' title=\"Páginas vigiadas\" onClick='fbapi(\"PV\")'>PV</a>] [<a onMouseOver='this.style.cursor=\"default\"' title=\"Páginas novas não patrulhadas\" onClick='fbapi(\"PN\")'>PN</a>] [<a onMouseOver='this.style.cursor=\"default\"' title=\"Mudanças recentes (IPs, domínio principal)\" onClick='fbapi(\"MR\")'>MR</a>]";
if (wgAction=="edit"){
if (location.href.match("\&fastb=")){
fbsalve = true;
var fbedit = location.href.substr(location.href.indexOf("\&fastb=") + 7);
if (fbedit.match("\&fbtxt=")){
var fbtxt = fbedit.substr(fbedit.indexOf("\&fbtxt=") + 7)
fbedit = fbedit.substr(0, fbedit.indexOf("\&"));
fb(decodeURIComponent(fbedit),decodeURIComponent(fbtxt));
}
else fb(decodeURIComponent(fbedit));
}
else fbsalve = false;
}
else if (wgAction=="markpatrolled" && location.href.match("\&fastb=")) location.href = location.href.substring(0, location.href.indexOf("markpatrolled")) + "edit" + location.href.substring(location.href.indexOf("\&fastb="));
})
function fbabrir(menu){
fb2.innerHTML = menu;
}
function fb(fbedit,fbtxt){ // ** Função de edição **
if (fbtxt === null) return;
if (wgAction=="view" || wgAction=="markpatrolled"){
var pagina = (wgCanonicalNamespace) ? wgCanonicalNamespace+encodeURIComponent(":"+wgTitle) : encodeURIComponent(wgPageName); //para concertar bug em alguns navegadores
var action = "edit";
if (location.href.match("\&redirect=no\&rcid=")) action = "markpatrolled" + location.href.substr(location.href.indexOf("\&rcid="));
if (fbtxt) location.href = wgServer+wgScript+"?title="+pagina+"\&action="+action+"\&fastb="+encodeURIComponent(fbedit)+"\&fbtxt="+encodeURIComponent(fbtxt);
else location.href = wgServer+wgScript+"?title="+pagina+"\&action="+action+"\&fastb="+encodeURIComponent(fbedit);
}
else if (wgAction=="edit"){
var txt = document.getElementById("wpTextbox1").value;
var ufb = " (usando [[Wikcionário:Programas de computador/FastButtons|FastButtons]])";
if (txt.match(/\u007B\u007B(er|esr2)\u007C/i)) {
alert("Já existe uma predefinição de eliminação nesta página.");
return;
}
if (fbedit.indexOf("er") == 0){
if (fbtxt) fbtxt = "|3=" + fbtxt + "}}\n\n";
else var fbtxt = "}}\n\n";
fbtxt = "{{ER|" + fbedit.substr(2) + "|2=~~~~" + fbtxt;
document.getElementById("wpTextbox1").value = fbtxt + txt;
if (fbsalve) document.editform.wpSummary.value = "Página proposta para eliminação rápida (regra " + fbedit.substring(2) + ")" + ufb;
}
else{
if (fbedit == "subst:VDA") txt = fbtxt;
else txt = fbtxt + "\n\n" + txt;
document.getElementById("wpTextbox1").value = txt;
if (fbsalve) {
if (wgNamespaceNumber==3) fbsalve = "Adicionando aviso" + ufb;
else if (fbedit == "subst:VDA") fbsalve = "Página marcada como VDA" + ufb;
else if (fbedit == "apagar") fbsalve = "Página proposta para [[Wikcionário:Páginas para eliminar|eliminação por votação]]" + ufb;
else fbsalve = "Adicionando marcação" + ufb;
document.editform.wpSummary.value = fbsalve;
}
}
if (fbsalve) document.editform.submit();
}
}
/** Consulta o API da Wikipedia usando AJAX **/
function fbapi(fapi){
var fbajax = sajax_init_object();
if (!fbajax) return;
var url = wgServer+wgScriptPath+"/api.php?format=xml\&action=query\&";
if (fapi == "esb"){
var esb = document.getElementById("esbinput");
if (esbtxt == esb.value || esbtxt2 == esb.value) return;
esbtxt = esb.value;
if (esbtxt == esb.value.substr(0,(esb.value.length - 1))) return;
url += "list=allpages\&apnamespace=10\&aplimit=1\&apprefix="+encodeURI("Esboço-")+encodeURIComponent(esb.value);
}
else if (fapi == "afl") url += "list=backlinks\&bllimit=1\&blfilterredir=nonredirects\&blnamespace=0\&bltitle="+encodeURIComponent(wgPageName);
else if (fapi == "PV") url += "list=watchlist\&wlexcludeuser="+encodeURIComponent(wgUserName)+"\&wlprop=user|comment|title|sizes";
else if (fapi == "PN") url += "list=recentchanges\&rctype=new\&rcnamespace=0\&rcshow=!patrolled\&rcprop=user|comment|title|sizes|ids";
else if (fapi == "MR") url += "list=recentchanges\&rctype=edit\&rcnamespace=0&rcshow=anon\&rcprop=user|comment|title|sizes";
else if (fapi == "usu"){
var user = wgTitle;
if (user.match("/")) user = user.substring(0, user.indexOf("/"));
url += "list=allusers\&aulimit=1\&aufrom="+encodeURIComponent(user)+"\&auprop=editcount|registration";
}
fbajax.open('GET', url, true);
fbajax.send('');
fbajax.onreadystatechange = function () {
if (fbajax.readyState == 4 && fbajax.status == 200) {
var api = fbajax.responseXML;
/** Processamento da resposta do API **/
if (fapi == "afl"){ // Afluentes
var info = "(";
info += (document.getElementById("Refer.C3.AAncias") || document.getElementById("Notas_e_refer.C3.AAncias")) ? "ref" : "<font color=red>ref</font>";
var catline = document.getElementById("mw-normal-catlinks");
if (catline && catline.innerHTML.match("><a href=\"/wiki/")) info += " · cat";
else info += " · <font color=red>cat</font>";
info += (document.getElementById("p-lang")) ? " · iw" : " · <font color=red>iw</font>";
api = api.getElementsByTagName("bl");
if (api[0]) info += " · <a href=\""+wgServer+"/wiki/"+encodeURI("Especial:Páginas afluentes/"+wgPageName)+"\" title=\"afluentes\">afl</a>)";
else info += " · <font color=red>afl</font>)";
fb2.innerHTML = info;
}
else if (fapi == "esb"){ // Esboço temático
api = api.getElementsByTagName("p");
if (api) api = api[0].getAttribute("title").replace(/Predefinição:Esboço-/gi, "");
else return;
if ((esb.setSelectionRange||esb.createTextRange||typeof(esb.selectionStart) != 'undefined' && typeof(esb.selectionEnd) != 'undefined')
 && esb.value == api.substr(0,esb.value.length)){ // Exibe sugestões. Baseado no script do HotCat
var inicio = esb.value.length;
esb.value = api;
esbtxt2 = api;
if (esb.setSelectionRange) esb.setSelectionRange (inicio, api.length);
else if (esb.createTextRange){
var sel = esb.createTextRange();
sel.move ("character", inicio);
sel.moveEnd ("character", api.length - inicio);
sel.select();
}
else{
esb.selectionStart = inicio;
esb.selectionEnd = api.length;
}
}
}
else if (fapi == "PV"){ // Páginas vigiadas
api = api.getElementsByTagName("item");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = (api[i].getAttribute("newlen")-api[i].getAttribute("oldlen"));
if (tamanho > 0) tamanho = "+" + tamanho;
var coment = api[i].getAttribute("comment").replace("/*", "→");
if (coment) coment = "(" + coment.replace("*/", ":") + ")";
coment = coment.replace("[[Ajuda:Guia de edição/Menus e ferramentas/Sumário de edição|←]]", "");
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&diff=last\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
else if (fapi == "PN"){ // Páginas novas
api = api.getElementsByTagName("rc");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = "+" + api[i].getAttribute("newlen");
var coment = api[i].getAttribute("comment");
if (coment) coment = "(" + coment.replace("[[Ajuda:SEA|←]] ", "") + ")";
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&redirect=no\&rcid="+api[i].getAttribute("rcid")+"\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
else if (fapi == "MR"){ // Mudanças recentes
api = api.getElementsByTagName("rc");
var charnum = 0;
for (var i = 0; i < 10; i++){
var title = api[i].getAttribute("title");
charnum += title.length;
if (charnum > 180) break;
var tamanho = (api[i].getAttribute("newlen")-api[i].getAttribute("oldlen"));
if (tamanho > 0) tamanho = "+" + tamanho;
var coment = api[i].getAttribute("comment").replace("/*", "→");
if (coment) coment = "(" + coment.replace("*/", ":") + ")";
if (i == 0) var pages = "";
else pages += " |";
pages += " <a href=\""+wgServer+wgScript+"?title="+title+"\&diff=last\" title=\"("+tamanho+") "+api[i].getAttribute("user")+" "+coment+"\">"+title+"</a>";
}
fb2.innerHTML = pages;
}
else if (fapi == "usu"){ // Informações do usuário
api = api.getElementsByTagName("u");
var registro = api[0].getAttribute("registration");
registro = registro.substr(8,2) + "/" + registro.substr(5,2) + "/" + registro.substr(0,4);
fb2.innerHTML = "<font color=black>" + api[0].getAttribute("editcount") + "</font> edições desde <font color=black>" + registro
 + "</font> | <a href=\""+wgServer+"/wiki/Especial:Contribui%C3%A7%C3%B5es/"+encodeURI(user)+"\">contribuições</a> | <a href=\""
 + wgServer+"/wiki/Especial:Registo/"+encodeURI(user)+"\">registros</a> | <a href=\""
 + wgServer+wgScript+"?title=Especial%3ARegisto\&type=block\&page=Usu%C3%A1rio%3A"+encodeURI(user)+"\">registros de bloqueio</a> | <span class=\"plainlinks\"><a href=\"http://toolserver.org/~river/cgi-bin/count_edits?user="+encodeURI(user)+"\&dbname=ptwiki_p\" class=\"external text\">contador de edições</a></span>";
}
}
}
}
//</pre>