Created
August 18, 2026 21:15
-
-
Save alelazcano/4517764863ab40dccf1a331311244580 to your computer and use it in GitHub Desktop.
copiar-nombre-en-pagina-de-gracias.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| document.addEventListener("DOMContentLoaded", function () { | |
| const params = new URLSearchParams(window.location.search); | |
| const nombre = params.get("c_name") || ""; | |
| const transaction = params.get("transaction") || ""; | |
| function fillForm() { | |
| const saludo = document.querySelector("#text-8683d492"); | |
| const campoTransaction = document.querySelector('[name="last_transaction_id"]'); | |
| if (saludo) { | |
| saludo.textContent = nombre ? "Hola " + nombre : "Hola"; | |
| console.log("[Hotmart Debug] Saludo actualizado:", saludo.textContent); | |
| } | |
| if (campoTransaction) { | |
| campoTransaction.readOnly = true; | |
| campoTransaction.value = transaction; | |
| console.log("[Hotmart Debug] Transaction ID actualizado:", campoTransaction.value); | |
| } | |
| } | |
| fillForm(); | |
| /* redundancia - volvemos a intentar completar los campos */ | |
| setTimeout(function () { | |
| fillForm(); | |
| }, 1000); | |
| }); | |
| </script> | |
| <style> | |
| /* ocultamos el campo */ | |
| [name="last_transaction_id"] {display:none;} | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment