From 7baa43f7f42ef17a4ff56576306280682133ab90 Mon Sep 17 00:00:00 2001 From: danyaZh Date: Tue, 6 Aug 2024 12:49:58 +0300 Subject: [PATCH] fix: intercom facade null error --- .../src/assets/js/intercom-facade.js | 214 +++++++++++++++++- 1 file changed, 213 insertions(+), 1 deletion(-) diff --git a/apps/valor-software-site/src/assets/js/intercom-facade.js b/apps/valor-software-site/src/assets/js/intercom-facade.js index 9c4e6e4a4..09bc4fc60 100644 --- a/apps/valor-software-site/src/assets/js/intercom-facade.js +++ b/apps/valor-software-site/src/assets/js/intercom-facade.js @@ -1 +1,213 @@ -!function(){var t=window.intercomSettings;if("undefined"!==t.app_id?t.app_id:""){var e=function(t,e=null,n=null){var o=document.createElement("div");return Object.keys(t).forEach((function(e){o.style[e]=t[e]})),e&&o.setAttribute("id",e),o.innerHTML=n,o},n=function(t){if(!window.Intercom){var e=window,n=e.Intercom;if("function"==typeof n)n("reattach_activator"),n("update",e.intercomSettings);else{var a=document,r=function(){r.c(arguments)};r.q=[],r.c=function(t){r.q.push(t)},e.Intercom=r;var l=function(){var t=a.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://widget.intercom.io/widget/brxsww1a";var e=a.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)};e.attachEvent?e.attachEvent("onload",l):e.addEventListener("load",l,!1)}}t&&(o.style.opacity="0",i.style.opacity="1",i.style.transform="rotate(0deg)",window.Intercom("show"));var c=0,s=setInterval((function(){c++,window.Intercom.booted?(null!==document.querySelector("#intercom-facade-btn")&&document.querySelector("#intercom-facade-btn").remove(),clearInterval(s)):c>10&&clearInterval(s)}),1e3);return!0},o=e({display:"flex",WebkitBoxAlign:"center",alignItems:"center",WebkitBoxPack:"center",justifyContent:"center",position:"absolute",top:"0px",bottom:"0px",width:"100%",transform:"rotate(0deg) scale(1)",transition:"transform 0.16s linear 0s, opacity 0.08s linear 0s"},null,'\n