Comments on cgm's Scripts

123 comments

Comment on Add Calendar Feed - GMail made Apr 22, 2008:

nka

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

Comment on Add Calendar Feed - GMail made Apr 30, 2007:

victorm62

Well done Brad works a treat

Comment on Add Calendar Feed - GMail made Apr 29, 2007:

Brad Stewart

What the...

I'm feeling incompetent right now... I'll just give you guys the url:

http://userscripts.org/scripts/show/8921

Comment on Add Calendar Feed - GMail made Apr 29, 2007:

Brad Stewart

Oops, HTML error. The patched version is here

Comment on Add Calendar Feed - GMail made Apr 29, 2007:

Brad Stewart

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.

Comment on Add Calendar Feed - GMail made Apr 28, 2007:

warius

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..?

Comment on Add Calendar Feed - GMail made Apr 27, 2007:

Brad Stewart

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.

Comment on Add Calendar Feed - GMail made Apr 27, 2007:

TN

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

thanks guys.

Comment on Add Calendar Feed - GMail made Apr 26, 2007:

sameerb

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

Comment on Add Calendar Feed - GMail made Apr 26, 2007:

sameerb

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

Comment on Add Calendar Feed - GMail made Apr 26, 2007:

warius

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

Comment on Add Calendar Feed - GMail made Apr 25, 2007:

Brip

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!

Comment on Add Quick Links - GMail made Apr 25, 2007:

Bernardo Quaresma Dias

I figured what was wrong.

Here are the changes I made:

- var La = responseDetails.responseText.match(/bkmk_href[^ >]+>([^<]*)/g);

+ var La = responseDetails.responseText.match(/bkmk_href[^>]+>([^<]*)/g);

//there's a new attribute 'target=nw' now

- var label = La[indexc].replace(/bkmk_href[^ >]+>/,'');

+ var label = La[indexc].replace(/bkmk_href[^>]+>/,'');

- var url = Ua[indexc] .replace('.', 'http://google.com/bookmarks','');

+ var url = Ua[indexc].replace(/\.[^=]+=/,'')

// erases prefix

+ url = url.replace(/&.+/,'')

// erases suffix

Hope it helps someone else that may have bumped into that,

--

Bernardo

Comment on Add Quick Links - GMail made Apr 25, 2007:

Bernardo Quaresma Dias

Doesn't work for me either.

Could it be because my GMail interface isn't in english?

I think it could be because:

var La = responseDetails.responseText.match(/bkmk_href[^ >]+>([^<]*)/g);

Is returning NULL...

Any tips?

--

Bernardo

Comment on Add Calendar Feed - GMail made Apr 25, 2007:

Mortimer

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=)

Comment on Add Calendar Feed - GMail made Apr 25, 2007:

TN

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?

Comment on Add Calendar Feed - GMail made Apr 24, 2007:

warius

Omarz:

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

Can someone confirm this?

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

Tracy McKibben

Thanks omarz, that worked.

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

omarz

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.

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

omarz

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!

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

rich5813

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

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

rich5813

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

Comment on Add Calendar Feed - GMail made Apr 23, 2007:

omarz

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.

Comment on Add Calendar Feed - GMail made Apr 22, 2007:

Brip

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

Comment on Add Calendar Feed - GMail made Apr 21, 2007:

warius

I would also love a fix for this...

Anyone?