I've added resources folder in setenv.sh.
Then added web panel with condition
jiraHelper.project.key in ('someProjectKey')And then I installed web resources for my web panel to hide collapse button
AJS.$(document).ready(function() {
console.log("Try to hide");
var el = document.querySelector("button.aui-button.toggle-title");
document.querySelector('button.aui-button.toggle-title[aria-label="Label Text:"]').style.visibility = "hidden";
});with context
jira.view.issue
it works!
But question is will all users get this js from jira server? I mean if someone is viewing the page in project not equal 'someProjectKey' where even no web panel that I added, will he anyway get the js from web resources? May be there is some way not to send this js if issue not in someProjectKey?