File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const WIDGET_SCRIPT_URL = isLocalhost
66 : 'https://docs-widget.vercel.app/widget.js' ;
77
88const HOCKEYSTACK_API_KEY = '96e358f635f3f5ea7fda26023b10da' ;
9+ const REO_CLIENT_ID = '0dc28e3fda800b9' ;
910
1011function injectVapiWidget ( ) {
1112 console . log ( '[custom.js] injectVapiWidget called' ) ;
@@ -51,8 +52,27 @@ function initializeHockeyStack() {
5152 document . getElementsByTagName ( 'head' ) [ 0 ] . append ( hsscript ) ;
5253}
5354
55+ function initializeReo ( ) {
56+ if ( isLocalhost ) {
57+ console . log ( '[custom.js] Skipping Reo on localhost' ) ;
58+ return ;
59+ }
60+
61+ var reoScript = document . createElement ( "script" ) ;
62+ reoScript . type = "text/javascript" ;
63+ reoScript . src = "https://static.reo.dev/" + REO_CLIENT_ID + "/reo.js" ;
64+ reoScript . defer = true ;
65+ reoScript . onload = function ( ) {
66+ if ( typeof Reo !== 'undefined' ) {
67+ Reo . init ( { clientID : REO_CLIENT_ID } ) ;
68+ }
69+ } ;
70+ document . head . appendChild ( reoScript ) ;
71+ }
72+
5473function initializeAll ( ) {
5574 initializeHockeyStack ( ) ;
75+ initializeReo ( ) ;
5676 if ( ENABLE_VOICE_WIDGET ) {
5777 injectVapiWidget ( ) ;
5878 }
You can’t perform that action at this time.
0 commit comments