window.addEventListener('load', function() {	
	// https://developer.mozilla.org/en/Code_snippets/Tabbed_browser
	var browser = window.opener.getBrowser();
	var doc = window.opener.content.document;
	var c = doc.SimpleMap;
	Components.utils.reportError(c.addresses); // DEBUG
	
	var addressArray = c.addresses;
	var addrArrayLen = addressArray.length;
	
	for(i = 0; i < addrArrayLen; i++) {
		var addrList = document.getElementById("address-list");
		addrList.appendItem(addressArray[i].toString());
	}
	
	document.getElementById("show-map").addEventListener("oncommand", function() {
		var addr = document.getElementById("address-list").getSelectedItem(0).getAttribute("label");
		var link = GoogleMap.getLinkToAddress(addr);
		
		gBrowser.selectedTab = gBrowser.addTab(link);
	},false);
	
	document.getElementById("show-directions").addEventListener("oncommand", function() {
		
		var addr = document.getElementById("address-list").getSelectedItem(0).getAttribute("label");
		var link = GoogleMap.getLinkToAddressDirection(addr, c.getPreferences().getMyLocation());
		
		gBrowser.selectedTab = gBrowser.addTab(link);
	}, false);
	
}, false);

@@ -559,34 +559,32 @@
 dEventListener(%22
-on
 command%22, functi
@@ -582,24 +582,25 @@
 %22, function(
+e
 ) %7B%0D%0A%09%09var a
@@ -866,18 +866,16 @@
 stener(%22
-on
 command%22
@@ -885,16 +885,17 @@
 unction(
+e
 ) %7B%0D%0A%09%09%0D

Change event listener to command