I've used code from this site: https://www.enjoysharepoint.com/display-warning-message-in-sharepoint-site-using-powershell/ to create a banner in sharepoint 2013. It works fine, but every time I move around sharepoint libraries etc, the banner duplicates. If the page refreshes, it goes back to one banner. There's a comment on that article with a fix, but if I replace the existing code with it, it stops working. Any idea how i can stop the duplication of banners?