Hello,
I have added a simple banner using the Script Console. I can see the banner using IE and Chrome, but others do not see it.
Is there something I'm doing wrong? Does it take time to persist?
package com.onresolve.bitbucket.groovy.test.docs.webitems
import com.onresolve.licensing.DynamicModulesComponent
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl
def dynamicModulesComponent = ScriptRunnerImpl.getPluginComponent(DynamicModulesComponent.class)
def moduleName = "announcement-panel"
def writer = new StringWriter()
writer.write("""
<web-panel key='announcement-panel' location='bitbucket.notification.banner.header'>
<resource name='view' type='static'>
<![CDATA[
<div class='aui-banner aui-banner-error' role='banner' aria-hidden='false'>
<strong>NOTICE!</strong>: New Add-On available for testing.</div>
]]>
</resource>
</web-panel>
""")
dynamicModulesComponent.unregister(moduleName)
dynamicModulesComponent.register(writer)
Is there a better way to do an announcement banner?
Thanks,
Mary
Do you see the regular Bitbucket banners? For example the one that is displayed when there is a base url mismatch? If you don't then sounds like a problem on Atlassian's side as we use the same method as they do.
Are there any errors in the browser console when you view the page in for example Firefox?
Thanks for the guidance! In the end, it was an issue with the others' browsers not being correctly cleared.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries. Glad to hear a hard refresh sorted this out for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.