Translate docs and helpers to English, add GPLv3

This commit is contained in:
Dasemu
2025-12-16 09:11:33 +01:00
parent 9e22454750
commit fa3281d2b3
3 changed files with 706 additions and 13 deletions

View File

@@ -1,27 +1,27 @@
// PlayerHidder.js
// Localizaión del div que contiene los iconos de los jugadores
// CSS selector that targets the div containing player icons
const selector = '#map-container > div > div:nth-child(2)';
// Oculta el div que contiene los iconos de los jugadores
// Hide the div that contains the player icons
function hideDiv() {
const targetDiv = document.querySelector(selector); // Selecciona el div usando el selector CSS
if (targetDiv) { // Verifica si el div existe
targetDiv.style.display = 'none'; // Cambia el estilo de display a 'none' para ocultarlo
const targetDiv = document.querySelector(selector); // Grab the div via the CSS selector
if (targetDiv) { // Ensure the element exists
targetDiv.style.display = 'none'; // Hide it
}
}
// Muestra el div que contiene los iconos de los jugadores
// Show the div that contains the player icons
function showDiv() {
const targetDiv = document.querySelector(selector); // Selecciona el div usando el selector CSS
if (targetDiv) { // Verifica si el div existe
targetDiv.style.display = ''; // Cambia el estilo de display a '' para mostrarlo
const targetDiv = document.querySelector(selector); // Grab the div via the CSS selector
if (targetDiv) { // Ensure the element exists
targetDiv.style.display = ''; // Reset display to show it
}
}
// Inicializa el script ocultando el div
// Hide the div on load
hideDiv();
// Exponer las funciones para que puedan ser llamadas desde el contexto global
window['abrete_sesamo'] = showDiv;
window['cierrate_sesamo'] = hideDiv;
// Expose helpers globally
window['open_sesame'] = showDiv;
window['close_sesame'] = hideDiv;