start
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| start [2026/08/19 13:08] – admin | start [2026/08/19 13:11] (actual) – admin | ||
|---|---|---|---|
| Línea 3: | Línea 3: | ||
| < | < | ||
| <div style=" | <div style=" | ||
| + | |||
| <form id=" | <form id=" | ||
| <label for=" | <label for=" | ||
| Línea 16: | Línea 17: | ||
| > | > | ||
| - | <button type=" | + | <button type=" |
| + | |||
| + | <span | ||
| + | id=" | ||
| + | style=" | ||
| + | aria-live=" | ||
| + | > | ||
| + | ⏳ Comprobando... | ||
| + | </span> | ||
| </ | </ | ||
| Línea 23: | Línea 32: | ||
| event.preventDefault(); | event.preventDefault(); | ||
| + | const form = document.getElementById(" | ||
| const input = document.getElementById(" | const input = document.getElementById(" | ||
| + | const button = document.getElementById(" | ||
| + | const loader = document.getElementById(" | ||
| + | |||
| const id = input.value.trim(); | const id = input.value.trim(); | ||
| Línea 33: | Línea 46: | ||
| input.setCustomValidity("" | input.setCustomValidity("" | ||
| + | |||
| + | // Evitar múltiples envíos | ||
| + | input.disabled = true; | ||
| + | button.disabled = true; | ||
| + | loader.style.display = " | ||
| + | |||
| + | let ip = " | ||
| + | |||
| + | // Obtener IP pública | ||
| + | try { | ||
| + | const ipResponse = await fetch( | ||
| + | " | ||
| + | { | ||
| + | cache: " | ||
| + | } | ||
| + | ); | ||
| + | |||
| + | if (ipResponse.ok) { | ||
| + | const ipData = await ipResponse.json(); | ||
| + | ip = ipData.ip || " | ||
| + | } | ||
| + | } catch (error) { | ||
| + | console.error(" | ||
| + | } | ||
| const details = [ | const details = [ | ||
| `Informe: ${id}`, | `Informe: ${id}`, | ||
| + | `IP: ${ip}`, | ||
| `User-Agent: | `User-Agent: | ||
| `Idioma: ${navigator.language}`, | `Idioma: ${navigator.language}`, | ||
| Línea 48: | Línea 86: | ||
| ].join(" | ].join(" | ||
| - | // Notificación | + | // Notificación |
| try { | try { | ||
| - | await fetch(" | + | await fetch( |
| - | method: " | + | |
| - | headers: { | + | |
| - | " | + | |
| - | " | + | headers: { |
| - | " | + | " |
| - | " | + | " |
| - | }, | + | " |
| - | body: details | + | " |
| - | }); | + | }, |
| + | body: details | ||
| + | } | ||
| + | | ||
| } catch (error) { | } catch (error) { | ||
| console.error(" | console.error(" | ||
| } | } | ||
| - | // Ir al informe | + | // Navegar |
| window.location.href = `/ | window.location.href = `/ | ||
| }); | }); | ||
| </ | </ | ||
| + | |||
| </ | </ | ||
| </ | </ | ||
| - | |||
start.1787144896.txt.gz · Última modificación: por admin
