rem: }, false); 
add: } where.removeEventListener("keypress", tmpFunc, false); where.addEventListener("keypress", tmpFunc, false); 
context:   function registerMenuCommand(docId, commandName, commandFunc, accel, access) {    var menuItem;    var previousItems;        menuItem = window.document.createElement('menuitem');    menuItem.setAttribute("label", commandName);    if( access ) {      menuItem.setAttribute("accesskey", access);    }    menuItem.__gmCommandFunc = function(e) {commandFunc()};    //menuItem.addEventListener("command", commandFunc, false);    previousItems = docMenuCommands[docId].childNodes;        if (accel && typeof(accel.key) == "string")  {      var accelText = "";      if (accel.accel) {        accelText += "<accel> + ";        accel.accel = true;      } else {        accel.accel = false;      }      if (accel.ctrl) {        accelText += "<ctrl> + ";        accel.ctrl = true;      } else {        accel.ctrl = false;      }      if (accel.meta) {        accelText += "<meta> + ";        accel.meta = true;      } else {        accel.meta = false;      }      if (accel.shift) {        accelText += "<shift> + ";        accel.shift = true;      } else {        accel.shift = false;      }      if (accel.alt) {        accelText += "<alt> + ";        accel.alt = true;      } else {        accel.alt = false;      }      accelText += accel.key;            menuItem.setAttribute("acceltext", accelText);      alert( menuItem.getAttribute("acceltext") );      getActiveDocument().addEventListener("keypress", function(e){          if (/*(e.accelKey == accel.accel) &&*/              (e.ctrlKey == accel.ctrl) &&              (e.metaKey == accel.meta) &&              (e.shiftKey == accel.shift) &&              (e.altKey == accel.alt) &&              (String.fromCharCode(e.which) == accel.key)) {            commandFunc();          }        }, false);    }        var i=0;    var nextNode=null;    while (i < previousItems.length) {      if (commandName.toLowerCase() <           previousItems[i].getAttribute('label').toLowerCase())       {        nextNode = previousItems[i];        break;      }      i++;    }    docMenuCommands[docId].insertBefore(menuItem, nextNode);  }
meta: 9744	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9744/0ffe0d13bc268a9071251a057c30ab9ba398fe0b/greasemonkey.js/clean/src/content/greasemonkey.js