rem: var uri = comLine.resolveURI(param); var cal = getCalendarManager().createCalendar("ics", uri); getCalendarManager().registerCalendar(cal);   var fullPathRegEx = new RegExp("([^/:]+)[.]ics$"); var prettyName = param.match(fullPathRegEx);  var name; if (prettyName && prettyName.length >= 1) { name = decodeURIComponent(prettyName[1]); } else { name = calGetString("calendar", "untitledCalendarName"); } cal.name = name; 
add: calurl.push(param); 
context: function handleCommandLine(aComLine) {    var comLine = aComLine;    var validFlags = ["showdate", "subscribe", "url"];    var flagsToProcess = [];    for each (var flag in validFlags) {        if (comLine.findFlag(flag, false) >= 0) {            flagsToProcess.push(flag);        }    }    for each (var flag in flagsToProcess) {        var param = comLine.handleFlagWithParam(flag, false);        switch (flag) {            case "showdate":                currentView().goToDay(jsDateToDateTime(new Date(param)));                break;            case "subscribe":            case "url":                // Double-clicking an .ics file on the Mac causes                // LaunchServices to launch Sunbird with the -url command line                // switch like so:                // sunbird-bin -url file://localhost/Users/foo/mycal.ics -foreground                var uri = comLine.resolveURI(param);                var cal = getCalendarManager().createCalendar("ics", uri);                getCalendarManager().registerCalendar(cal);                // Strip ".ics" from filename for use as calendar name                var fullPathRegEx = new RegExp("([^/:]+)[.]ics$");                var prettyName = param.match(fullPathRegEx);                var name;                if (prettyName && prettyName.length >= 1) {                    name = decodeURIComponent(prettyName[1]);                } else {                    name = calGetString("calendar", "untitledCalendarName");                }                cal.name = name;                break;           default:                // no-op                break;        }    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/521725f7186f6b9e51f3e83f58e28818ef618eeb/calendar.js/clean/calendar/resources/content/calendar.js