| Server IP : / Your IP : 10.244.4.16 [ Web Server : nginx/1.25.3 System : Linux escuela-portal-app-54f56585bc-kst6g 5.15.0-1084-azure #93-Ubuntu SMP Sat Mar 15 14:12:29 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.2.13 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/app/public/js/ |
Upload File : |
var contrasteActivo = false;
document.addEventListener("keyup", detectTabKey);
function detectTabKey(e) {
if (e.keyCode == 9) {
var elementosTexto = document.querySelectorAll("p, span, h1, h2, h3, h4, h5, h6, a, li");
elementosTexto.forEach(function(elemento) {
if (document.getElementById("botoncontraste").classList.contains("active-barra-accesibilidad-govco")) {
document.getElementById("botoncontraste").classList.toggle("active-barra-accesibilidad-govco");
}
if (document.getElementById("botonaumentar").classList.contains("active-barra-accesibilidad-govco")) {
document.getElementById("botonaumentar").classList.toggle("active-barra-accesibilidad-govco");
}
if (document.getElementById("botondisminuir").classList.contains("active-barra-accesibilidad-govco")) {
document.getElementById("botondisminuir").classList.toggle("active-barra-accesibilidad-govco");
}
});
}
}
function cambiarContexto() {
var botoncontraste = document.getElementById("botoncontraste");
var botonaumentar = document.getElementById("botonaumentar");
var botondisminuir = document.getElementById("botondisminuir");
if (contrasteActivo) {
botoncontraste.classList.remove("active-barra-accesibilidad-govco");
botondisminuir.classList.remove("active-barra-accesibilidad-govco");
botonaumentar.classList.remove("active-barra-accesibilidad-govco");
document.getElementById("titleaumentar").style.display = "";
document.getElementById("titledisminuir").style.display = "";
document.getElementById("titlecontraste").style.display = "";
var elementos = document.querySelectorAll('body *, section *');
elementos.forEach(function(elemento) {
elemento.style.backgroundColor = '';
elemento.style.color = '';
});
contrasteActivo = false;
} else {
botoncontraste.classList.add("active-barra-accesibilidad-govco");
botondisminuir.classList.remove("active-barra-accesibilidad-govco");
botonaumentar.classList.remove("active-barra-accesibilidad-govco");
document.getElementById("titleaumentar").style.display = "";
document.getElementById("titledisminuir").style.display = "";
document.getElementById("titlecontraste").style.display = "none";
var elementos = document.querySelectorAll('body *, section *');
elementos.forEach(function(elemento) {
elemento.style.backgroundColor = 'black';
elemento.style.color = 'white';
});
contrasteActivo = true;
}
}
function disminuirTamanio(operador) {
var botoncontraste = document.getElementById("botoncontraste");
var botonaumentar = document.getElementById("botonaumentar");
var botondisminuir = document.getElementById("botondisminuir");
if (!botondisminuir.classList.contains("active-barra-accesibilidad-govco")) {
botondisminuir.classList.toggle("active-barra-accesibilidad-govco");
document.getElementById("titleaumentar").style.display = "";
document.getElementById("titledisminuir").style.display = "none";
document.getElementById("titlecontraste").style.display = "";
}
if (botonaumentar.classList.contains("active-barra-accesibilidad-govco")) {
botonaumentar.classList.remove("active-barra-accesibilidad-govco");
}
if (botoncontraste.classList.contains("active-barra-accesibilidad-govco")) {
botoncontraste.classList.remove("active-barra-accesibilidad-govco");
contrasteActivo = false;
}
var elementosTexto = document.querySelectorAll("p, span, h1, h2, h3, h4, h5, h6, a, li");
elementosTexto.forEach(function(element) {
const total = tamanioElemento(element);
const nuevoTamanio = (operador === 'aumentar' ? (total + 1) : (total - 1)) + 'px';
element.style.fontSize = nuevoTamanio
});
}
function aumentarTamanio(operador) {
var botoncontraste = document.getElementById("botoncontraste");
var botonaumentar = document.getElementById("botonaumentar");
var botondisminuir = document.getElementById("botondisminuir");
if (!botonaumentar.classList.contains("active-barra-accesibilidad-govco")) {
botonaumentar.classList.toggle("active-barra-accesibilidad-govco");
document.getElementById("titleaumentar").style.display = "none";
document.getElementById("titledisminuir").style.display = "";
document.getElementById("titlecontraste").style.display = "";
}
if (botondisminuir.classList.contains("active-barra-accesibilidad-govco")) {
botondisminuir.classList.remove("active-barra-accesibilidad-govco");
}
if (botoncontraste.classList.contains("active-barra-accesibilidad-govco")) {
botoncontraste.classList.remove("active-barra-accesibilidad-govco");
contrasteActivo = false;
}
var elementosTexto = document.querySelectorAll("p, span, h1, h2, h3, h4, h5, h6, a, li");
elementosTexto.forEach(function(element) {
const total = tamanioElemento(element);
if (total <= 64) {
const nuevoTamanio = (operador === 'aumentar' ? (total + 1) : (total - 1)) + 'px';
element.style.fontSize = nuevoTamanio
}
});
}
function tamanioElemento(element) {
const tamanioParrafo = window.getComputedStyle(element, null).getPropertyValue('font-size');
return parseFloat(tamanioParrafo);
}