| @@ -1,78 +1,18 @@ | ||
| 1 | 1 | <?php if ($__tagembed__chat_script): ?> |
| 2 | 2 | <!--Start-- Tagembed Chat Script --> |
| 3 | - <script type="text/javascript"> | |
| 4 | - /*--Start-- Manage Intercom Chat And Setting Data */ | |
| 5 | - window.addEventListener ? window.addEventListener("load", __tagembed__getAndManageIntercomSetting, false) : window.attachEvent && window.attachEvent("onload", __tagembed__getAndManageIntercomSetting); | |
| 6 | - function __tagembed__getAndManageIntercomSetting() { | |
| 7 | - let formData = new FormData(); | |
| 8 | - formData.append('action', 'data'); | |
| 9 | - formData.append('__tagembed__ajax_call_nones', __tagembed__ajax_call_nones); | |
| 10 | - formData.append('__tagembed__ajax_action', '__tagembed__get_and_manage_intercom_chat_setting'); | |
| 11 | - fetch(__tagembed__ajax_url, {method: 'POST', headers: {'x-requested-with': 'XMLHttpRequest'}, body: formData, | |
| 12 | - }).then(response => { | |
| 13 | - return response.json(); | |
| 14 | - }).then(response => { | |
| 15 | - if (response.status == true) { | |
| 16 | - /*--Start--Manage Intercom Setting Data*/ | |
| 17 | - window.intercomSettings = { | |
| 18 | - api_base: "https://api-iam.intercom.io", | |
| 19 | - app_id: "t8e1b7uq", | |
| 20 | - email: response.data.email, | |
| 21 | - user_id: response.data.userId, | |
| 22 | - user_hash: response.data.userHash, | |
| 23 | - billing_email: response.data.billingEmail, | |
| 24 | - name: response.data.name, | |
| 25 | - created_at: response.data.created, | |
| 26 | - user_type: response.data.type, | |
| 27 | - plan: response.data.plan, | |
| 28 | - active_plan: response.data.activePlan, | |
| 29 | - product: response.data.product, | |
| 30 | - active_product: response.data.activeProduct | |
| 31 | - }; | |
| 32 | - /*--End--Manage Intercom Setting Data*/ | |
| 33 | - /*--Start--Manage Intercom Calling Script*/ | |
| 34 | - var w = window; | |
| 35 | - var ic = w.Intercom; | |
| 36 | - if (typeof ic === "function") { | |
| 37 | - ic('reattach_activator'); | |
| 38 | - ic('update', w.intercomSettings); | |
| 39 | - } else { | |
| 40 | - var d = document; | |
| 41 | - var i = function () { | |
| 42 | - i.c(arguments); | |
| 43 | - }; | |
| 44 | - i.q = []; | |
| 45 | - i.c = function (args) { | |
| 46 | - i.q.push(args); | |
| 47 | - }; | |
| 48 | - w.Intercom = i; | |
| 49 | - var l = function () { | |
| 50 | - var s = d.createElement('script'); | |
| 51 | - s.type = 'text/javascript'; | |
| 52 | - s.async = true; | |
| 53 | - s.src = 'https://widget.intercom.io/widget/t8e1b7uq'; | |
| 54 | - var x = d.getElementsByTagName('script')[0]; | |
| 55 | - x.parentNode.insertBefore(s, x); | |
| 56 | - }; | |
| 57 | - if (document.readyState === 'complete') { | |
| 58 | - l(); | |
| 59 | - } else if (w.attachEvent) { | |
| 60 | - w.attachEvent('onload', l); | |
| 61 | - } else { | |
| 62 | - w.addEventListener('load', l, false); | |
| 63 | - } | |
| 64 | - } | |
| 65 | - /*--End--Manage Intercom Calling Script*/ | |
| 66 | - } | |
| 67 | - }).catch((error) => { | |
| 68 | - console.log(error); | |
| 69 | - }); | |
| 70 | - } | |
| 71 | - /*--End-- Manage Intercom Chat And Setting Data */ | |
| 3 | + <script type="text/javascript">window.$crisp = []; | |
| 4 | + window.CRISP_WEBSITE_ID = "c5d42bf5-f615-4318-930c-e61c35e565c1"; | |
| 5 | + (function () { | |
| 6 | + d = document; | |
| 7 | + s = d.createElement("script"); | |
| 8 | + s.src = "https://client.crisp.chat/l.js"; | |
| 9 | + s.async = 1; | |
| 10 | + d.getElementsByTagName("head")[0].appendChild(s); | |
| 11 | + })(); | |
| 72 | 12 | </script> |
| 13 | + <!--End-- Tagembed Chat Script --> | |
| 73 | 14 | <?php endif; ?> |
| 74 | -<!--End-- Tagembed Chat Script --> | |
| 75 | 15 | </div> |
| 76 | 16 | </div> |
| 77 | 17 | <!--Start-- Manage Next And Back Button On All Pages --> |
| 78 | 18 | <div id="__tagembed__next_and_back_link_main_section"></div> |