function changeCartText() { document.querySelector(".empty-message a").textContent = "Go Back" } window.onload = function() { if ( document.body.classList.contains( "has-cart" ) ) { changeCartText(); } }