rem: var numEvents = 5; var eventBox = $('qa-qmo-events'); qaTools.showHideLoadingMessage(eventBox, true); var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents"); var callback = function(feed) { var items = feed.items; qaTools.showHideLoadingMessage(eventBox, false); if (items.length < numEvents) numEvents=items.length; for (var i=0; i<numEvents; i++) { var item = items.queryElementAt(i, Ci.nsIFeedEntry); if (item != null) { qmo.populateLinkBox(eventBox, [{text : item.title.plainText(), url : item.link.resolve("")}], 37); } } }; qaTools.fetchFeed(url, callback); }, 
add: var numEvents = 5; var eventBox = $('qa-qmo-events'); qaTools.showHideLoadingMessage(eventBox, true); var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents"); var callback = function(feed) { var items = feed.items; qaTools.showHideLoadingMessage(eventBox, false); if (items.length < numEvents) numEvents=items.length; for (var i=0; i<numEvents; i++) { var item = items.queryElementAt(i, Ci.nsIFeedEntry); if (item != null) { qmo.populateLinkBox(eventBox, [{text : item.title.plainText(), url : item.link.resolve("")}], 37); } } }; qaTools.fetchFeed(url, callback); }, 
context: 	populateEvents : function() {		var numEvents = 5; // show 5 events		var eventBox = $('qa-qmo-events');		qaTools.showHideLoadingMessage(eventBox, true);		var url = qaMain.urlbundle.getString("qa.extension.url.qmo.upcomingEvents");		var callback = function(feed) {			var items = feed.items;			qaTools.showHideLoadingMessage(eventBox, false);			if (items.length < numEvents)				numEvents=items.length;			for (var i=0; i<numEvents; i++) {				var item = items.queryElementAt(i, Ci.nsIFeedEntry);				if (item != null) {					qmo.populateLinkBox(eventBox, 						[{text : item.title.plainText(), url : item.link.resolve("")}], 						37);				}			}		};		qaTools.fetchFeed(url, callback);	},
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/a3a9a2c311afc9d76e4e6bfc036e5897fa988bc1/qmo.js/clean/testing/extensions/community/chrome/content/tabs/qmo.js