Anders
Anders

Reputation: 6218

Appending JavaScript to all pages in JIRA

I'm trying to append two JavaScript files to all pages in JIRA, following this guide.

However, this only works on the Dashboard page when you login, not on other pages.

Does anyone have a clue why it does not work?

Upvotes: 2

Views: 955

Answers (2)

Oleksii Dz
Oleksii Dz

Reputation: 71

There is more easiest way to add javascript shared everywhere in jira.

  1. Open Jira Administration - System
  2. on the left side find USER INTERFACE section
  3. click Announcement Banner

or just simple push . (dot) and write Announcement Banner, push Enter button.

Upvotes: 0

sereda
sereda

Reputation: 1670

You can do that with a plugin:

  1. Define web resource module that will list your .js files you want included.
  2. Define servlet filter module and use URL pattern to specify which pages you'd like to intercept.
  3. In the servlet filter class, use web resource manager to require your web resource module: ComponentManager.getComponentInstanceOfType(WebResourceManager.class) .requireResource("com.whatever.plugin:my-resource");

Upvotes: 6

Related Questions