Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

announcement banner customization

Hi there,


Is it possible to add a javascript function in the announcement banner?


I'd like to add a function that show a dialog box before exit browser.


(My goal is to "force" users log daily work on issues)



7 answers

1 accepted

0 votes
Answer accepted

Hi Fulvio,

sorry but on the cloud JIRA you can't add javascript to the announcement banner.

You can not put in place this requirement.


Hi Fulvio,


you can do that. You need just to add tag script within annoncement


jQuery().ready(function() {


Hope this helps,


That's too bad :(


Thanks for the help anyway :)

There are a lot of limitation using JIRA Cloud.

You're welcome,


Hi Fabio, 3 years later, is there any way for admins to include custom javascript in Jira Cloud, as you can in server? Is there any policy against add-ins that might allow this? I really think it should be at the organizations discretion to customize the UI this way, and not having that ability will make migration a challenge.

Hi @Chris M_ ,

unfortunately you can't do that.

Boo!  I would like to have the ability in cloud to change the background color of the announcement section to Red. We use this for IT outages so that when we get people creating a ticket they will know there currently is an outage that our IT support desk is working on. 

Is this possible in cloud? 

Hey Marc, you might appreciate the tools available with the Power Scripts for Jira add-in, particularly the SIL Panels and this Live Fields function lfExecuteJS - Power Scripts™ for Jira 4.0 - Confluence (

This kind of tool is going to be crucial to making any kind of transition from Server possible for many growing businesses.


Looking at the documentation closer, it looks like cloud support may not be in place for this yet (if at all possible). This is incredibly frustrating.

Hi Fabio,


I've tried the code you've posted, but I can still see the entire code :/


It seems javascript's not working properly on my Jira Cloud :(

Hmm, I've tried it with this code:


jQuery().ready(function(){ window.onbeforeunload = function (e) { e = e || window.event; // For IE and Firefox prior to version 4 if (e) { e.returnValue = 'Sure?'; } // For Safari return 'Sure?'; };


but it shows the entire code :/

Hi Fulvio,

if you try this code you can figure out that this approach works


alert("Script works");

I had not chance to test your script 



Hi Fabio,


not yet, I'm goin' to test it in a couple of hours :)



Thanks Fabio,


is this code going to work properly?


jQuery().ready(function(){ window.onbeforeunload = function (e) { e = e || window.event; // For IE and Firefox prior to version 4 if (e) { e.returnValue = 'Sure?'; } // For Safari return 'Sure?'; };
}); </script>


Maybe I should format the dialog in Jira style :/ 

Hi Fulvio,

did u test it?

Suggest an answer

Log in or Sign up to answer