简体   繁体   English

我可以通过javascript代码打开Firefox跟踪保护吗?

[英]Can I know when Firefox Tracking Protection is turned on in javascript code?

I have an application running with Tealium. 我有一个与Tealium一起运行的应用程序。 Some features of the platform doesn't work when I access in Firefox and the tracking protection is turned on (In "always" mood) . 当我在Firefox中访问并且启用跟踪保护时(“总是”处于这种状态),该平台的某些功能无法使用。

I want to show an alert when the application detects Firefox tracking protection in mood "Always" to say "You have tracking protection activated and some features will not work in the platform" with java script. 我希望在应用程序检测到Firefox跟踪保护时始终显示警报,“总是”用Java脚本说“您激活了跟踪保护,并且某些功能在平台中不起作用”。

Is there any way to do that? 有什么办法吗?

You can do that by creating a new extension in Tealium, and then, in that extension, detect whether or not tracking protection is turned on in Firefox (here's SO on how to do that here ). 您可以通过在Tealium中创建一个新的扩展名,然后在该扩展名中检测是否在Firefox中启用了跟踪保护来实现此目的 (此处是关于如何执行此操作的信息 )。 You can then display a popup, initiate an ajax, or redirect to another page if tracking protection is turned on. 然后,如果启用了跟踪保护,则可以显示一个弹出窗口,启动一个ajax或重定向到另一个页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM