var h1Text = document.querySelector("h1").innerText;
document.getElementById("yourH1_element_Id").innerHTML = "yourTextHere";