Correción de errores
This commit is contained in:
parent
3d25257089
commit
02e3ce0677
@ -1,24 +1,27 @@
|
|||||||
(function() {
|
// PlayerHidder.js
|
||||||
const selector = '#map-container > div > div:nth-child(1)';
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
let targetDiv = null;
|
const selector = '#map-container > div > div:nth-child(2)';
|
||||||
|
|
||||||
function hideDiv() {
|
function hideDiv() {
|
||||||
targetDiv = document.querySelector(selector);
|
const targetDiv = document.querySelector(selector);
|
||||||
|
console.log('hideDiv:', targetDiv);
|
||||||
if (targetDiv) {
|
if (targetDiv) {
|
||||||
targetDiv.style.display = 'none';
|
targetDiv.style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showDiv() {
|
function showDiv() {
|
||||||
|
const targetDiv = document.querySelector(selector);
|
||||||
|
console.log('showDiv:', targetDiv);
|
||||||
if (targetDiv) {
|
if (targetDiv) {
|
||||||
targetDiv.style.display = '';
|
targetDiv.style.display = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Oculta el div al cargar
|
||||||
hideDiv();
|
hideDiv();
|
||||||
|
|
||||||
|
// Expone funciones globales para mostrar/ocultar
|
||||||
window['abrete_sesamo'] = showDiv;
|
window['abrete_sesamo'] = showDiv;
|
||||||
window['cierrate_sesamo'] = hideDiv;
|
window['cierrate_sesamo'] = hideDiv;
|
||||||
})();
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user