Skip to content

Instantly share code, notes, and snippets.

@creativepsyco
Created May 24, 2011 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save creativepsyco/989370 to your computer and use it in GitHub Desktop.
Save creativepsyco/989370 to your computer and use it in GitHub Desktop.
My Version of isCalendarWritable
function isCalendarWritable(aCalendar) {
//return true;
/*return (!aCalendar.getProperty("disabled") &&
!aCalendar.readOnly &&
(!getIOService().offline ||
aCalendar.getProperty("requiresNetwork") === false));*/
//Begin -- redDragon's version --
return (!aCalendar.getProperty("disabled") &&
!aCalendar.readOnly &&
(!getIOService().offline ||
aCalendar.getProperty("cache.enabled") ||
aCalendar.getProperty("requiresNetwork") === false));
//end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment