0

I'm trying to only query all bookmarked (RSS/Atom)-feeds from a Firefox addon, with the SDK.

But feeds are ignored when the query is returned, only bookmarks to web sites are returned. Anybody an idea, how to correctly query only the feeds?

I'm using the examples from https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Places_Developer_Guide#Reading

When I query the Bookmarks all Feed-Folders are ignored. However, it seems that I need the folderId and can then query if the folder id is a feed:

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Using_the_Places_livemark_service

Sam
  • 771
  • 2
  • 8
  • 21
  • I think thats similar to going through bookmarks, but you just have to check if it's rss feed: http://stackoverflow.com/questions/22592343/extension-components-to-get-visit-count-in-firefoxs-history-and-bookmarks/22596715#22596715 – Noitidart Nov 21 '14 at 13:35
  • Of course I'll also found that already, but that doesn't work, RSS feeds are ignored when the query returns. – Sam Nov 22 '14 at 15:13
  • I'm kind of interested in this now as well I've been looking but can't find it. – Noitidart Nov 24 '14 at 04:32

1 Answers1

1

It's pretty easy, once you know how :-)

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); 
});
paa
  • 5,048
  • 1
  • 18
  • 22
  • Thanks dude, this API just drives me nuts. Can I also read individual feed entries, or do I have to get the XML by myself? – Sam Nov 25 '14 at 18:18