rem: var cal = document.popupNode.calendar getDisplayComposite().removeCalendar(cal.uri); var calMgr = getCalendarManager(); calMgr.unregisterCalendar(cal);   
add: var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);  var result = {}; var calendarBundle = document.getElementById("bundle_calendar"); var calendar = document.popupNode.calendar; var ok = promptService.confirm( window, calendarBundle.getString("unsubscribeCalendarTitle"), calendarBundle.getFormattedString("unsubscribeCalendarMessage",[calendar.name]), result);  if (ok) { getDisplayComposite().removeCalendar(calendar.uri); var calMgr = getCalendarManager(); calMgr.unregisterCalendar(calendar);   } 
context: function deleteCalendar(event){    var cal = document.popupNode.calendar    getDisplayComposite().removeCalendar(cal.uri);    var calMgr = getCalendarManager();    calMgr.unregisterCalendar(cal);    // Delete file?    //calMgr.deleteCalendar(cal);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0e3fbfb4df613229ffe7ed0723a595eb875b1349/calendar.js/buggy/calendar/resources/content/calendar.js