我可以检测浏览器的“书签"工具栏是否已启用JavaScript吗? [英] Can I detect whether a browser's Bookmarks toolbar is enabled with JavaScript?

查看:220
本文介绍了我可以检测浏览器的“书签"工具栏是否已启用JavaScript吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个书签,我的用户一直在单击它,而不是先将其拖动到书签栏中.我想添加一个动画,该动画将响应单击书签而运行,并说将我拖到您的书签栏!"并显示指向该栏的漂亮箭头.

I have a bookmarklet, and my users are consistently clicking it instead of dragging it to their bookmarks bar first. I'd like to add an animation which would run in response to a click on the bookmarklet, say "Drag me to your bookmarks bar!" and show a nifty arrow pointing at the bar.

但这仅在浏览器的书签栏实际可见时才有意义.我可以使用JavaScript检测书签栏是否可见吗?

But that only makes sense if the browser's bookmarks bar is actually visible. Can I detect whether the bookmarks bar is visible using JavaScript?

推荐答案

出于安全原因(除其他因素外),不-使用JavaScript无法做到这一点.

For security reasons (among others), no - this is not possible with JavaScript.

即使浏览器选择使客户端可以访问此信息,也不是标准的实现(跨多个浏览器支持).

Even if a browser chose to make this information accessible to the client, it would not be a standard implementation (supported across multiple browsers).

这篇关于我可以检测浏览器的“书签"工具栏是否已启用JavaScript吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