context:   subscribeToFeed: function(aUrl, aFolder, aMsgWindow)  {    if (!gExternalScriptsLoaded)      loadScripts();    // we don't support the ability to subscribe to several feeds at once yet...    // for now, abort the subscription if we are already in the middle of subscribing to a feed    // via drag and drop.    if (gNumPendingFeedDownloads)    {      debug('Aborting RSS subscription. Feed downloads already in progress\n');      return;    }    // if aFolder is null, then use the root folder for the first RSS account    if (!aFolder)    {      var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]                           .getService(Components.interfaces.nsIMsgAccountManager);      var allServers = accountManager.allServers;      for (var i=0; i< allServers.Count() && !aFolder; i++)      {        var currentServer = allServers.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgIncomingServer);        if (currentServer && currentServer.type == 'rss')          aFolder = currentServer.rootFolder;            }    }    // What do we do if the user hasn't created an RSS account yet?     // for now, fall out, would be nice if we could force RSS account creation    if (!aFolder)      return;    // if aUrl is a feed url, then it is of the form: feed:http://somesite/feed.xml    // Strip off the feed: so we can subscribe to the contained URL.    // Questions: what about feed://, can the OS be giving us an escaped URL?    if (/^feed:/i.test(aUrl))      aUrl = aUrl.replace('feed:', '');    // make sure we aren't already subscribed to this feed before we attempt to subscribe to it.    if (feedAlreadyExists(aUrl, aFolder.server))    {      aMsgWindow.statusFeedback.showStatusString(GetNewsBlogStringBundle().GetStringFromName('subscribe-feedAlreadySubscribed'));           return;    }    var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"]              .getService(Components.interfaces.nsIRDFService);        var itemResource = rdf.GetResource(aUrl);    var feed = new Feed(itemResource, aFolder.server);    feed.quickMode = feed.server.getBoolAttribute('quickMode');    if (!aFolder.isServer) // if the root server, create a new folder for the feed      feed.folder = aFolder; // user must want us to add this subscription url to an existing RSS folder.    progressNotifier.init(aMsgWindow, true);    gNumPendingFeedDownloads++;    feed.download(true, progressNotifier);  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/3840a88fdcfbdde0befb186d4a507422902a41f7/newsblog.js/clean/mail/extensions/newsblog/js/newsblog.js