Correcao de links
This commit is contained in:
parent
52873c8724
commit
3436336d29
@ -292,7 +292,7 @@ window.onload = (event) => {
|
|||||||
const citarDivLabel = document.createElement("p");
|
const citarDivLabel = document.createElement("p");
|
||||||
citarDivLabel.innerHTML = "<strong>Como Citar</strong>";
|
citarDivLabel.innerHTML = "<strong>Como Citar</strong>";
|
||||||
const citarDivSpan = document.createElement("span");
|
const citarDivSpan = document.createElement("span");
|
||||||
citarDivSpan.innerHTML = "Veja <a href='/index.html#como-citar'>aqui</a> como citar este livro.";
|
citarDivSpan.innerHTML = `Veja <a href='{/${livroUrl}/#como-citar'>aqui</a> como citar este livro.`;
|
||||||
citarDiv.appendChild(citarDivLabel);
|
citarDiv.appendChild(citarDivLabel);
|
||||||
citarDiv.appendChild(citarDivSpan);
|
citarDiv.appendChild(citarDivSpan);
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ window.onload = (event) => {
|
|||||||
const postosDeVendaDivLabel = document.createElement("p");
|
const postosDeVendaDivLabel = document.createElement("p");
|
||||||
postosDeVendaDivLabel.innerHTML = "<strong>Versão Impressa</strong>";
|
postosDeVendaDivLabel.innerHTML = "<strong>Versão Impressa</strong>";
|
||||||
const postosDeVendaDivSpan = document.createElement("span");
|
const postosDeVendaDivSpan = document.createElement("span");
|
||||||
postosDeVendaDivSpan.innerHTML = "Veja <a href='/index.html#versão-impressa'>aqui</a> onde comprar.";
|
postosDeVendaDivSpan.innerHTML = `Veja <a href='{/${livroUrl}/#versão-impressa'>aqui</a> onde comprar.`;
|
||||||
postosDeVendaDiv.appendChild(postosDeVendaDivLabel);
|
postosDeVendaDiv.appendChild(postosDeVendaDivLabel);
|
||||||
postosDeVendaDiv.appendChild(postosDeVendaDivSpan);
|
postosDeVendaDiv.appendChild(postosDeVendaDivSpan);
|
||||||
|
|
||||||
@ -861,7 +861,7 @@ function gerenciarPaginacao (entradas) {
|
|||||||
// Use a função fetch para buscar o arquivo JSON com as referencias do capitulo para usar na busca por referencia
|
// Use a função fetch para buscar o arquivo JSON com as referencias do capitulo para usar na busca por referencia
|
||||||
buscaRefInput.addEventListener('focus', () => {
|
buscaRefInput.addEventListener('focus', () => {
|
||||||
// Quando o campo de entrada obtiver o foco, execute o fetch
|
// Quando o campo de entrada obtiver o foco, execute o fetch
|
||||||
fetch('ref_capitulos.json')
|
fetch('/'+livroUrl+'/ref_capitulos.json')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Não foi possível carregar o arquivo JSON.');
|
throw new Error('Não foi possível carregar o arquivo JSON.');
|
||||||
@ -906,7 +906,7 @@ function buscar_referencia(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const caminho_a_seguir = '/' + urlCap + '#' + ref_maiuscula;
|
const caminho_a_seguir = '/'+livroUrl+'/' + urlCap + '#' + ref_maiuscula;
|
||||||
|
|
||||||
window.location.href = caminho_a_seguir;
|
window.location.href = caminho_a_seguir;
|
||||||
|
|
||||||
@ -1111,7 +1111,7 @@ document.querySelector(".close").addEventListener("click", function() {
|
|||||||
// Use uma expressão regular para verificar se a chave não contém "não disponível"
|
// Use uma expressão regular para verificar se a chave não contém "não disponível"
|
||||||
const regex_1 = /Ainda não disponível/i; // O "i" torna a expressão regular case-insensitive
|
const regex_1 = /Ainda não disponível/i; // O "i" torna a expressão regular case-insensitive
|
||||||
|
|
||||||
fetch("/postos-de-venda.json")
|
fetch('/'+livroUrl+"/postos-de-venda.json")
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
// Verifique se o JSON não contém a chave "Ainda não disponível"
|
// Verifique se o JSON não contém a chave "Ainda não disponível"
|
||||||
|
2
leitor-web.min.js
vendored
2
leitor-web.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user