Anders Anders - 2 months ago 7
Javascript Question

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?

Answer

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");
Comments