Skip to content

Commit be6ed78

Browse files
authored
fix(voiceWidget): disable voice widget (#655)
1 parent 9a86d33 commit be6ed78

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fern/custom.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const WIDGET_TAG = 'vapi-voice-agent-widget';
2+
const ENABLE_VOICE_WIDGET = false; // Feature flag to enable/disable the floating voice widget
23
const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';
34
const 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

5354
function initializeAll() {
5455
initializeHockeyStack();
55-
injectVapiWidget();
56+
if (ENABLE_VOICE_WIDGET) {
57+
injectVapiWidget();
58+
}
5659
}
5760

5861
if (document.readyState === 'loading') {

0 commit comments

Comments
 (0)