How to get the Jira Base URL from Javascript in a reliable way?


#1

Hi,

AJS.params.baseURL returns undefined (Jira 7.6.1)

Is there any way to get the Jira base url from Javascript. I mean a way that really works,

Thanks in advance,
Pablo.


#2

You can always use AJS.contextPath() to get the context path - then you can combine that with the various window.location objects.


#3

I used it before, but URL must be absolute in gadgets, otherwise, they do not work from other products.

I.e: A Jira gadget added to a Confluence pageā€¦