How to clear console log from min.js and min.css files

Hi
To initiate the web chat widget I transferred CDN links to local files for these cxbus.min.js, widgets.min.js, and widgets.min.css. Now I want to remove the logs in these local files without disturbing the functionality and styling...

Here is the screenshot of console logs from my local .css & .js files

Please help me out on this

Hello,

In your widget configuration, make sure to set debug to false.

window._genesys = {
    widgets = {
        main: {
            debug: false,
            ...
        },
        webchat: {
            ...
        }
    }
};

In your widget's code snippet, make sure to set debug to false:
... onload="javascript:CXBus.configure({debug:false,pluginsPath ...

Regards,

Thank you above issue resolved but facing other one

May I know what to do ?

Hello,

I am not familiar with cx-app.js plugin file. You have an error there when it is invoked/loaded.

Are you using an old version of the widgets libraries (which version)?
Is this a version you have repackaged/modified?
You are not sharing how you load your widgets libraries, what you are defining in your widgets configuration, or javascript that you may be using to invoke some of the Widgets commands and events.

So there is nothing I can say just from this screenshot.

Regards,

Sure, please check the information below....

Version Used : 9.0.017.09

In Index.html

<script src="https://apps.mypurecloud.com/widgets/9.0.017.09/cxbus.min.js" onload="javascript:CXBus.configure({debug:false,pluginsPath:'https://apps.mypurecloud.com/widgets/9.0.017.09/plugins/'});
    CXBus.loadFile('./assets/global/scripts/geneConfig.js').done(function()
    {CXBus.loadPlugin('widgets-core')});"></script>

Created local config file with the name of "geneConfig.js", attached the code below

if(!window._genesys)window._genesys = {};

if(!window._gt)window._gt = [];

window._genesys = {

widgets: {

    main: {

        debug: false,

        theme: "light",

        lang: "en",

        customStylesheetID: "genesys_widgets_custom",

        preload: ['webchat'],

        // OR define the JSON object inline

        i18n: {

            "en": {

                "webchat": {

                    "ChatTitle": "Chat with us",

                    "InviteBody": "Let us know if we can help out.",

                    "InviteTitle": "Need help?",

                }

            }

        }

    },

    webchat: {

        userData: {},

        emojis: true,

        cometD: {

            enabled: false

        },

        autoInvite: {

            enabled: false,

            timeToInviteSeconds: 5,

            inviteTimeoutSeconds: 30

        },

        chatButton: {

                enabled: true,

                'template': '<div class="cx-widget cx-webchat-chat-button cx-side-button" id="geneChatButton" onclick="myChatButton()" role="button" tabindex="0" data-message="ChatButton" data-gcb-service-node="true"><span class="cx-icon" data-icon="chat"></span><span class="i18n cx-chat-button-label" data-message="ChatButton"></span></div>',

                openDelay: 3000,

                effectDuration: 300,

                hideDuringInvite: true

        },

        form: {

            wrapper: "<table></table>",

           

        },

        uploadsEnabled: true,

        enableCustomHeader: true,

        transport: {

            dataURL: "...",

            type: "...",

            endpoint: "...",

            headers: {

                "x-api-key": "....."

            },

            stream: "..."

        }

    },

    onReady: function(){

        console.log('ready go');

    }

}

};

(function(o){

var f = function(){

var d = o.location;

o.aTags = o.aTags || [];

for(var i=0;i<o.aTags.length;i++){

var oTag = o.aTags[i];

var fs = d.getElementsByTagName(oTag.type)[0], e;

if(d.getElementById(oTag.id)) return; e = d.createElement(oTag.type); e.id = oTag.id;

if(oTag.type == "script"){e.src = oTag.path;}

            else{e.type = 'text/css';e.rel = 'stylesheet';e.href = oTag.path;}

if(fs){fs.parentNode.insertBefore(e, fs);}else{d.head.appendChild(e);}

}},ol = window.onload;

if(o.onload){typeof window.onload != "function"?window.onload=f:window.onload=function(){ol();f();}}else f();

})({location: document,

onload: false,

aTags: [{type:"script", id:"genesys-cx-widget-script", path:"https://apps.mypurecloud.com/widgets/9.0.017.09/widgets.min.js"},

{type:"link", id:"genesys-cx-widget-styles", path:"https://apps.mypurecloud.com/widgets/9.0.017.09/widgets.min.css"}]});

CXBus.loadPlugin("widgets-core");

var oPlugin = CXBus.registerPlugin("myPlugin");

