//# sourceURL=handle_zopim_chat.js $(document).on('zopim_libraries_loaded', function() { function inIframeZopim() { try { return window.self !== window.top; } catch (e) { return false; } }; if (!inIframeZopim()) { window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var e=this.createElement("script");n&&(this.domain=n),e.id="js-iframe-async",e.src="https://assets.zendesk.com/embeddable_framework/main.js",this.t=+new Date,this.zendeskHost="boostahelp.zendesk.com",this.zEQueue=a,this.body.appendChild(e)},o.write(''),o.close()}(); zE(function() { $zopim(function () { $zopim.livechat.theme.setColor('#1b99e5'); $zopim.livechat.theme.reload(); // apply new theme settings $zopim.livechat.button.setPosition('bl'); $zopim.livechat.window.setPosition('bl'); const customerName = 'Visitor ' + Math.random().toString().substring(4, 12) + ' (gradexy.com)'; zE('webWidget', 'identify', { name: customerName, }); $zopim.livechat.button.show(); var zopimNativeShow = $zopim.livechat.window.show; var zopimNativeHide = $zopim.livechat.window.hide; var zopimNativeHideAll = $zopim.livechat.hideAll; $zopim.livechat.hideAll = function() { zopimNativeHideAll(); }; $zopim.livechat.window.show = (onClick = false) => { zopimNativeShow(); }; $zopim.livechat.window.hide = function() { zopimNativeHide(); }; $zopim.livechat.removeTags('bidding'); $(document).on('event_order_create_success event_order_create_success_unauthorised', function (event, orderData) { if (!orderData.is_easy_bidding) { $zopim.livechat.addTags('bidding'); } }); $zopim.livechat.addTags('gradexy.com'); var departmentDetector = new Zopim.Department.Detector({ tag: '', userRole: '', isWritingcreekSite: Boolean(), isResumeSite: Boolean(), isWriterPage: Boolean(), isCourseHelpPage: Boolean(), }); $zopim.livechat.departments.clearVisitorDepartment(); $zopim.livechat.departments.setVisitorDepartment(departmentDetector.getDepartmentName()); $zopim.livechat.concierge.setAvatar('\/bundles\/asterfreelance\/_layout\/images\/_common_images\/zopim\u002Davatars\/8.jpg'); ZopimLoader.triggerInitEvent(); }); }); } }); $.ajax({ url: "\/\/asset.gradexy.com\/js\/ec9343b.js\u003F1611233856", dataType: "script", cache: true, }).done(() => { $(document).trigger('zopim_libraries_loaded'); });