zopim : add title attribute in <iframe>

594 views Asked by At

I am using Zopim / Zendesk JS Library for Chat widget.

Recently I noticed that the iframe generated from the JS code is not having title attribute in it. Here is the generated iframe sample :

<iframe frameborder="0" src="about:blank" data-test-id="ChatWidgetMobileButton-iframe" style="background-color: transparent; vertical-align: top; position: relative; width: 100%; height: 100%; min-width: 100%; min-height: 100%; max-width: 100%; max-height: 100%; margin: 0px; overflow: hidden; display: block;">

The Code i used for integration is :

window.$zopim || (function (d, s) {
            var z = $zopim = function (c) {
                z._.push(c)
            },
                    $ = z.s =
                    d.createElement(s),
                    e = d.getElementsByTagName(s)[0];
            z.set = function (o) {
                z.set.
                        _.push(o)
            };
            z._ = [];
            z.set._ = [];
            $.async = !0;
            $.setAttribute("charset", "utf-8");
            $.src = "//v2.zopim.com/?MY_ID";
            z.t = +new Date;
            $.type = "text/javascript";
            e.parentNode.insertBefore($, e)
        })(document, "script");

        $zopim(function () {
            $zopim.livechat.departments.filter('test');
            $zopim.livechat.concierge.setTitle('test');
            $zopim.livechat.concierge.setName('test');
            $zopim.livechat.concierge.setAvatar('images/tw.png');
            $zopim.livechat.window.setTitle("test");
            $zopim.livechat.theme.setColor('#59946b');
            $zopim.livechat.setGreetings({
                'online': 'Live Chat',
                'offline': 'Live Chat'
            });
            $zopim.livechat.bubble.setText('Hi there');
            $zopim.livechat.theme.reload();
            $zopim.livechat.window.setPosition('br');
            $zopim.livechat.button.setPositionMobile('bl');
            $zopim.livechat.window.hide();
        });

API Reference here : https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html

Can anyone please know how to add title attribute in that JS generated iFrame?

0

There are 0 answers