diff --git a/mozilla/suite/common/pref/pref-download.js b/mozilla/suite/common/pref/pref-download.js index a970bdef5af..fb13122b1a1 100644 --- a/mozilla/suite/common/pref/pref-download.js +++ b/mozilla/suite/common/pref/pref-download.js @@ -2,15 +2,10 @@ function Startup() { PlaySoundCheck(); - // if we can't get the alert service, hide the pref UI for using alerts to notify on new mail + // if we don't have the alert service, hide the pref UI for using alerts to notify on new mail // see bug #158711 - try { - var alertService = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService); - } - catch(ex) { - var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlert"); - newMailNotificationAlertUI.setAttribute("hidden","true"); - } + var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlert"); + newMailNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes); } function PlaySoundCheck()