function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adrian SameliAdrian Sameli 

3rd party support button integration (external JS source in Lightning)

Hi all

I would like to offer my team quick support using the Jira software instead of Salesforce cases. The easiest way would be to inject a tiny button (via script).

I understand that it is not possible to directly inject a 3rd party JS library into the lightning experience. Is it possible to embed and execute the following code? (or do you have another way to embed a 3rd party support button)

<script data-jsd-embedded data-key="###" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
Lokesh KumarLokesh Kumar
To reference a JavaScript library, upload it as a static resource and use a <ltng:require> tag in your .cmp or .app markup

You can’t use a <script> tag in a component. This restriction mitigates the risk of cross-site scripting attacks. You can add a <script> tag to an application’s template, which is a special type of component that extends aura: template.

Reference: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_libs_platform.htm 
Adrian SameliAdrian Sameli
Thank you very much for this information. I was able to upload the static resource and embed it through an aura component. Now, if you look at my example, you can see that the script tag requires certain parameters in order to launch properly. Do you know a way to make this happen? I didn't find anything in the documentation.