我尝试使用 SDK 仅从 Firefox 插件查询所有已添加书签的 (RSS/Atom) 源。
但是返回查询时,提要将被忽略,仅返回网站的书签。 有人知道如何正确地仅查询提要吗?
我正在使用 https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Places_Developer_Guide#Reading 中的示例
当我查询书签时,所有提要文件夹都被忽略。然而,我似乎需要folderId,然后可以查询文件夹id是否是一个提要:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Using_the_Places_livemark_service
最佳答案
一旦你知道怎么做,这很容易:-)
const { Cu } = require("chrome");
Cu.import("resource://gre/modules/PlacesUtils.jsm");
var feeds = PlacesUtils.annotations.getAnnotationsWithName("livemark/feedURI");
feeds.forEach(function(feed){
console.log(feed.annotationValue);
});
关于javascript - 使用 SDK 在 Firefox 插件中查询添加书签的提要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27048876/