javascript - 使用 SDK 在 Firefox 插件中查询添加书签的提要

标签 javascript firefox-addon firefox-addon-sdk feed

我尝试使用 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/

相关文章:

javascript - 我如何在谷歌应用引擎上为 html5 创建一个 websocket

javascript - 在 Firefox 扩展中等待文件复制完成

firefox - 永久安装个人 Firefox 网络扩展

javascript - 如何为来自页面脚本的自定义消息创建事件监听器

javascript - 如何为 "Unresolved function or method"修复 WebStorm 警告 "require"(Firefox 附加 SDK)

javascript - Vue 组件没有正确更新属性

javascript - Chart.js 中不显示条形图

firefox - 打包 Firefox 扩展时出现问题

javascript - 如何通过单击按钮添加行

javascript - 如何从 Firefox 插件编辑 `window` 上的属性?