rem: var calendarSubscribed = this.isURLAlreadySubscribed( CalendarURL ); 
add: var calendarSubscribed = this.isURLAlreadySubscribed( Channel.URI.spec ); 
context: calendarManager.prototype.checkCalendarURL = function calMan_checkCalendarURL( CalendarURL ){   var calendarSubscribed = this.isURLAlreadySubscribed( CalendarURL );   if( calendarSubscribed === false )   {      if( CalendarURL.indexOf( "imap://" ) != -1 )      {         //this is an imap email message, download it to a file and show it.         alert( "We don't yet support email messages" );      }      else      {         //not subscribed, prompt the user to do so.         var arrayForNames = CalendarURL.split( "/" );         var CalendarNameWithExtension = arrayForNames[ arrayForNames.length - 1 ];         var CalendarName = CalendarNameWithExtension.replace( ".ics", "" );         this.launchAddCalendarDialog( CalendarName, CalendarURL );      }   }   else   {      //calendarSubscribed is the subscribed calendar object.      if( calendarSubscribed.active == false )      {         calendarSubscribed.active = true;         gCalendarWindow.calendarManager.addCalendar( calendarSubscribed );               document.getElementById( "calendar-list-item-"+calendarSubscribed.serverNumber ).setAttribute( "checked", "true" );         refreshEventTree( false );         refreshToDoTree( false );            gCalendarWindow.currentView.refreshEvents();      }   }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/eccfe24949238ab11afd71e280a2c50fe7ee3ea0/calendarManager.js/buggy/calendar/resources/content/calendarManager.js