Add Calendar Feed - GMail

By cgm Last update Apr 13, 2006 — Installed 38,173 times. Daily Installs: 5, 1, 6, 2, 4, 4, 3, 2, 0, 4, 0, 8, 0, 1, 9, 4, 1, 1, 0, 7, 2, 5, 6, 4, 8, 4, 6, 5, 2, 2, 0

Archived Comments (locked)

Subscribe to Archived Comments 117 posts, 54 voices

Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
nka User

I can't seem to get this to work either. Will there be a script update any time soon? Thanks!

 
victorm62 User

Well done Brad works a treat

 
Brad Stewart Scriptwright

What the...

I'm feeling incompetent right now... I'll just give you guys the url:
http://userscripts.org/scripts/show/8921

 
Brad Stewart Scriptwright

Oops, HTML error. The patched version is here

 
Brad Stewart Scriptwright

Ok, patched/enhanced version is available aahere. Again, cgm, if you want to merge these patches into your script, I'll take down the other one.

 
warius User

Go Brad!
How do I use the patched version, do I need to copy paste all the new lines? Or is there an easier way..?

 
Brad Stewart Scriptwright

cgm,

Are you planning to update your script? If not, I'll fork it and put up a patched version. I don't mean to sound like I'm offering an ultimatum -- if after the fork you want to take over maintenance again, I'll take it down.

For the moment, here is a patched version to fix the script, with the added functionality of supporting multiple calendars (you just need multiple google bookmarks with the same label), and the different bookmarks can be (optionally) different colours, if you add a hex colour code (i.e. #668Cd9, etc.) to the end of the name of the calendar in google calendar. (I want to store that somewhere else, since it's kind of inelegant this way, but it works for the moment). I also changed the style a little because the red border didn't look good wit the multi-coloured events.

 
TN User

Tried adding the: " on line 219. Works now!!

thanks guys.

 
sameerb User

kindly disregard my earlier post, i tried omarz tip and it worked

 
sameerb User

Is it just me?
I was using this script for the last 3 weeks and 3 days back it suddenly stopped working. now it is showing
"Calendar URL not found. Please run Setup under Tools -> User Script Commands."
I added the google bookmark label name in script commands and its not working.
Your help will be appreciated

 
warius User

Am I the only one not getting multiple calendars to work? (no pun intended, just wondering..?)

 
Brip User

It works. Been fiddling about with the script - only thing I didn't try was adding the " as suggested by Omarz and Mortimer. Surprise, surprise, this works. Thanks for the tip!

 
Mortimer Scriptwright

TN have a look in the previous comments. For the script to work for me, I had to change line 219 to:

bmkURL = responseDetails.responseText.match(/\.\/url[^ \n\r"]+(?=.*id="bkmk_href)/);

(adding a " after id=)

 
TN User

I've followed the directions to a tee, but I still get "Calendar URL not found. Please run Setup under Tools -> User Script Commands."

I've got the bookmark set up pointing at the xml feed, I've verified it works etc. The script just can't seem to find it.

Any thoughts?

 
warius User

Omarz:

Thanks for the update, however with this update I'm only able to view one calendar.

Can someone confirm this?

 
Tracy McKibben User

Thanks omarz, that worked.

 
omarz User

I already found that my previous post's "fix" for the date offset does not work around the clock, so please DO NOT implement that gmtOffset fix. Disregard my previous post entirely.

 
omarz User

Thanks rich5813! :)

I also found a quick fix to meno like-bugmenot's problem with the full-day events being displayed with a date on day after the actual event. The problem (as far I've been able to deduce) comes from the getTimezoneOffset() function. That function seems to return an absolute value, so those in the GMT -# timezones get a positive value. My one-line fix was to change a line in the parseDate(TS,debug) function.

Original line:
parsed['gmtOffset'] = date.getTimezoneOffset();

New line:
parsed['gmtOffset'] = (date.getHours() - date.getUTCHours());

This has gone through some very minimal testing, but it's behaving pretty well for me. I'll post back if I find any bugs.

Hope that helps!

 
rich5813 User

what are the odds, must have posted that at exact same time.. forget mine omarz solution better.

 
rich5813 User

Google changed the source on their bookmarks page. Small edit to the script worked for me. In the script, find/replace for 'id=bkmk_href'. Change this to 'bkmk_href_0'. Should work... for now

 
omarz User

I fixed my copy of the script with a very small change.

Line 219 currently reads:
bmkURL = responseDetails.responseText.match(/\.\/url[^ \n\r"]+(?=.*id=bkmk_href)/);

My change was to add a quotation mark after the 'id=' portion. In other words:

bmkURL = responseDetails.responseText.match(/\.\/url[^ \n\r"]+(?=.*id="bkmk_href)/);

Give that a shot and see if that helps. The script is working great for me now.

 
Brip User

Having the same problem. Fiddled about with the script, but no joy :( Anyone got a suggestion?

 
warius User

I would also love a fix for this...

Anyone?

 
JLin User

Search History/Bookmark change has changed. It is now called "Web History". I have no idea why this change would affect this wonderful script, but I'm not surprised. I eagerly await a fix...

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel