[英]Open browser security info with JS?
When I'm on https, the browser shows a secure icon in the address bar. 当我使用https时,浏览器会在地址栏中显示一个安全图标。 I can usually (depending on browser) click on this to see more info in a native popup.
我通常可以(取决于浏览器)点击此链接以查看原生弹出窗口中的更多信息。
See chromes implementation here: https://www.dropbox.com/s/0w62tc6oaj63knp/Screenshot%202015-12-30%2014.01.53.png?dl=0 请参阅此处的chromes实现: https ://www.dropbox.com/s/0w62tc6oaj63knp/Screenshot%202015-12-30%2014.01.53.png?dl =0
Other browsers implement equivalent features. 其他浏览器实现等效功能。
I want to draw attention to the security of my site, by showing a picture of this icon by my "Buy" CTA, and something that says "Check for this secure icon in your browser". 我希望通过我的“购买”CTA显示此图标的图片以及“在浏览器中检查此安全图标”的内容,引起对我网站安全性的关注。 I want the more info section (as in the screenshot) to expand when my icon is clicked.
我希望在点击我的图标时展开更多信息部分(如屏幕截图所示)。
Is this possible? 这可能吗?
Apologies if question has already been answered, I tried to search but not sure if this info box has a name, so not sure what to search for. 抱歉,如果问题已经得到解答,我试图搜索但不确定此信息框是否有名称,因此不确定要搜索什么。
Thanks, David 谢谢,大卫
No it's not possible, sorry. 不,这不可能,抱歉。
Browsers let Javascript to interact with their core to certain level, but that's about it. 浏览器允许Javascript与其核心进行某种程度的交互,但这就是它。
window
object provides many functions to interact with browser but opening "Site's Info popup" is not provided. window
对象提供了许多与浏览器交互的功能,但未提供打开“站点信息弹出窗口”。
You can read about Mozilla and Chrome extensions and see they interact with the browser through JavaScript, but this is only inside extensions, signed scripts and scripts located on user's hard drives. 您可以阅读有关Mozilla和Chrome扩展程序的信息,并看到它们通过JavaScript与浏览器进行交互,但这只是位于用户硬盘驱动器上的扩展,签名脚本和脚本内部。
So if your application needs access to something the browser should ask the user its self or you could instruct the user on how to do this. 因此,如果您的应用程序需要访问某些内容,浏览器应该询问用户自己,或者您可以指示用户如何执行此操作。
I Hope it helps. 我希望它有所帮助。 :(
:(
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.