Pokélog Explorer
Nesta página, o jogador pode consultar as recompensas de cada etapa do Pokélog, organizadas por Pokémon. É possível filtrar a lista por Elemento ou buscar um nome específico clicando no botão Nome. Abaixo estão as legendas dos ícones presentes nas recompensas:
| Ícone | Descrição |
|---|---|
| Adquirida ao completar determinado estágio do Pokélog. | |
| Podem ser trocadas por alguns itens. | |
| Usados para liberar runas lendárias. |
| Veja mais: Pokélog |
';
for (let i = 0; i
`;
}
html += "";
where.innerHTML = html;
}
function loadingGif(where) {
where.innerHTML = `
Nenhum resultado.
';
return;
}
// Pode usar skeleton(where) se quiser, ou loadingGif(where)
loadingGif(where);
const container = document.createElement("div");
container.className = "image-container";
let loadedCount = 0;
results.forEach((r) => {
const item = document.createElement("div");
item.className = "image-item";
item.setAttribute("data-nome", r.nome);
item.tabIndex = 0;
const link = document.createElement("a");
link.className = "poke-clickable";
link.setAttribute("data-nome", r.nome);
const img = new Image();
img.src = generateWikiImageUrl(r.foto);
img.alt = r.nome;
img.title = r.nome;
img.className = "poke-img";
img.onload = img.onerror = () => {
loadedCount++;
if (
loadedCount === results.length &&
searchId === currentSearchId
) {
// Quando todas as imagens carregarem (ou erro), renderiza tudo
where.innerHTML = "";
where.appendChild(container);
adicionaEventos();
}
};
link.appendChild(img);
link.appendChild(document.createElement("span")).className =
"poke-name";
link.lastChild.textContent = r.nome;
item.appendChild(link);
const classContainer = document.createElement("div");
classContainer.className = "class-container";
r.elemento.split(",").forEach((e) => {
const elImg = document.createElement("img");
elImg.src = getElementIconUrl(e);
elImg.className = "element-tag-img";
elImg.title = e;
elImg.alt = e;
classContainer.appendChild(elImg);
});
item.appendChild(classContainer);
container.appendChild(item);
});
function adicionaEventos() {
where
.querySelectorAll(".poke-clickable, .image-item")
.forEach((btn) => {
btn.onclick = function () {
let card = this.closest(".image-item") || this;
let nome =
card.getAttribute("data-nome") ||
this.getAttribute("data-nome");
mostraInfoUsuarioComSkeleton(nome);
};
btn.onkeypress = function (e) {
if (e.key === "Enter" || e.key === " ") {
let card = this.closest(".image-item") || this;
let nome =
card.getAttribute("data-nome") ||
this.getAttribute("data-nome");
mostraInfoUsuarioComSkeleton(nome);
}
};
});
}
where
.querySelectorAll(".poke-clickable, .image-item")
.forEach((btn) => {
btn.onclick = function (e) {
let card = this.closest(".image-item") || this;
let nome =
card.getAttribute("data-nome") ||
this.getAttribute("data-nome");
mostraInfoUsuarioComSkeleton(nome);
};
btn.onkeypress = function (e) {
if (e.key === "Enter" || e.key === " ") {
let card = this.closest(".image-item") || this;
let nome =
card.getAttribute("data-nome") ||
this.getAttribute("data-nome");
mostraInfoUsuarioComSkeleton(nome);
}
};
});
}
function debounce(func, delay) {
let timer;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => func.apply(this, args), delay);
};
}
function formatNumber(n) {
if (typeof n === "number") return n.toLocaleString("pt-BR");
if (typeof n === "string" && /^\d+$/.test(n))
return parseInt(n).toLocaleString("pt-BR");
return n;
}
// Exibe skeleton e depois mostra info detalhada
function mostraInfoUsuarioComSkeleton(nome) {
const pessoa = DATA.find((d) => d.nome === nome);
const estagios = pessoa.estagios || [];
const infoDiv = widget.querySelector("#usuario-info");
widget.querySelector("#busca-radio-row").style.display = "none";
widget.querySelector("#busca-filtros").style.display = "none";
widget.querySelector("#busca-resultados").style.display = "none";
skeletonInfoUsuario(infoDiv);
setTimeout(function () {
infoDiv.innerHTML = `
${pessoa.elemento
.split(",")
.map(
(e) =>
`
`
)
.join("")}
${
pessoa.nome
}
| 1º Estágio | 2º Estágio | 3º Estágio | |
|---|---|---|---|
| Kills | ${ estagios[0] ? estagios[0].qtd : "" } | ${ estagios[1] ? estagios[1].qtd : "" } | ${ estagios[2] ? estagios[2].qtd : "" } |
| Recompensas | |||
|
|
${ estagios[0] ? estagios[0].research : "" } | ${ estagios[1] ? estagios[1].research : "" } | ${ estagios[2] ? estagios[2].research : "" } |
|
|
${ estagios[0] ? estagios[0].pokelog : "" } | ${ estagios[1] ? estagios[1].pokelog : "" } | ${ estagios[2] ? estagios[2].pokelog : "" } |
|
|
${
estagios[0]
? estagios[0].exp === 0
? ` `
: formatNumber(estagios[0].exp)
: ""
}
|
${
estagios[1]
? estagios[1].exp === 0
? ` `
: formatNumber(estagios[1].exp)
: ""
}
|
${
estagios[2]
? estagios[2].exp === 0
? ` `
: formatNumber(estagios[2].exp)
: ""
}
|
`
: formatNumber(estagios[0].exp)
: ""
}