oPlugin.before("WebChat.open", function(options){

if(options.formJSON)options.formJSON['inputs'].push({name:'email',label:'Email',placeholder:'Required'});

return options;

});

You are mixing two ways to load the widgets.

Keep the script in Index.html

Remove the function(o) from your geneConfig.js.

Your version of widget is quite old (2 years ago).
Last available version: Documentation:RN:gwc-wgt90rn:gwc-wgt9001734:9.0.x - Genesys Documentation

If you are trying to connect your widgets to Genesys Cloud CX, you configuration for webchat section is incorrect.
See properties for webchat with Genesys Cloud here

If you are trying to connect your widgets to Genesys MultiCloud CX, then you are not on the right forum. This forum is for Genesys Cloud CX API & SDK related questions.
For MultiCloud CX, please post your questions on the MultiCloud CX Community Forum.

Regards,

Thank you!
Corrected as per your inputs and recommended Version to be used is 9.0.017.09 even this is old...

In index.html and in geneConfig.js file it is

script src="https://apps.mypurecloud.com/widgets/9.0.017.09/cxbus.min.js" onload="javascript:CXBus.configure({debug:false,pluginsPath:'https://apps.mypurecloud.com/widgets/9.0.017.09/plugins/'});
CXBus.loadFile('./assets/global/scripts/geneConfig.js').done(function()
{CXBus.loadPlugin('widgets-core')});">

if(!window._genesys)window._genesys = {};

if(!window._gt)window._gt = [];

window._genesys = {

widgets: {

    main: {

        debug: false,

        theme: "light",

        lang: "en",

        customStylesheetID: "genesys_widgets_custom",

        preload: ['webchat'],

        // OR define the JSON object inline

        i18n: {

            "en": {

                "webchat": {

                    "ChatTitle": "Chat with us",

                    "InviteBody": "Let us know if we can help out.",

                    "InviteTitle": "Need help?",

                }

            }

        }

    },

    webchat: {

        userData: {},

        emojis: true,

        cometD: {

            enabled: false

        },

        autoInvite: {

            enabled: false,

            timeToInviteSeconds: 5,

            inviteTimeoutSeconds: 30

        },

        chatButton: {

                enabled: true,

                'template': '<div class="cx-widget cx-webchat-chat-button cx-side-button" id="geneChatButton" onclick="myChatButton()" role="button" tabindex="0" data-message="ChatButton" data-gcb-service-node="true"><span class="cx-icon" data-icon="chat"></span><span class="i18n cx-chat-button-label" data-message="ChatButton"></span></div>',

                openDelay: 3000,

                effectDuration: 300,

                hideDuringInvite: true

        },

        form: {

            wrapper: "<table></table>",

           

        },

        uploadsEnabled: true,

        enableCustomHeader: true,

        transport: {

            dataURL: "...",

            type: "pureengage-v3-rest",

            endpoint: "...",

            headers: {

                "x-api-key": "..."

            },

            stream: "..."

        }

    },

    onReady: function(){

        console.log('ready go');

    }

}  

};

Please guide me on below issues which I am facing now :

  1. Accessed my application with localhost:4200
    a) Started a chat session in one chrome tab and again accessed the same application with localhost:4200 in another chrome tab found that before chat session is opened automatically with "429 too many requests" error

For this issue, I am expecting like webchat widget should be confined to individual tabs and not to display in other tabs.

  1. Accessed my application with localhost:4200
    a) Started a chat session in chrome tab then
    b) I have closed the current tab without ending the chat session and reopened localhost:4200 in
    new tab
    c) Issue found as - automatically opened the earlier chat session in new tab.

For this issue, I am expecting like webchat widget should not reopen earlier chat session in new tab and should end the chat session when I close the tab.

  1. Accessed my application with localhost:4200
    a) Started a chat session in chrome tab then
    b) I have reloaded the current tab without ending the chat session
    c) Issue found as - automatically opened the chat session in current tab.

For this issue, I am expecting like webchat widget should not reopen the earlier chat session in current tab and should end the chat session when I reload the tab.

Hello,

This forum is for API and SDK questions related to the Genesys Cloud CX platform (formerly known as PureCloud).

Based on the url you are showing above, you are trying to connect to Genesys Multicloud CX platform (formerly known as Genesys Engage Cloud).
For questions related to Genesys Multicloud CX, please raise them on the Genesys Multicloud CX Community forum.

Regards,

Thank you!
But to raise a question on Multicloud CX Community I don't have credentials to login and move forward...so how to contact them?
Help me on this...

Hello,

You can request an account through this page - click on Get Started tab: Genesys | My Support

Regards,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.