Jump to content

How could I include the following script in Unigui?


d.bernaert

Recommended Posts

Hi,

I would like to add a help button to the main form of my application that gives access to the knowledge base.

This is the script that should be included:

<script>
    window.fwSettings={
    'widget_id':80000001814
    };
    !function(){if("function"!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}()
</script>
<script type='text/javascript' src='https://euc-widget.freshworks.com/widgets/80000001814.js' async defer></script>

I tried adding https://euc-widget.freshworks.com/widgets/80000001814.js to CustomFiles in the servermodule and added

window.fwSettings={
    'widget_id':80000001814
    };
    !function(){if("function"!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}()

to the script of the mainform but that does not seem to work.

 

Link to comment
Share on other sites

Hi,

Try to add only this script, for example

MainForm -> Script:

Ext.onReady(function() {
    window.fwSettings = {
        'widget_id': 80000001814
    };

    ! function() {
        if ("function" != typeof window.FreshworksWidget) {
            var n = function() {
                n.q.push(arguments)
            };
            n.q = [], window.FreshworksWidget = n
        }
    }();

    var s = document.createElement("script");
    s.type = "text/javascript";
    s.src = "https://euc-widget.freshworks.com/widgets/80000001814.js";
    $("head").append(s);
});

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...