Correción de errores

This commit is contained in:
Dario Sevilla Muñoz 2025-05-27 23:39:10 +02:00
parent 3d25257089
commit 02e3ce0677

View File

@ -1,24 +1,27 @@
(function() {
const selector = '#map-container > div > div:nth-child(1)';
let targetDiv = null;
// PlayerHidder.js
document.addEventListener('DOMContentLoaded', function() {
const selector = '#map-container > div > div:nth-child(2)';
function hideDiv() {
targetDiv = document.querySelector(selector);
const targetDiv = document.querySelector(selector);
console.log('hideDiv:', targetDiv);
if (targetDiv) {
targetDiv.style.display = 'none';
}
}
function showDiv() {
const targetDiv = document.querySelector(selector);
console.log('showDiv:', targetDiv);
if (targetDiv) {
targetDiv.style.display = '';
}
}
// Oculta el div al cargar
hideDiv();
// Expone funciones globales para mostrar/ocultar
window['abrete_sesamo'] = showDiv;
window['cierrate_sesamo'] = hideDiv;
})();
});