Will there ever be a Bookmarks Scanner similar to AM-Deadlink? This tool is great but it doesn’t work with Firefox. An add-on that can scan for valid links & duplicates with the ability to keep or delete would be great!
It should be pretty easy to make an addon to do this.
The Webextension way, the recommended way is here:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks
This is how to do it with Addon SDK:
https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/places_bookmarks
This is how to do it with XPCOM:
var hs = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService);
var query = hs.getNewQuery();
var options = hs.getNewQueryOptions();
// Query users bookmarks, not history
options.queryType = options.QUERY_TYPE_BOOKMARKS;
// Execute the search and store results
var result = hs.executeQuery(query, options);
// Open the root containerNode and open it
var resultContainerNode = result.root;
// OPEN resultContainerNode
resultContainerNode.containerOpen = true;
// Search results are now child items of this container?
for (var i = 0; i < resultContainerNode.childCount; ++i) {
var childNode = resultContainerNode.getChild(i);
if (childNode.type == childNode.RESULT_TYPE_URI) {
console.log('childNode ' + i + ' is url = ', childNode)
console.log('times visited = ', childNode.accessCount)
}
if (i >= 10) {
break
}
}
// CLOSE resultContainerNode
resultContainerNode.containerOpen = false;
Thanks for the reply, but I don’t have the skill or know how to do that. I was wondering if someone that does would be building something for an addon.