document.addEventListener("DOMContentLoaded", function () { // Wait for the page to load setTimeout(function () { // Create a new button element var button = document.createElement("button"); button.innerText = "Click Me"; // Change text as needed button.classList.add("custom-button"); // Find the header where you want to add the button var header = document.querySelector(".cover__header"); if (header) { header.appendChild(button); // Add button to header console.log("Button added successfully!"); } else { console.error("Header not found!"); } }, 500); // Adding delay to ensure the element is available });