Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
GCal Event Color Codes
Color codes GCal events using tags and get time summaries by tag. (Allows multiple colors on one calendar)
This script creates an expandable box between the month and the calendar list on the left side. Clicking the button on this box toggles the display between a user selected color coding, based on tags in the event title, and the default Gcal, per calendar, color coding. The script searches for events the contain a tag such as "!fun" or "!work" and colors the event based on the table of colors defined in the script. (Tags are indicated by a leading "!" or "#", as indicated by the script menu option) You can also define subtags, which are key words which map to a tag if no tag is explicitly specified. (eg. "dinner" and "lunch" might be subtags of "!food" so you don't have to type the tag every time you create an event labeled "dinner".)
The default tags defined are just the author's personal categories; you can easily modify the list with your own preferred tags and colors by editing the colors array at the top of the script.
The format is: [tag,border color,body color, [subtag1, subtag2,...]]
Ex:
["travel","rgb(108,148,118)","rgb(148,188,158)", ["trip","flight"]]
Clicking the arrow on the box expands the box to show a list of your tags and the time (in hours) for each tag on the calendar.


Updates
06/22/08 - Fixed to support updated GCal source
05/28/08 - Added Time summarization by tag and "subtags",Fixed to support updated GCal source
04/02/08 - Fixed to support updated GCal source
02/19/08 - Fixed to support updated GCal source
01/12/08 - Refactored code and made on/off state persistent on refresh
12/28/07 - Fixed to support updated GCal source
11/11/07 - Fixed to support updated GCal source, added support for all day events
10/24/07 - Fixed to support updated GCal source
09/23/07 - Refactored code and added menu option to choose "!" or "#" as the tag prefix
09/09/07 - Fixed to support updated GCal source
16/07/07 - Fixed refresh bug
15/07/07 - Fixed to support updated GCal source
23/06/07 - Added support for gcal over SSL
|
|
Hi I just discovered this mod and its exactly what I need. does this nolonger work? (I installed greasemonkey + this script and nothing has changed) |
|
|
@jesa: month view uses a different page structure from daily and weekly views, so for now the script ignores month view. If it's something people would really like to see I could work on supporting it. |
|
|
This script is exactly what I was looking for - thanks. I'm wondering though if it should work for the month view - I can only get it to work for the weekly view. Thanks |
|
|
Thanks Dogwalker. Sorry to anyone who was waiting for a long time for me to get in the change. Every time google updates their javascript, the funtion name changes, breaking the script. @bobielawlintine: The recent security update for greasemonkey broke my system for storing your prefrences over a refresh. I'll try to get a fix in soon, but for now you can open about:config and change the value of the key with a name like this:
|
|
|
Update the Code urself: Open the Code
2. Choose Gcal Event Color Codes
It should be
|
|
|
#Using Bugmenot account! Nice script, i wonder why its not keeping my preference to keep it always On!
|
|
|
Nope, no luck. Changing the include pattern does not make it work for me. Bummer! |
|
|
@CyberCPA: you might double check that the @include patterns match the url for your google calendar. I may not have gotten them all. |
|
|
thanks, works like a charme :) |
|
|
I have never been able to get this to work with any events, all day or otherwise. I have tried changing the # and ! characters without any results whatsoever. The calendar still shows events in the default calendar color. I run no other GreaseMonkey scripts with Calendar, so I know it's not a script conflict. I am using the secure connection w/ calendar. |
|
|
There, now all day events should color code just like regular events. Let me know how it works for you. |
|
|
I changed the script to support the new code again. All day events shouldn't be too hard to add, just need to search for a different set of divs. |
|
|
i wonder if it's possible to get the coloring working on the "all day" events, too? |
|
|
it's update time again, the function is called "fc" now |
|
|
Thanks a lot, great work :) Following your suggestion to crosslink I've uploaded a slightly modified version: |
|
|
Also, for those of you who want to know how to update the script yourself when google updates code, it's not too hard: - Get a copy of the big Google calender js file with most of the application code using firebug of the like. - Search the js file for '("eventowner")' space out the function containing the first hit. Looks something like this: function Wb(a){
- Replace the old 2 letter function name with the new function name in the insert and uninsert functions in the color-coding script. If that sounds like too much work, you can just wait until I post the fix, usually no longer than a few days. |
|
|
Posted a new version which works with the changes in google's code. Unfortunately, every time google posts a change to their source, their compiler changes all the function names, breaking my hooks which call the coloring code. I love any suggestions for ways to overcome this weakness in the current design. |
|
|
Script ceased to work a few days ago. Google must have changed something.
Xb = function(a){oldXb(a); color();}; needs some tweaking but I can't get it to work :-/ |
|
|
Hi Matthew, you can add a menu toggle as setting, so everybody can choose whether she prefers colored or uncolored view as default, and choose between # and !
|
|
|
Thanks for the comments.
|
|
|
I really missed that in gCal! Great work! |
|
|
Thanks, works great! I adjusted the script to use "#" instead of "!" as some people tend to use "!" in their descriptions and set the default to show the colored version without having to click the button on every page refresh. |
You could comment on this script if you were logged in.
