Indeed it could disrupt the user. My method of choice would have been to just parse the atom feed generated by Gmail, which uses simple URL authentication allowing me to receive a specific users unread items. Unfortunately, whenever a user is logged in to Gmail the feed URL automatically redirects to that account's feed, ignoring the authentication and removing the possibility to access multiple accounts.
Another approach that I have tried is aggregating the feed via a PHP IMAP script. This works pretty well but I don't think people would like the idea of sending their username and password off to some external non-Google site (and I wouldn't want to be the one hosting that script considering the number of requests and amount of data transferred). A third approach would be to just do a sort of proxy for the Gmail feed, so that it doesn't recognize that a user is logged in on the accessing client. My web host doesn't allow external file access so that method was also scrapped (dito on the username / password issue). So it came down to this last attempt involving storing and modifying cookies, just like the Gmail Manager add-on for Firefox does. But I'm no good at the NPAPI (or C++ for that matter) so I agree that an easy- to-use JS API would be very helpful for me. I guess my users will have to make do with single-account functionality for now! :) Thanks for your effort, Anders On Nov 25, 9:40 pm, Adam Barth <aba...@chromium.org> wrote: > I see. That sounds difficult to do without disrupting the user as > they use Gmail. > > One option to consider is using a content script in Gmail to read and > write document.cookie. > > I agree that a proper cookie API (and, perhaps, the ability to set the > Cookie header on XMLHttpRequests) would be helpful for this use case. > > Thanks, > Adam > > > > On Wed, Nov 25, 2009 at 12:23 PM, Anders Sahlin <malak...@gmail.com> wrote: > > I want to be able to store and replace cookies so that my Gmail > > Checker extension can support multiple accounts. > > > On Nov 25, 9:15 pm, Adam Barth <aba...@chromium.org> wrote: > >> Can you explain what you're trying to achieve with cookie access? > >> There might be a way to do what you want with the current API. > > >> Adam > > >> On Wed, Nov 25, 2009 at 12:09 PM, Anders Sahlin <malak...@gmail.com> wrote: > >> > I'm also interested in cookie manipulation outside of the page domain > >> > (i.e. from the background page of an extension). I think it could be > >> > done with an NPAPI plugin but I have no time to sit down and do the C+ > >> > + coding required for that. A JS approach would be preferable, if such > >> > exists. > > >> > On Nov 24, 10:16 pm, Karen <karent...@gmail.com> wrote: > >> >> That is, given a domain and cookie name, I would like to be able to > >> >> fetch the cookie value (if it is set). > > >> >> Or do I have to be on a page of that domain? > > >> > -- > > >> > You received this message because you are subscribed to the Google > >> > Groups "Chromium-extensions" group. > >> > To post to this group, send email to > >> > chromium-extensi...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > chromium-extensions+unsubscr...@googlegroups.com. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/chromium-extensions?hl=en. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Chromium-extensions" group. > > To post to this group, send email to chromium-extensi...@googlegroups.com. > > To unsubscribe from this group, send email to > > chromium-extensions+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/chromium-extensions?hl=en. -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.