Consider a single page application written in vanilla JS (to avoid framework-specific answers).
I have an app in which I load Intercom by default, but I want to hide the widget in specific pages.
That should be doable from Intercom itself, as shown in this article in their help center, but it doesn't really work in single page apps - the widget is shown no matter what is configured in Intercom.
One option would be to find the widget on page and hide it manually for the given pages, but that feels, sounds and tastes like a hack (it requires re-enabling the widget when going back to page where the widget is supposed to appear).
So, is there any good practice on how to do it for SPAs?
display: none
– Girish