rem: var mailSessionProgID      = "component: 
add: var mailSessionContractID      = "@mozilla.org/messenger/services/session;1"; 
context: function ViewPageSource(messages){	var url;	var uri;	var mailSessionProgID      = "component://netscape/messenger/services/session";	var numMessages = messages.length;	if (numMessages == 0)	{		dump("MsgViewPageSource(): No messages selected.\n");		return false;	}	// First, get the mail session	var mailSession = Components.classes[mailSessionProgID].getService();	if (!mailSession)		return false;	mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession);	if (!mailSession)		return false;	for(var i = 0; i < numMessages; i++)	{		var messageResource = messages[i].QueryInterface(Components.interfaces.nsIRDFResource);		uri = messageResource.Value;  		// Now, we need to get a URL from a URI		url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow);		if (url)			url += "?header=src";		// Use a browser window to view source		window.openDialog( getBrowserURL(),						   "_blank",						   "scrollbars,resizable,chrome,dialog=no",							url,							"view-source" );	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6cc70ebd6c97bd0b2fe48c31f579e855387ced9d/mailCommands.js/buggy/mailnews/base/resources/content/mailCommands.js