Correção
This commit is contained in:
1 parent
4ea12a106c
commit
e4a39a947c
2 files changed
+3
-7
No files matched your search
+2
-6
@@ -934,12 +934,8 @@ buscaRefInput.addEventListener('keydown', (event) => {
|
|||||||
if (event.key === 'Enter' || event.keyCode === 13) {
|
if (event.key === 'Enter' || event.keyCode === 13) {
|
||||||
event.preventDefault(); // Impede que o formulário seja enviado (se aplicável)
|
event.preventDefault(); // Impede que o formulário seja enviado (se aplicável)
|
||||||
|
|
||||||
if (modelo_antigo) {
|
if (typeof modelo_antigo !== 'undefined') {
|
||||||
modelo_referencia_antigo = Boolean(modelo_antigo.toLowerCase() === 'true');
|
modelo_referencia_antigo = Boolean(modelo_antigo && modelo_antigo.toLowerCase() === 'true');
|
||||||
}else {
|
|
||||||
console.error('A variável modelo_antigo não está definida.');
|
|
||||||
// Trate o caso quando modelo_antigo não está definido
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buscar_referencia(modelo_referencia_antigo);
|
buscar_referencia(modelo_referencia_antigo);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
var observer,elementosNaPagina=[];let ref_cap_busca={},modelo_referencia_antigo=!1;window.onload=e=>{const t=new Audio("https://js.livro.online/moan-quarto/Interruptor.mp3"),o=metadados.livroUrl,n=["#fff","antiquewhite","url('https://js.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://js.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"];let a=0;const r=document.querySelector("body"),l=document.getElementById("quarto-content"),i=document.querySelector(".page-navigation"),s=document.getElementById("quarto-sidebar"),c=document.getElementById("quarto-margin-sidebar"),d=document.querySelectorAll(".sidebar-item-container"),p=document.querySelectorAll("span.chapter-number"),m=document.getElementById("toc-title"),u=document.querySelector(".quarto-navbar-tools");let g=!1;const f=document.querySelector("#papel"),h=document.querySelector("main");var v=document.createElement("div");function y(e,t){const o=document.createElement("button"),n=document.createElement("img");return n.src=e,o.appendChild(n),o.addEventListener("click",(function(){t()})),o}v.id="moan-menu-texto";let _=document.querySelector("header");const E=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p")[0];function C(){let e=localStorage.getItem("livro.online@"+o+".config");let t=!1;t="default"!=localStorage.getItem("quarto-color-scheme");let r=JSON.parse(e);e&&(r[0]&&$(r[0]),r[1]&&(a=r[1],f.style.background=n[r[1]],g&&!t&&i&&(i.style.background=n[r[1]]),t&&f.style.removeProperty("background")),r[2]&&(g=r[2],g&&!t&&D()))}function b(e,t){let n=localStorage.getItem("livro.online@"+o+".config");if(n){let a,r=JSON.parse(n);switch(e){case"fonte":r[0]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"papel":r[1]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"luz_apagada":r[2]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a)}}else{let n,a=[];switch(e){case"fonte":a[0]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"papel":a[1]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"fundo":a[2]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n)}}}C();const S=document.createElement("script");S.src="https://js.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(S);const w=document.createElement("div");w.id="modal",w.className="modal",w.style.display="none";const L=document.createElement("div");L.className="modal-content";const q=document.createElement("span");q.className="close",q.innerHTML="×",q.style.fontSize="20px";const I=document.createElement("div"),z=document.createElement("p");z.innerHTML="<strong>Referência</strong>";const k=document.createElement("span");k.id="ref",I.appendChild(z),I.appendChild(k);const N=document.createElement("div"),x=document.createElement("p");x.innerHTML="<strong>Link</strong>";const P=document.createElement("span");P.id="link",N.appendChild(x),N.appendChild(P);const j=document.createElement("p");j.innerHTML="<strong>QR Code</strong>";const R=document.createElement("div");R.id="qrcode_container";const A=document.createElement("div"),H=document.createElement("p");H.innerHTML="<strong>Como Citar</strong>";const M=document.createElement("span");M.innerHTML=`Veja <a href='/${o}/#como-citar'>aqui</a> como citar este livro.`,A.appendChild(H),A.appendChild(M);const B=document.createElement("div"),T=document.createElement("p");T.innerHTML="<strong>Versão Impressa</strong>";const V=document.createElement("span");function $(e){let t=window.getComputedStyle(v,null).getPropertyValue("font-size"),o=window.getComputedStyle(_,null).getPropertyValue("font-size");if(void 0!==e)f.style.fontSize=`${e}px`,v.style.fontSize=t,_.style.fontSize=o;else{let e=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),n=parseInt(e[0])+2;f.style.fontSize=`${n}px`,v.style.fontSize=t,_.style.fontSize=o,b("fonte",n)}}function O(){l.classList.remove("luz_apagada"),i&&i.style.removeProperty("background"),s.style.removeProperty("color"),s.classList.remove("luz_apagada"),d.forEach((e=>{e.style.removeProperty("color")})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||e.style.removeProperty("color")})),c.style.removeProperty("color"),m&&m.style.removeProperty("color"),g=!1}function D(){l.classList.add("luz_apagada"),i&&(i.style.backgroundColor=n[a]),f.style.background=n[a],s.style.color="#fff",s.classList.add("luz_apagada"),d.forEach((e=>{e.style.color="#fff"})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||(e.style.color="#fff")})),c.style.color="#fff",m&&(m.style.color="#fff"),g=!0}V.innerHTML=`Veja <a href='/${o}/#versão-impressa'>aqui</a> onde comprar.`,B.appendChild(T),B.appendChild(V),L.appendChild(q),L.appendChild(I),L.appendChLine truncated
|
var observer,elementosNaPagina=[];let ref_cap_busca={},modelo_referencia_antigo=!1;window.onload=e=>{const t=new Audio("https://js.livro.online/moan-quarto/Interruptor.mp3"),o=metadados.livroUrl,n=["#fff","antiquewhite","url('https://js.livro.online/moan-quarto/olga-thelavart-HZm2XR0whdw-unsplash_P.jpg')","url('https://js.livro.online/moan-quarto/paper-g5d2cae661_1280_Pixabay_user_geralt.jpg')"];let a=0;const r=document.querySelector("body"),l=document.getElementById("quarto-content"),i=document.querySelector(".page-navigation"),s=document.getElementById("quarto-sidebar"),c=document.getElementById("quarto-margin-sidebar"),d=document.querySelectorAll(".sidebar-item-container"),p=document.querySelectorAll("span.chapter-number"),m=document.getElementById("toc-title"),u=document.querySelector(".quarto-navbar-tools");let g=!1;const f=document.querySelector("#papel"),h=document.querySelector("main");var v=document.createElement("div");function y(e,t){const o=document.createElement("button"),n=document.createElement("img");return n.src=e,o.appendChild(n),o.addEventListener("click",(function(){t()})),o}v.id="moan-menu-texto";let _=document.querySelector("header");const E=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p")[0];function C(){let e=localStorage.getItem("livro.online@"+o+".config");let t=!1;t="default"!=localStorage.getItem("quarto-color-scheme");let r=JSON.parse(e);e&&(r[0]&&$(r[0]),r[1]&&(a=r[1],f.style.background=n[r[1]],g&&!t&&i&&(i.style.background=n[r[1]]),t&&f.style.removeProperty("background")),r[2]&&(g=r[2],g&&!t&&D()))}function b(e,t){let n=localStorage.getItem("livro.online@"+o+".config");if(n){let a,r=JSON.parse(n);switch(e){case"fonte":r[0]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"papel":r[1]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a);break;case"luz_apagada":r[2]=t,a=JSON.stringify(r),localStorage.setItem("livro.online@"+o+".config",a)}}else{let n,a=[];switch(e){case"fonte":a[0]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"papel":a[1]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n);break;case"fundo":a[2]=t,n=JSON.stringify(a),localStorage.setItem("livro.online@"+o+".config",n)}}}C();const S=document.createElement("script");S.src="https://js.livro.online/bibliotecas_de_terceiros/qrcode.min.js",document.body.appendChild(S);const w=document.createElement("div");w.id="modal",w.className="modal",w.style.display="none";const L=document.createElement("div");L.className="modal-content";const q=document.createElement("span");q.className="close",q.innerHTML="×",q.style.fontSize="20px";const I=document.createElement("div"),z=document.createElement("p");z.innerHTML="<strong>Referência</strong>";const k=document.createElement("span");k.id="ref",I.appendChild(z),I.appendChild(k);const N=document.createElement("div"),x=document.createElement("p");x.innerHTML="<strong>Link</strong>";const P=document.createElement("span");P.id="link",N.appendChild(x),N.appendChild(P);const j=document.createElement("p");j.innerHTML="<strong>QR Code</strong>";const R=document.createElement("div");R.id="qrcode_container";const H=document.createElement("div"),M=document.createElement("p");M.innerHTML="<strong>Como Citar</strong>";const A=document.createElement("span");A.innerHTML=`Veja <a href='/${o}/#como-citar'>aqui</a> como citar este livro.`,H.appendChild(M),H.appendChild(A);const B=document.createElement("div"),T=document.createElement("p");T.innerHTML="<strong>Versão Impressa</strong>";const V=document.createElement("span");function $(e){let t=window.getComputedStyle(v,null).getPropertyValue("font-size"),o=window.getComputedStyle(_,null).getPropertyValue("font-size");if(void 0!==e)f.style.fontSize=`${e}px`,v.style.fontSize=t,_.style.fontSize=o;else{let e=window.getComputedStyle(f,null).getPropertyValue("font-size").split("p"),n=parseInt(e[0])+2;f.style.fontSize=`${n}px`,v.style.fontSize=t,_.style.fontSize=o,b("fonte",n)}}function O(){l.classList.remove("luz_apagada"),i&&i.style.removeProperty("background"),s.style.removeProperty("color"),s.classList.remove("luz_apagada"),d.forEach((e=>{e.style.removeProperty("color")})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||e.style.removeProperty("color")})),c.style.removeProperty("color"),m&&m.style.removeProperty("color"),g=!1}function D(){l.classList.add("luz_apagada"),i&&(i.style.backgroundColor=n[a]),f.style.background=n[a],s.style.color="#fff",s.classList.add("luz_apagada"),d.forEach((e=>{e.style.color="#fff"})),p.forEach((e=>{"H1"===e.parentNode.nodeName.toUpperCase()||e.parentNode.classList.contains("nav-page-text")||(e.style.color="#fff")})),c.style.color="#fff",m&&(m.style.color="#fff"),g=!0}V.innerHTML=`Veja <a href='/${o}/#versão-impressa'>aqui</a> onde comprar.`,B.appendChild(T),B.appendChild(V),L.appendChild(q),L.appendChild(I),L.appendChLine truncated
|
||||||
Reference in new issue
Block a user