I have the following
<script>
AJS.toInit(function(){
var $banner = AJS.$('#announcement-banner');
var $header = AJS.$('#header');
$header.before($banner);
});
</script>
This should place the announcement banner above the header. However, it only seems to work on the system pages. In the past, I think it worked on every page, so I don't know if there is some sort of plugin affecting this, or if it is a change in Jira itself.
If I wrap the function in a timeout, then it will work. I've tried waiting until the header element appears, but it seems to be something else loading that is making the header override this. If I were to run this directly in the console then it would work to move the elements.
Jira Data Center 9.6.