rem: if (!browser.popupUrls) { browser.popupUrls = []; browser.popupFeatures = []; }   for (var i = 0; i < browser.popupUrls.length; ++i) { if (browser.popupUrls[i].equals(aEvent.popupWindowURI)) { browser.popupUrls.splice(i, 1); browser.popupFeatures.splice(i, 1); break; } }   if (browser.popupUrls.length >= 100) { browser.popupUrls.shift(); browser.popupFeatures.shift(); } browser.popupUrls.push(aEvent.popupWindowURI); browser.popupFeatures.push(aEvent.popupWindowFeatures); 
context: function onPopupBlocked(aEvent) {  var playSound = pref.getBoolPref("privacy.popups.sound_enabled");  if (playSound) {    var sound = Components.classes["@mozilla.org/sound;1"]                          .createInstance(Components.interfaces.nsISound);    var soundUrlSpec = pref.getCharPref("privacy.popups.sound_url");    if (!soundUrlSpec)      sound.beep();    if (soundUrlSpec.substr(0, 7) == "file://") {      var soundUrl = Components.classes["@mozilla.org/network/standard-url;1"]                               .createInstance(Components.interfaces.nsIFileURL);      soundUrl.spec = soundUrlSpec;      var file = soundUrl.file;      if (file.exists)        sound.play(soundUrl);    }     else {      sound.playSystemSound(soundUrlSpec);    }  }  var showIcon = pref.getBoolPref("privacy.popups.statusbar_icon_enabled");  if (showIcon) {    var browser = getBrowserForDocument(aEvent.target);          if (browser) {      var hostPort = browser.currentURI.hostPort;      browser.popupDomain = hostPort;      if (browser == getBrowser().selectedBrowser) {        var popupIcon = document.getElementById("popupIcon");        popupIcon.hidden = false;      }      if (!browser.popupUrls) {        browser.popupUrls = [];        browser.popupFeatures = [];      }      // Check for duplicates, remove the old occurence of this url,      // to update the features, and put it at the end of the list.      for (var i = 0; i < browser.popupUrls.length; ++i) {        if (browser.popupUrls[i].equals(aEvent.popupWindowURI)) {          browser.popupUrls.splice(i, 1);          browser.popupFeatures.splice(i, 1);          break;        }      }      // Limit the length of the menu to some reasonable size.      // We only add one item every time, so no need for more complex stuff.      if (browser.popupUrls.length >= 100) {        browser.popupUrls.shift();        browser.popupFeatures.shift();      }      browser.popupUrls.push(aEvent.popupWindowURI);      browser.popupFeatures.push(aEvent.popupWindowFeatures);    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/adc91b9110e01d23543a2a801f77e353becb5342/navigator.js/clean/suite/browser/navigator.js