Is there a way to change the colors of the statuses with javascript inserted into the announcement banner? I've tried experimenting, but can't seem to get anything to work.
<style>
.red-status {
background-color: #fed5d9;
color: #7b0b1d;
}
.yellow-status {
background-color: #fff5c9;
color: #8d6500;
}
</style>
<script type="text/javascript">
document.querySelectorAll('span.jira-issue-status-lozenge').forEach(i => {
i.textContent.indexOf("Hold") !== -1 ?
i.classList.add('yellow-status') :
i.innerText.indexOf("Awaiting Customer Response") !== -1 ?
i.classList.add('yellow-status') :
i.innerText.indexOf("Pending to") !== -1 ?
i.classList.add('yellow-status') :
i.innerText.indexOf("Ready at FA") !== -1 ?
i.classList.add('red-status') :
i.innerText.indexOf("Customer Reopened") !== -1 ?
i.classList.add('red-status') :
null;
});
</script>
Not sure if this is possible or maybe I just have the wrong class selector(s)?