File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11const WIDGET_TAG = 'vapi-voice-agent-widget' ;
2+ const ENABLE_VOICE_WIDGET = false ; // Feature flag to enable/disable the floating voice widget
23const isLocalhost = window . location . hostname === 'localhost' || window . location . hostname === '127.0.0.1' ;
34const WIDGET_SCRIPT_URL = isLocalhost
45 ? 'http://localhost:9001/widget.js'
@@ -46,13 +47,15 @@ function initializeHockeyStack() {
4647 hsscript . dataset . apikey = HOCKEYSTACK_API_KEY ;
4748 hsscript . dataset . cookieless = 1 ;
4849 hsscript . dataset . autoIdentify = 1 ;
49-
50+
5051 document . getElementsByTagName ( 'head' ) [ 0 ] . append ( hsscript ) ;
5152}
5253
5354function initializeAll ( ) {
5455 initializeHockeyStack ( ) ;
55- injectVapiWidget ( ) ;
56+ if ( ENABLE_VOICE_WIDGET ) {
57+ injectVapiWidget ( ) ;
58+ }
5659}
5760
5861if ( document . readyState === 'loading' ) {
You can’t perform that action at this time.
0 commit comments