Skip to content

Commit 22ca7ac

Browse files
nwingtwilliamchong
authored andcommitted
πŸ’„ Allow Intercom banners to be visible (#1015)
1 parent 02ce6c1 commit 22ca7ac

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

β€Žplugins/intercom.client.tsβ€Ž

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,20 @@ export default defineNuxtPlugin(() => {
77

88
// Hide Intercom UI elements via CSS in case it loads later
99
const styleId = 'intercom-hide-style'
10-
if (!document.getElementById(styleId)) {
11-
const style = document.createElement('style')
12-
style.id = styleId
13-
style.textContent = '#intercom-container, .intercom-lightweight-app, .intercom-namespace { display: none !important; }'
14-
document.head.appendChild(style)
10+
if (document.getElementById(styleId)) {
11+
return
1512
}
13+
14+
const style = document.createElement('style')
15+
style.id = styleId
16+
style.textContent = `
17+
.intercom-launcher-frame,
18+
.intercom-lightweight-app,
19+
.intercom-lightweight-app-launcher,
20+
.intercom-launcher-badge-frame,
21+
.intercom-messenger-frame {
22+
display: none !important;
23+
}
24+
`
25+
document.head.appendChild(style)
1626
})

0 commit comments

Comments
Β (0)