I made a plugin with webresources MODULE as:
<web-resource key="MYplugin-resources" name="MYplugin Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="MYplugin.css" location="/css/MYplugin.css"/>
<resource type="download" name="MYplugin.js" location="/js/MYplugin.js"/>
<resource type="download" name="images/" location="/images"/>
<context>servicedesk.general</context>
<context>jira.general</context>
</web-resource>
Myplugin.js has following code:
var commentTabsSwapped = false;
setInterval(function(){ var tabs = jQuery("#sd-comment-tabs"); if (tabs.size() > 0) { commentTabsSwapped = jQuery(".js-sd-internal-comment").prev(".js-sd-external-comment").size() == 0; if(!commentTabsSwapped) { jQuery(".js-sd-internal-comment").after(jQuery(".js-sd-external-comment")); jQuery(".js-sd-internal-comment").switchClass("inactive", "active"); jQuery(".js-sd-external-comment").switchClass("active", "inactive"); } } else if (tabs.size() == 0) { commentTabsSwapped = false; } }, 100);
But I cannot see the change.