[英]How to hide facebook customer chat plugin on specific pages of my SPA?
We have SPA (single page application, generated nuxtjs project) with facebook customer chat plugin on it.我们有带有 facebook 客户聊天插件的 SPA(单页应用程序,生成的 nuxtjs 项目)。
This plugin is initialized during page refresh and remains on the site after router loads view.此插件在页面刷新期间初始化,并在路由器加载视图后保留在站点上。
We want to show this plugin only on specific pages such as landing page, support page, payment page and hide on the rest pages.我们只想在特定页面上显示此插件,例如登录页面、支持页面、付款页面并隐藏在其余页面上。
During initial load the plugin creates iframe with all the magic inside it and this iframe remains during SPA navigation untouched.在初始加载期间,插件会创建 iframe,其中包含所有魔法,并且该 iframe 在 SPA 导航期间保持不变。
The question is - how to properly hide facebook customer chat plugin on specific pages?问题是 - 如何在特定页面上正确隐藏 Facebook 客户聊天插件? Destroy iframe?销毁 iframe? Some undocumented settings?一些未记录的设置? Another magic?另一个魔法?
Thanks谢谢
小部件初始化后,您可以通过window.FB.CustomerChat.show()
和window.FB.CustomerChat.hide()
方法轻松控制可见性
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.