Hi all,
I am trying to modify the embedded code for the widget to allow it to open automatically when someone loads the page, vs. having the user click the "?" logo to open up the widget. Any insight on what the code should be?
OG code:
<script data-jsd-embedded data-key="xx" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
Hello Anthony,
Welcome to Atlassian Community!
It's possible to make the widget to open automatically when accessing a page.
We tested here and the following code works correctly:
<script add your widget script here </script>
<script type="text/javascript">
setTimeout(()=>{
//gets the iframe on which the widget is embedded
let iframe = document.querySelector('#jsd-widget');
//gets the content of the iframe
let iframeContent = iframe.contentDocument;
//gets button which opens the widget
button = iframeContent.querySelector('#help-button');
button.click();
}, 1000)
</script>
Please, give it a try and let us know how it goes.
Regards,
Angélica
This worked beautifully! Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.