检测 Chrome 插件警告
有什么方法可以检测 Chrome 何时在顶部显示黄色条,要求用户允许 Java/Flash/Quicktime/其他程序运行?
我正在开发一个 Javascript 应用程序,其中包含一个小型 Java 小程序,我希望能够提示用户单击“始终允许”按钮。
现在,如果小程序没有在 X 秒内运行,我将使用超时来提示用户,但这确实是一种很糟糕且不可靠的解决方案。
任何建议将不胜感激。
Is there any way to detect when Chrome shows the yellow bar at the top, asking the user to allow Java/Flash/Quicktime/whatever to run?
I'm developing a Javascript app that includes a small Java applet, and I want to be able to prompt the user to click the "Always Allow" button.
Right now I'm using a timeout to prompt the user if the applet isn't running within X seconds, but that's really hacky and unreliable solution.
Any suggestions would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
applet 标记不会公开任何事件 - 您可以做的是在向用户显示“始终允许”对话框(例如基于 cookie)后,使用 jQuery 将 applet 标记动态添加到您的页面。
The applet tag doesn't expose any events - what you could do is dynamically add the applet tag to your page using jQuery after you've shown the user a dialog to "Always Allow" (e.g. based on a cookie).