Skip to content

Commit 312e17c

Browse files
nwingtwilliamchong
authored andcommitted
πŸ’„ Allow Intercom banners to be visible (#1015)
1 parent d52f62d commit 312e17c

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
@@ -18,10 +18,20 @@ export default defineNuxtPlugin(() => {
1818

1919
// Hide Intercom UI elements via CSS in case it loads later
2020
const styleId = 'intercom-hide-style'
21-
if (!document.getElementById(styleId)) {
22-
const style = document.createElement('style')
23-
style.id = styleId
24-
style.textContent = '#intercom-container, .intercom-lightweight-app, .intercom-namespace { display: none !important; }'
25-
document.head.appendChild(style)
21+
if (document.getElementById(styleId)) {
22+
return
2623
}
24+
25+
const style = document.createElement('style')
26+
style.id = styleId
27+
style.textContent = `
28+
.intercom-launcher-frame,
29+
.intercom-lightweight-app,
30+
.intercom-lightweight-app-launcher,
31+
.intercom-launcher-badge-frame,
32+
.intercom-messenger-frame {
33+
display: none !important;
34+
}
35+
`
36+
document.head.appendChild(style)
2737
})

0 commit comments

Comments
Β (0)