如何检测用户书签中是否已存在链接? [英] How to detect if a link already is in the user's bookmarks?

查看:97
本文介绍了如何检测用户书签中是否已存在链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Greasemonkey脚本确定书签中是否已存在链接? 例如如果我要标记页面上所有带有书签的链接.

Is it possible to determine from a Greasemonkey script if a link is already in the bookmarks or not? E. g. if I want to mark all links on the page which are bookmarked.

此外,如何找到存储此书签的文件夹的名称?

Also, how can I find the name of the folder where this bookmark is stored?

推荐答案

Greasemonkey脚本无法确定浏览器/用户书签中是否存在链接,原因是:

A Greasemonkey script cannot tell if a link is in the browser's/user's bookmarks because:

  1. 出于安全原因,普通javascript不允许知道此信息.

Greasemonkey不提供此功能,并且 Greasemonkey的控制开发人员始终拒绝添加类似的功能功能.

Greasemonkey does not provide this capability and Greasemonkey's controlling developers have consistently refused to add similar capabilities.

另请参见如何检测页面上已访问和未访问的链接?" .

Firefox附加组件可以尽管这样做.因此,如果您感到烦躁,可以分叉Greasemonkey并添加此功能,也可以编写一个可以向您的脚本发送消息的辅助程序插件.

Firefox add-ons can do this though. So, if you were feeling frisky, you could either fork Greasemonkey and add this capability or you could write a helper add-on that could message your script.

这篇关于如何检测用户书签中是否已存在链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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