Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Need help with injecting JS to change description in insight

Marek Hoffreiter April 19, 2022

Hey guys,

anyone has any experience with injecting JS via announcement banner to only certain parts of the application ? 

In my use case, I need to change the description in insight object Attach Files "screen". 

Screenshot_97.png

If there is any other/better way to do this, I am more than welcome in trying it out.

Thanks

Marek

 

1 answer

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

For something like this (not that this is best practice), I would use a public library like "arrive"

Then you can respond to the "arrival" of an object on screen with a line of code like:

AJS.$(document).arrive('#rlabs-attach-file .description', function(){
this.innerHTML = "Your custom description";
this.borderStyle = 'solid';
this.borderColor = 'red';
})

If you have scriptrunner, you can deploy arrive as a global resource, otherwise, there might not be any choice but to include the minified arrive into your announcement box (about 5k) - if that's even possible. 

Maybe there are better ways. Such as MutableObserver

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events