jparise / evite-gcal (http://userscripts.org/scripts/show/39460)
A Greasemonkey script that replaces the Outlook Calendar link in Evite invitations with a Google Calendar link.
Clone this repository (size: 7.6 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/jparise/evite-gcal/
| commit 1: | 556683b12b36 |
| parent 0: | cf09887a2a64 |
| branch: | default |
We now generically replace any existing calendar link.
It appears that Outlook Calendar links are the default when using a Windows
browser, and iCal Calendar links are used when browsing from a Mac.
Changed (Δ12 bytes):
raw changeset »
evite-gcal.user.js (5 lines added, 5 lines removed)
Up to file-list evite-gcal.user.js:
1 |
1 |
// ==UserScript== |
2 |
2 |
// @name Google Calendar from Evite |
3 |
3 |
// @namespace http://www.indelible.org/ |
4 |
// @description Replaces the |
|
4 |
// @description Replaces the default calendar link in Evite invitations with a Google Calendar link instead. |
|
5 |
5 |
// @author Jon Parise |
6 |
// @version 1. |
|
6 |
// @version 1.1 |
|
7 |
7 |
// @include http://www.evite.com/pages/invite/* |
8 |
8 |
// ==/UserScript== |
9 |
9 |
|
| … | … | @@ -144,11 +144,11 @@ function makeGoogleCalendarLink() |
144 |
144 |
'&trp=true&sprop=website:www.evite.com&sprop=name:Evite'; |
145 |
145 |
} |
146 |
146 |
|
147 |
// Find the Outlook Calendar link element. |
|
148 |
var outlookRE = /Outlook/; |
|
147 |
// Find the exsting calendar link element. |
|
148 |
var calendarRE = /Calendar/; |
|
149 |
149 |
var link, links = document.getElementsByTagName('a'); |
150 |
150 |
for (var i = 0; i < links.length; ++i) { |
151 |
if ( |
|
151 |
if (calendarRE.test(links[i].innerHTML)) { |
|
152 |
152 |
link = links[i]; |
153 |
153 |
break; |
154 |
154 |
} |
