add:   var itemsDS = getItemsDS() .QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); if (!itemsDS.loaded) { if (new Date() - gFzStartupTime < 30 * 1000) { window.setTimeout(onLoad, 1000); return; } else throw("couldn't load the items datasource within thirty seconds"); } 
context: function onLoad() {  // XXX Code to make the News & Blogs toolbar button show up automatically.  // Commented out because it isn't working quite right.  //var toolbar = document.getElementById('mail-bar');  //var currentset = toolbar.getAttribute('currentset');  //if (!currentset.search("button-newsandblogs") == -1)  //  toolbar.insertItem('button-newsandblogs', 'button-stop', null, true);  //  currentset = currentset.replace(/spring/, "button-newsandblogs,spring");  //if (!currentset.search("button-newsandblogs") == -1)  //  currentset += ",button-newsandblogs";  //toolbar.setAttribute('currentset', currentset);  // Make sure the subscriptions data source is loaded, since we'll need it  // for everything we do.  If it's not loaded, recheck it every second until  // it's been ten seconds since we started up, then give up.  var ds = getSubscriptionsDS();  var remote = ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);  if (!remote.loaded) {    if (new Date() - gFzStartupTime < 10 * 1000)      window.setTimeout(onLoad, 1000);    else      throw("couldn't load the subscriptions datasource within ten seconds");    return;  }  var subs = getSubscriptionsFile();  var oldSubs = getOldSubscriptionsFile();  if (oldSubs.exists())    migrateSubscriptions(oldSubs);  getAccount();  ensureDatabasesAreReady();  downloadFeeds();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/973fab624eea47740ba37f2b7e4def92548fafe3/forumzilla.js/clean/mail/extensions/newsblog/content/forumzilla.js