检测 Chrome 插件警告

发布于 2024-12-03 02:09:27 字数 220 浏览 2 评论 0原文

有什么方法可以检测 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那请放手 2024-12-10 02:09:27

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文