Created
March 24, 2009 15:20
-
-
Save ino46/84146 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
models.register({ | |
name : 'Google Calendar', | |
ICON : 'http://calendar.google.com/googlecalendar/images/favicon.ico', | |
check : function(ps){ | |
return ps.type=='regular'; | |
}, | |
post : function(ps){ | |
return request('http://www.google.com/calendar/m', { | |
queryString : { | |
hl : 'en', | |
}, | |
}).addCallback(function(res){ | |
var doc = convertToHTMLDocument(res.responseText); | |
if(doc.getElementById('gaia_loginform')) | |
throw new Error(getMessage('error.notLoggedin')); | |
var fs = formContents(doc); | |
return request('http://www.google.com/calendar/m', { | |
redirectionLimit : 0, | |
sendContent: { | |
ctext : ps.description, | |
secid : fs.secid, | |
as_sdt : fs.as_sdt, | |
}, | |
}); | |
}); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment