XF 1.5 How to make a JS widget display in XF1?

Alpha1

Well-known member
I would like to make this JavaScript widget display at the top of specific xenforo forums:
Code:
<div class="ja-gadget-virtual-assistant-inline cleanslate">
<link rel="stylesheet" href="https://components.justanswer.com/css/ja-gadget-virtual-assistant-inline" />
<script type="text/javascript" src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline"></script>
<script type="text/javascript">
(function(){
require("ja-gadget-virtual-assistant-inline")(
(function() { var scripts = document.querySelectorAll('script[src="https://components.justanswer.com/js/ja-gadget-virtual-assistant-config,ja-gadget-virtual-assistant-inline"]'); return scripts[scripts.length - 1].parentNode })(),
require("ja-gadget-virtual-assistant-config")({"partner":"US","affiliateId":"ho|7414|1490","profile":"medical","settings":"default","size":"default - 300x250","showCopyright":false,"trackingPixels":{"transition":"https://trk.justanswer.com/aff_c?offer_id=2&aff_id=7414&file_id=1490"}})
).initialize();
})();
</script>
</div><img src="https://trk.justanswer.com/aff_i?offer_id=2&aff_id=7414&file_id=1490" width="1" height="1" />
However, this will not display in the correct location. The function is shown at the left bottom of the page instead and without CSS. The company that offers the widget is not familiar with XenForo.

Does anyone have an idea how to go about this?
 
What are you doing to add it? via widgetframework or template edit? Which template?

Your code is referring to css which must also be copied, and put into your extra.css template
 
Top Bottom