From ab6628e29987ec5f75e175b6e27a4640d1544d74 Mon Sep 17 00:00:00 2001 From: Doron-Bargo <62555360+Doron-Bargo@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:23:50 +0300 Subject: [PATCH] intecrcom scripts in static --- docusaurus.config.js | 9 ++++++++- static/js/intercomSettings.js | 4 ++++ static/js/intercomWidget.js | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 static/js/intercomSettings.js create mode 100644 static/js/intercomWidget.js diff --git a/docusaurus.config.js b/docusaurus.config.js index 7dd940d4..e720a36a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -90,7 +90,14 @@ const config = { }), ], ], - + scripts: [ + { + src: '/js/intercomSettings.js' + }, + { + src: '/js/intercomWidget.js' + } + ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ diff --git a/static/js/intercomSettings.js b/static/js/intercomSettings.js new file mode 100644 index 00000000..cc0e36a7 --- /dev/null +++ b/static/js/intercomSettings.js @@ -0,0 +1,4 @@ +window.intercomSettings = { + app_id: "bkz9ugqv", + custom_launcher_selector: '.intercom-launch' + }; \ No newline at end of file diff --git a/static/js/intercomWidget.js b/static/js/intercomWidget.js new file mode 100644 index 00000000..4378806b --- /dev/null +++ b/static/js/intercomWidget.js @@ -0,0 +1 @@ +(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/bkz9ugqv';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()