是否可以从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:
出于安全原因,普通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.
更多推荐
如何检测用户书签中是否已存在链接?
发布评论