2025-05-27 23:39:10 +02:00
|
|
|
// PlayerHidder.js
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
2025-05-27 23:58:00 +02:00
|
|
|
console.log('PlayerHidder.js loaded');
|
2025-05-27 23:39:10 +02:00
|
|
|
const selector = '#map-container > div > div:nth-child(2)';
|
2025-05-27 23:12:40 +02:00
|
|
|
|
|
|
|
|
function hideDiv() {
|
2025-05-27 23:39:10 +02:00
|
|
|
const targetDiv = document.querySelector(selector);
|
|
|
|
|
console.log('hideDiv:', targetDiv);
|
2025-05-27 23:12:40 +02:00
|
|
|
if (targetDiv) {
|
|
|
|
|
targetDiv.style.display = 'none';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showDiv() {
|
2025-05-27 23:39:10 +02:00
|
|
|
const targetDiv = document.querySelector(selector);
|
|
|
|
|
console.log('showDiv:', targetDiv);
|
2025-05-27 23:12:40 +02:00
|
|
|
if (targetDiv) {
|
|
|
|
|
targetDiv.style.display = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-27 23:39:10 +02:00
|
|
|
// Oculta el div al cargar
|
2025-05-27 23:12:40 +02:00
|
|
|
hideDiv();
|
|
|
|
|
|
2025-05-27 23:39:10 +02:00
|
|
|
// Expone funciones globales para mostrar/ocultar
|
2025-05-27 23:14:19 +02:00
|
|
|
window['abrete_sesamo'] = showDiv;
|
|
|
|
|
window['cierrate_sesamo'] = hideDiv;
|
2025-05-27 23:39:10 +02:00
|
|
|
});
|