Hiding element based on content
if (el.textContent.indexOf("office is closed" &gt; -1)) {
    el.style.display = "none";
}


Does this help?

Or if you know that hero-action is talking about Office, as in you are confirmed, then you can simply check for the word close rather than checking the whole string.