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?
A Greasemonkey script cannot tell if a link is in the browser's/user's bookmarks because:
- Ordinary javascript is not allowed to know this for security reasons. 
- Greasemonkey does not provide this capability and Greasemonkey's controlling developers have consistently refused to add similar capabilities. 
See, also, "How can I detect visited and unvisited links on a page?".
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.
来源:https://stackoverflow.com/questions/25704556/how-to-detect-if-a-link-already-is-in-the-users-bookmarks