<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Discussion on GMail - GTD Tickler | Userscripts.org</title>
    <link>http://userscripts.org/scripts/show/7676</link>
    <description>Recent comments on userscript: GMail - GTD Tickler</description>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Google Apps - How to get this to work, replied by Nathan Sudds</title>
      <description>&lt;p&gt;I would love to use this with Google Apps too -- hope someone has a solution&lt;/p&gt;</description>
      <pubDate>Sun, 26 Apr 2009 15:33:30 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:19797:114963</guid>
      <author>Nathan Sudds</author>
      <link>http://userscripts.org/posts/114963</link>
    </item>
    <item>
      <title>Google Apps - How to get this to work, replied by Alec Satin</title>
      <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Has anyone had success getting this to work with Google Apps for Domains?  &lt;/p&gt;

&lt;p&gt;Currently it pops up the prompt with the (;) hotkey, but will not add to the calendar.  Selecting the &quot;Edit details&quot; option will bring up the calendar, but with ??? filled in to all the details.&lt;/p&gt;

&lt;p&gt;Looks like an excellent script.  Would love to use it.&lt;/p&gt;

&lt;p&gt;Thanks for any help with this.
&lt;br /&gt;Alec&lt;/p&gt;</description>
      <pubDate>Wed, 31 Dec 2008 16:58:51 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:19797:87219</guid>
      <author>Alec Satin</author>
      <link>http://userscripts.org/posts/87219</link>
    </item>
    <item>
      <title>Archived Comments, replied by Derek C</title>
      <description>&lt;p&gt;It would probably help if I had a better understanding of how Gmail, Gcal, and Google Apps worked.  It would also be easier if I knew how to code javascript, but still I've made the most progress towards making the tickler Gapps-friendly.&lt;/p&gt;

&lt;p&gt;I think the problem is how the script recognizes times and dates through the Gapps interface in comparison to the Gmail interface.  I'm still getting the &quot;tickle me error - invalid date or time&quot; message.&lt;/p&gt;

&lt;p&gt;Also, when I click on &quot;Edit Event Details&quot; in the Gmail tickler, it opens up the popup window and fills the title and the description, but the dates range from ??/??/???? to ??/??/????, regardless of what date I entered in the original tickler bubble.&lt;/p&gt;

&lt;p&gt;Any ideas?&lt;/p&gt;</description>
      <pubDate>Thu, 25 Sep 2008 16:06:24 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59192</guid>
      <author>Derek C</author>
      <link>http://userscripts.org/posts/59192</link>
    </item>
    <item>
      <title>Archived Comments, replied by Derek C</title>
      <description>&lt;p&gt;Okay, I've made some progress in 5 minutes.  At the links for schema.google.com/g, replace the &quot;g&quot; with &quot;apps&quot; and it will give you another error.&lt;/p&gt;

&lt;p&gt;Now it's telling me &quot;tickle me error; invalid date or time.&quot;&lt;/p&gt;

&lt;p&gt;At least it's communicating now.  It just can't understand anything.  I really want this to work with Google Apps.&lt;/p&gt;</description>
      <pubDate>Thu, 25 Sep 2008 06:33:13 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59193</guid>
      <author>Derek C</author>
      <link>http://userscripts.org/posts/59193</link>
    </item>
    <item>
      <title>Archived Comments, replied by Derek C</title>
      <description>&lt;p&gt;For some reason, I need to have the tickler installed for Gmail Addons to work right.  I'm trying to adapt it to Google Apps, but I'm having some difficulties.&lt;/p&gt;

&lt;p&gt;Edit Event Details works so far, but Remind Me doesn't work so you always have to do it the long way.  Anybody know what schemas.google.com is, and if it differs between regular Google accounts and Google Apps accounts?  I think that's the only issue right now.&lt;/p&gt;

&lt;p&gt;Here's the semi-fix for Google Apps users:&lt;/p&gt;

&lt;p&gt;// ==UserScript==
&lt;br /&gt;// @name           GMail - GTD Tickler
&lt;br /&gt;// @author         Martin Ruiz
&lt;br /&gt;// @namespace      Martin Ruiz
&lt;br /&gt;// @description    Very Simple Ticker file functionality to GMail/GTDGMail using GCal
&lt;br /&gt;// @include        &lt;a href=&quot;http://mail.google.com/&quot;&gt;http://mail.google.com/&lt;/a&gt;*
&lt;br /&gt;// @include        &lt;a href=&quot;https://mail.google.com/&quot;&gt;https://mail.google.com/&lt;/a&gt;*
&lt;br /&gt;// ==/UserScript==
&lt;br /&gt;/*
&lt;br /&gt;   Author: Martin Ruiz&lt;/p&gt;

&lt;p&gt;   Credits:&lt;/p&gt;

&lt;p&gt;     - I adapted code from a lot of other scripts on userscripts...  lost track:)&lt;/p&gt;

&lt;p&gt;   Features:
&lt;br /&gt;     + Adds 'Tickle me' link for each message in message view.
&lt;br /&gt;     + Custom Popup for Quick Add and link to 'edit event details&gt;&gt;'
&lt;br /&gt;     + ';' shortcut key to popup 'Tickle Me' box. 
&lt;br /&gt;     + Quickly add 'When' you want to be reminded, just like GCal QuickAdd - otherwise -
&lt;br /&gt;     + Opens and Fills out GCal Template in separate window with link to original message.
&lt;br /&gt;     + Link in GCal reminder will open GMail message in a seperate window.&lt;/p&gt;

&lt;p&gt;   Tips:
&lt;br /&gt;     + Choose the color 'red' or some other bold color so that it clearly stands out.
&lt;br /&gt;     + Make your goals calendar public and have your friends track your goals too.&lt;/p&gt;

&lt;p&gt;   Bonus:
&lt;br /&gt;     + Also works with Drafts - In round about way. Draft and email, save, leave draft,
&lt;br /&gt;       come back to draft, then 'Tickle Me' 
&lt;br /&gt;       - Catch: only works with keyboard shortcut because 'Tickle Me' link does not appear 
&lt;br /&gt;         with draft.   &lt;/p&gt;

&lt;p&gt;   Todo:
&lt;br /&gt;     + Add 'Tickle Me' link when new msgs in thread appear.
&lt;br /&gt;     + When not in GMail - The highlighted text and current link are included in GCal details&lt;/p&gt;

&lt;p&gt;   Testing:
&lt;br /&gt;     + Works with Firefox 2.0 for PC with Greasemonkey&lt;/p&gt;

&lt;p&gt;   Version History:
&lt;br /&gt;       2.5 - 05.05.2008 - merge bug fixes by cbg3 
&lt;br /&gt;       2.4 - 03.26.2007 - Fix date issues
&lt;br /&gt;       2.3 - 11.12.2007 - Fixed for New GMail
&lt;br /&gt;       2.2 - 10.29.2007 - Bug fix - default reminders not being set
&lt;br /&gt;       2.1 - 10.23.2007 - Bug fix - disable shortcut in text areas
&lt;br /&gt;       2.0 - 09.01.2007 - Rewrite
&lt;br /&gt;                + Shortcut
&lt;br /&gt;                + Quick Add
&lt;br /&gt;*/
&lt;br /&gt;(function() {&lt;/p&gt;

&lt;p&gt;var gmail;
&lt;br /&gt;var DEBUG = false;
&lt;br /&gt;var p = null;
&lt;br /&gt;var Window;
&lt;br /&gt;var Document;&lt;/p&gt;

&lt;p&gt;window.addEventListener('load', function() {
&lt;br /&gt;	if (unsafeWindow.gmonkey) {
&lt;br /&gt;		unsafeWindow.gmonkey.load('1.0', main);
&lt;br /&gt;	}
&lt;br /&gt;}, true);&lt;/p&gt;

&lt;p&gt;function main(g) {&lt;/p&gt;

&lt;p&gt;	gmail = g;
&lt;br /&gt;	gmail.registerViewChangeCallback(runGTDTickler);&lt;/p&gt;

&lt;p&gt;	Document = gmail.getNavPaneElement().ownerDocument;
&lt;br /&gt;	Window = Document.defaultView;	
&lt;br /&gt;	p = new Prompt();
&lt;br /&gt;	setupShortcut();
&lt;br /&gt;	runGTDTickler();
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function runGTDTickler() {
&lt;br /&gt;	if (gmail.getActiveViewType() != 'cv') return;
&lt;br /&gt;	//gmail.getActiveViewElement().addEventListener(&quot;DOMNodeInserted&quot;, function() { insertDelegateLinks() }, false);
&lt;br /&gt;	insertDelegateLinks();
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function setupShortcut() // keyboard shortcut: &quot;;&quot;
&lt;br /&gt;{
&lt;br /&gt; 	Window.addEventListener('keyup', function(e) { 
&lt;br /&gt;		if (e.altKey || e.ctrlKey || e.metaKey) {
&lt;br /&gt;    			return false;
&lt;br /&gt;  		}  &lt;/p&gt;

&lt;p&gt;		if (e.keyCode!=59) return;
&lt;br /&gt;		if (p.isEditing()) return;&lt;/p&gt;

&lt;p&gt;		var element;
&lt;br /&gt;		if(e.target) element=e.target;
&lt;br /&gt;		else if(e.srcElement) element=e.srcElement;
&lt;br /&gt;		if(element.nodeType==3) element=element.parentNode;&lt;/p&gt;

&lt;p&gt;		if(element.tagName == 'INPUT' || 
&lt;br /&gt;			element.tagName == 'TEXTAREA') return;&lt;/p&gt;

&lt;p&gt;		if (e.keyCode==59) delegate(); 
&lt;br /&gt;	}, true);
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function addReminder(title,when,content) {
&lt;br /&gt;	when = parseWhen(when);
&lt;br /&gt;	gcalHttpRequestUnauthorized({
&lt;br /&gt;		method: 'GET',
&lt;br /&gt;		url: 'https://www.google.com/calendar/hosted/yourdomain.com/compose?ctext=myevent%20' + when,
&lt;br /&gt;		onComplete: function(detail) {
&lt;br /&gt;			var txt = detail.responseText;
&lt;br /&gt;			txt = txt.replace(/while\(1\)\;/ig,'');
&lt;br /&gt;			log(txt);
&lt;br /&gt;			var dates = eval('('+txt+')');
&lt;br /&gt;			var enddate;
&lt;br /&gt;			var startdate;
&lt;br /&gt;			var date;
&lt;br /&gt;			var from = dates[0][4];
&lt;br /&gt;			var to = dates[0][5];
&lt;br /&gt;			if (noDate(from) &amp;amp;&amp;amp; noDate(to) ) {
&lt;br /&gt;				alert('Tickle Me Error. Invalid date or time');
&lt;br /&gt;				return;
&lt;br /&gt;			}
&lt;br /&gt;			// some heuristics...
&lt;br /&gt;			if ( noDate(to) ) {
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(&quot;no to date&quot;);
&lt;br /&gt;			} else if ( noDate(from) ) {
&lt;br /&gt;				date = to;
&lt;br /&gt;				log(&quot;no from date&quot;);
&lt;br /&gt;			} else if ( containsToday(when) ) {
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(&quot;contains today&quot;);
&lt;br /&gt;			} else if ( containsTomorrow(when) ) {
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(&quot;contains tomorrow&quot;);
&lt;br /&gt;			} else if ( containsDay(when) &amp;amp;&amp;amp; !containsMonth(when) ) {//mon vs month
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(&quot;contains day but not month&quot;);
&lt;br /&gt;			} else if ( containsNext(when) ) {
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(&quot;contains next&quot;);
&lt;br /&gt;			} else if ( !isToday(from)) {
&lt;br /&gt;				date = from;
&lt;br /&gt;				log(from+' != '+today());
&lt;br /&gt;				log(&quot;from != today&quot;);
&lt;br /&gt;			} else {
&lt;br /&gt;				date = to;
&lt;br /&gt;				log(&quot;default date = to&quot;);
&lt;br /&gt;			}
&lt;br /&gt;			if (containsTime(when)) {
&lt;br /&gt;				startdate = enddate = formatDate(date)+formatTime(date);
&lt;br /&gt;			} else {
&lt;br /&gt;				startdate = formatDate(date);
&lt;br /&gt;			}
&lt;br /&gt;			log(startdate+' - '+enddate);
&lt;br /&gt;			addEvent(title, content, startdate, enddate);
&lt;br /&gt;		},
&lt;br /&gt;		onError: function(detail) {
&lt;br /&gt;			alert('Tickle Me Error. Invalid date or time.');
&lt;br /&gt;		}
&lt;br /&gt;	});
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function addEvent(title, content, startdate, enddate) {
&lt;br /&gt;	var data=
&lt;br /&gt;    		&quot;&amp;lt;entry&gt;&quot;+
&lt;br /&gt;    		&quot;  &amp;lt;category&gt;&quot;+
&lt;br /&gt;    		&quot;  &amp;lt;title&gt;&quot;+title+&quot;&amp;lt;/title&gt;&quot;+
&lt;br /&gt;    		(content?(&quot;&amp;lt;content&gt;&quot;+content+&quot;&amp;lt;/content&gt;&quot;):&quot;&quot;)+
&lt;br /&gt;    		&quot;  &amp;lt;gd:transparency&gt;&quot;+
&lt;br /&gt;    		&quot;  &quot;+
&lt;br /&gt;    		&quot;  &amp;lt;gd:eventstatus&gt;&quot;+
&lt;br /&gt;    		&quot;  &quot;+
&lt;br /&gt;    		&quot;  &amp;lt;gd:when&gt;&amp;lt;gd:reminder&gt;&quot;+
&lt;br /&gt;    		&quot;&quot;;
&lt;br /&gt;	log(data);
&lt;br /&gt;	gcalHttpRequestAuthorized({
&lt;br /&gt;		method: 'POST',
&lt;br /&gt;		url: &quot;https://www.google.com/calendar/hosted/yourdomain.com/feeds/default/private/full&quot;,
&lt;br /&gt;		data: data
&lt;br /&gt;	});
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function gcalHttpRequestAuthorized(params) {
&lt;br /&gt;	gcalHttpRequestUnauthorized({
&lt;br /&gt;		method: 'POST',
&lt;br /&gt;		data: '',
&lt;br /&gt;		url: &quot;http://www.google.com/calendar/hosted/yourdomain.com/render&quot;,
&lt;br /&gt;		onComplete: function (detail) {
&lt;br /&gt;			var token;
&lt;br /&gt;			try {
&lt;br /&gt;  				detail.responseHeaders.match(/CAL=([^;]+)/);
&lt;br /&gt;  				token= RegExp.$1;
&lt;br /&gt;				if (!params.headers) params['headers'] = {};
&lt;br /&gt;				params['headers']['Authorization'] = &quot;GoogleLogin auth=&quot;+token;
&lt;br /&gt;				gcalHttpRequestUnauthorized(params);
&lt;br /&gt;			} catch (e) {}
&lt;br /&gt;			if (!token) { alert('You may not be logged into GCal. Try again later.'); return;}
&lt;br /&gt;		},
&lt;br /&gt;		onError: function (detail) {
&lt;br /&gt;			alert('Tickle Me Error. You may not be logged into GCal.');
&lt;br /&gt;		}
&lt;br /&gt;	});
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function gcalHttpRequestUnauthorized(params) {
&lt;br /&gt;	log('params\n'+requestToString(params)+'/params');
&lt;br /&gt;	var r = {headers:{}};&lt;/p&gt;

&lt;p&gt;	r.method = params.method;&lt;/p&gt;

&lt;p&gt;	r.headers = (params.headers?params.headers:{});&lt;/p&gt;

&lt;p&gt;	r.headers[&quot;Content-Type&quot;] = &quot;application/atom+xml&quot;;
&lt;br /&gt;	if (params.data) {
&lt;br /&gt;		r.headers['Content-length'] = params.data.length;
&lt;br /&gt;		r.data = params.data;
&lt;br /&gt;	} else {
&lt;br /&gt;		r.headers['Content-length'] = 0;
&lt;br /&gt;	}&lt;/p&gt;

&lt;p&gt;	r.url = params.url;&lt;/p&gt;

&lt;p&gt;	r.onload = function(detail) {
&lt;br /&gt;      			if (detail.status == 200 || detail.status == 201) {
&lt;br /&gt;        			if(params.onComplete) params.onComplete(detail);
&lt;br /&gt;      			} else {
&lt;br /&gt;				if (params.onError) params.onError(detail);
&lt;br /&gt;        			error(&quot;HTTP request failed2&quot;, detail);
&lt;br /&gt;      			}
&lt;br /&gt;    		   }&lt;/p&gt;

&lt;p&gt;	r.onerror = function(detail) {
&lt;br /&gt;			if (params.onError) params.onError(detail);
&lt;br /&gt;      			error(&quot;HTTP request failed&quot;, detail);
&lt;br /&gt;		   }
&lt;br /&gt;	
&lt;br /&gt;	log('req\n'+requestToString(r)+'/req');&lt;/p&gt;

&lt;p&gt;  	GM_xmlhttpRequest(r);
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function requestToString(r) {
&lt;br /&gt;	var s='';
&lt;br /&gt;	for (var i in r) {
&lt;br /&gt;		s = s + i + &quot;: &quot;+
&lt;br /&gt;		(i=='headers'?requestToString(r[i]):r[i]) + &quot;\n&quot;;
&lt;br /&gt;	}
&lt;br /&gt;	return s;
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function parseWhen(when) {
&lt;br /&gt;	var w = String(when);&lt;/p&gt;

&lt;p&gt;	// support 'tomorrow' shortcut 'tom'
&lt;br /&gt;	w = w.replace(/^tom$/ig,&quot;tomorrow&quot;);&lt;/p&gt;

&lt;p&gt;	if (containsNext(w)) {
&lt;br /&gt;		if (!containsDay(w)) {
&lt;br /&gt;			// support 'next' instead of one
&lt;br /&gt;			w = w.replace(/next/ig,'one');
&lt;br /&gt;		}
&lt;br /&gt;	}
&lt;br /&gt;	return w;
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function get2Digits(x) {
&lt;br /&gt;	return (x&amp;lt;10&gt;&lt;br /&gt;}
&lt;br /&gt;function today()  {
&lt;br /&gt;  var date = &quot;yyyymmdd&quot;;
&lt;br /&gt;  var d = new Date();
&lt;br /&gt; 
&lt;br /&gt;  date = date.replace(/yyyy/i, d.getFullYear());
&lt;br /&gt;  date = date.replace(/mm/i, get2Digits(d.getMonth()+1));
&lt;br /&gt;  date = date.replace(/dd/i, get2Digits(d.getDate()));
&lt;br /&gt;  log('today is '+date);
&lt;br /&gt;  return date;
&lt;br /&gt;}
&lt;br /&gt;function isToday(d) { return (d==today()); }&lt;/p&gt;

&lt;p&gt;function noDate(date) {return (date.search(/^\?/ig) &gt; -1);}
&lt;br /&gt;function containsMonth(when) {return (when.search(/month/ig) &gt; -1);}
&lt;br /&gt;function containsTomorrow(when) {return (when.search(/tomorrow/ig) &gt; -1);}
&lt;br /&gt;function containsToday(when) {return (when.search(/(tod(ay)?)|(now)/ig) &gt; -1);}
&lt;br /&gt;function containsNext(when) {return (when.search(/next/ig) &gt; -1);}
&lt;br /&gt;function containsTime(when) {return (when.search(/\d{1,2}((pm|am)|(:\d{2}(am|pm)))/ig) &gt; -1);}
&lt;br /&gt;function containsDay(when)  {return (when.search(/(mon(day)?)|(tue(sday)?)|(wed(nesday)?)|(thu(rsday)?)|(fri(day)?)|(sat(urday)?)|(sun(day)?)/ig) &gt; -1);}
&lt;br /&gt;function formatTime(date) {
&lt;br /&gt;	var s = 'T00:00:00.000';//Z&lt;/p&gt;

&lt;p&gt;	if (date.length&gt;8) {
&lt;br /&gt;	s =	'T'+
&lt;br /&gt;		date.substr(9,2)+':'+
&lt;br /&gt;		date.substr(11,2)+':'+
&lt;br /&gt;		date.substr(13,2)+'.000';//Z
&lt;br /&gt;	}
&lt;br /&gt;	
&lt;br /&gt;	return s;
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function formatDate(date) {
&lt;br /&gt;	var s =	date.substr(0,4)+'-'+
&lt;br /&gt;		date.substr(4,2)+'-'+
&lt;br /&gt;		date.substr(6,2);&lt;/p&gt;

&lt;p&gt;	return s;
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function containsTime(when) {
&lt;br /&gt;	var t = /\d{1,2}((pm|am)|(:\d{2}(am|pm)))/ig;
&lt;br /&gt;	return (when.search(t)&gt;-1);
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function log(x) {
&lt;br /&gt;	if (!DEBUG) return;
&lt;br /&gt;	GM_log(x);
&lt;br /&gt;	return;
&lt;br /&gt;	if (unsafeWindow.console) {
&lt;br /&gt;      		unsafeWindow.console.log.apply(unsafeWindow.console,
&lt;br /&gt;                	                     Array.slice(arguments));
&lt;br /&gt;    	}
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function error(x,d) { log(x+&quot;\n&quot;+d.responseText); };&lt;/p&gt;

&lt;p&gt;function askWhen(callback) {&lt;/p&gt;

&lt;p&gt;	p.show(callback);
&lt;br /&gt;	return;&lt;/p&gt;

&lt;p&gt;	var when = prompt(&quot;When? eg. tomorrow, next week, friday at 4pm&quot;);
&lt;br /&gt;	if (callback &amp;amp;&amp;amp; when != null) callback(when);
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function editReminderDetails(url) {
&lt;br /&gt;	var nwin = Window.open(url,&quot;Tickle Me&quot;,'height=470,width=600,scrollbars=yes,menubar=no,toolbar=no,status=no');
&lt;br /&gt;	if (nwin.focus) {nwin.focus();}
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function processReminder(when, title, gmail_url, event_details_url) {
&lt;br /&gt;	if (when) {
&lt;br /&gt;		addReminder(title, when, gmail_url);
&lt;br /&gt;		return;
&lt;br /&gt;	}&lt;/p&gt;

&lt;p&gt;	if (when == null) return; // cancelled --- 'blank' is Okay, open event details&lt;/p&gt;

&lt;p&gt;	editReminderDetails(event_details_url);
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function delegate()
&lt;br /&gt;{
&lt;br /&gt;	var url = String(Window.top.location);
&lt;br /&gt;	var real_id = url.match(/#(.*)?\/(.*)/)[2];
&lt;br /&gt;	var title = Window.frames.content.document.title; var t=title;
&lt;br /&gt;	title = escape(t);
&lt;br /&gt;	//var gmail_url = 'http://mail.google.com/a/yourdomain.com/mail/?source=navclient-ff#inbox/'+real_id;
&lt;br /&gt;    	var gmail_url = &quot;http://mail.google.com/a/yourdomain.commail/?tf=1&amp;amp;fs=1&amp;amp;source=atom&amp;amp;view=cv&amp;amp;search=all&amp;amp;th=&quot; +  real_id;
&lt;br /&gt;	var event_details_url = &quot;http://www.google.com/calendar/hosted/yourdomain.com/event?action=TEMPLATE&amp;amp;text=&quot; + title + &quot;&amp;amp;details=&quot; + escape(gmail_url);&lt;/p&gt;

&lt;p&gt;	gmail_url = gmail_url.replace(/\&amp;amp;/ig,'&amp;amp;'); // replace ampersands
&lt;br /&gt; 
&lt;br /&gt;	askWhen(function(when) { processReminder(when, t, gmail_url, event_details_url); });		
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;function insertDelegateLinks() {
&lt;br /&gt;	var msgs = getMessages();&lt;/p&gt;

&lt;p&gt;	var msg_count = msgs.length;
&lt;br /&gt;	for(var id=0; id &amp;lt; msg_count; id++) {
&lt;br /&gt;		var msg = msgs[id];
&lt;br /&gt;		if(!Document.getElementById(&quot;remindme_&quot; + id)) {&lt;/p&gt;

&lt;p&gt;			var footerLink = document.createElement('div');
&lt;br /&gt;			footerLink.className = &quot;X5Xvu&quot;;
&lt;br /&gt;			footerLink.setAttribute(&quot;style&quot;,&quot;float: left;&quot;);
&lt;br /&gt;			footerLink.id = &quot;remindme_&quot; + id;
&lt;br /&gt;			footerLink.addEventListener(&quot;click&quot;,delegate,false);
&lt;br /&gt;		
&lt;br /&gt;			footerLink.innerHTML = '&lt;span&gt;Tickle Me&lt;/span&gt;';
&lt;br /&gt;		
&lt;br /&gt;			msg.appendChild(footerLink);
&lt;br /&gt;		}
&lt;br /&gt;	}
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;// customized popup window
&lt;br /&gt;function Prompt()
&lt;br /&gt;{
&lt;br /&gt;	var box = Document.getElementById('tickler_prompt');
&lt;br /&gt;	if (box) { p.show(); return this; }&lt;/p&gt;

&lt;p&gt;	var self = this;&lt;/p&gt;

&lt;p&gt;	this.callback = null;
&lt;br /&gt;	
&lt;br /&gt;	box = Document.createElement('div');
&lt;br /&gt;	box.setAttribute('id','tickler_prompt');
&lt;br /&gt;	box.style.zIndex = '101';&lt;/p&gt;

&lt;p&gt;	var overlay = Document.createElement('div');
&lt;br /&gt;	box.appendChild(overlay);
&lt;br /&gt;	overlay.setAttribute('style','display: none;position: fixed;width: 100%;height: 100%;top: 0px;left: 0px;background: #FFFFFF;filter: alpha(opacity=50);-moz-opacity: 0.5;opacity: 0.5;');&lt;/p&gt;

&lt;p&gt;	var container = Document.createElement('div');
&lt;br /&gt;	box.appendChild(container);
&lt;br /&gt;	container.setAttribute('style','display: none;position: fixed;width: 100%;height: 100%;top: 0px;left: 0px;background: transparent;');
&lt;br /&gt;	var inner = Document.createElement('div');
&lt;br /&gt;	container.appendChild(inner);
&lt;br /&gt;	inner.setAttribute('style','display: block;width: 325px;height: 131px;margin: 120px auto 0 auto;background: #FFFFFF;text-align: center;border: 2px solid rgb(171, 171, 171); -moz-border-radius: 25px;');	&lt;/p&gt;

&lt;p&gt;	inner.innerHTML= 
&lt;br /&gt;		'&lt;div&gt;'+
&lt;br /&gt;			'&lt;div&gt;&lt;div&gt;&lt;/div&gt;'+
&lt;br /&gt;				'&lt;img height=&quot;13&quot; width=&quot;14&quot;&gt;'+
&lt;br /&gt;			'&lt;/div&gt;'+
&lt;br /&gt;		'&lt;/div&gt;&lt;div&gt;&lt;/div&gt;'+
&lt;br /&gt;		'&lt;div&gt;'+
&lt;br /&gt;				'&lt;table&gt;&amp;lt;tbody&gt;'+
&lt;br /&gt;				'&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;'+
&lt;br /&gt;					'&lt;td&gt;When?&lt;/td&gt;'+
&lt;br /&gt;					'&lt;td&gt;'+
&lt;br /&gt;						'&amp;lt;input /&gt;'+
&lt;br /&gt;					'&lt;/td&gt;'+
&lt;br /&gt;					'&lt;td&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;'+
&lt;br /&gt;				'&lt;/tr&gt;'+
&lt;br /&gt;				'&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;'+
&lt;br /&gt;					'&lt;td&gt;e.g., tomorrow, next week, friday at 5pm&lt;/td&gt;'+
&lt;br /&gt;				'&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;'+
&lt;br /&gt;				'&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;'+
&lt;br /&gt;					'&lt;td&gt;&amp;lt;input /&gt;'+
&lt;br /&gt;						' '+ //need space 
&lt;br /&gt;						'&amp;lt;label&gt;edit event details &lt;strong&gt;&#172;&#170;&lt;/strong&gt;&amp;lt;/label&gt;'+
&lt;br /&gt;					'&lt;/td&gt;'+
&lt;br /&gt;				'&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;'+	
&lt;br /&gt;				'&amp;lt;/tbody&gt;&lt;/table&gt;'+
&lt;br /&gt;		'&lt;/div&gt;';&lt;/p&gt;

&lt;p&gt;	this.box = box;
&lt;br /&gt;	this.overlay = overlay;
&lt;br /&gt;	this.container = container;
&lt;br /&gt;	this.inner = inner;&lt;/p&gt;

&lt;p&gt;	this.isEditing = function() { return (this.box.style.display=='');}&lt;/p&gt;

&lt;p&gt;	this.hide = function() { this.box.style.display = this.overlay.style.display = this.container.style.display= 'none';}
&lt;br /&gt;	this.show = function(callback) {
&lt;br /&gt;		this.callback = callback;
&lt;br /&gt;		var when = Document.getElementById('tickler_when');
&lt;br /&gt;		this.box.style.display = this.overlay.style.display = this.container.style.display= '';
&lt;br /&gt;		when.value = '';
&lt;br /&gt;		when.focus();		
&lt;br /&gt;	}&lt;/p&gt;

&lt;p&gt;	this.hide();&lt;/p&gt;

&lt;p&gt;	Document.body.appendChild(box);
&lt;br /&gt;	
&lt;br /&gt;	// close button
&lt;br /&gt;	Document.getElementById('tickler_close_btn').addEventListener(&quot;mousedown&quot;, function() {  self.hide();}, false);
&lt;br /&gt;	// ok button - book reminder in gcal
&lt;br /&gt;	Document.getElementById('tickler_btn').addEventListener(&quot;click&quot;, 
&lt;br /&gt;		function() { 
&lt;br /&gt;			self.hide();
&lt;br /&gt;			var when = Document.getElementById('tickler_when').value;
&lt;br /&gt;			if(when) self.callback(when); 
&lt;br /&gt;		}, false);
&lt;br /&gt;	// goto to gcal details
&lt;br /&gt;	Document.getElementById('tickler_edit_details').addEventListener(&quot;mousedown&quot;, 
&lt;br /&gt;		function() { 
&lt;br /&gt;			self.hide();
&lt;br /&gt;			self.callback(&quot;&quot;); 
&lt;br /&gt;		}, false);
&lt;br /&gt;	// escape key
&lt;br /&gt;	//Document.getElementById('tickler_when').addEventListener(&quot;blur&quot;, function(e) { self.hide(); }, false);&lt;/p&gt;

&lt;p&gt;	// enter and submit
&lt;br /&gt;	Document.getElementById('tickler_when').addEventListener(&quot;keydown&quot;, 
&lt;br /&gt;		function(e) {
&lt;br /&gt;			if (e.keyCode == 27) self.hide();
&lt;br /&gt;		}, false);&lt;/p&gt;

&lt;p&gt;	Document.getElementById('tickler_when').addEventListener(&quot;keyup&quot;, 
&lt;br /&gt;		function(e) {
&lt;br /&gt;			if (e.keyCode == 13) {
&lt;br /&gt;				self.hide();
&lt;br /&gt;				self.callback((e.target.value.length&gt;0?e.target.value:null));
&lt;br /&gt;			}
&lt;br /&gt;		}, false);&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;function getMessages()
&lt;br /&gt;{
&lt;br /&gt;	var msgs = [];
&lt;br /&gt;	try {
&lt;br /&gt;		var iterator = gmail.getActiveViewElement().ownerDocument.evaluate(
&lt;br /&gt;			&quot;.//td[contains(concat(' ', @class, ' '), ' bEgJye ')]&quot;,
&lt;br /&gt;			gmail.getActiveViewElement(),
&lt;br /&gt;			null,
&lt;br /&gt;			XPathResult.ORDERED_NODE_ITERATOR_TYPE,
&lt;br /&gt;			null);
&lt;br /&gt;	} catch(e) { return null; }
&lt;br /&gt;	for (var msg = iterator.iterateNext(); msg; msg = iterator.iterateNext()) {
&lt;br /&gt;		msgs.push(msg);
&lt;br /&gt;	}&lt;/p&gt;

&lt;p&gt;	return msgs;
&lt;br /&gt;}&lt;/p&gt;

&lt;p&gt;})();&lt;/p&gt;

&lt;p&gt;----------&lt;/p&gt;

&lt;p&gt;Comment if you're able to get it to work perfectly, and I'll do the same if I beat you to it.&amp;lt;/gd:reminder&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 25 Sep 2008 06:17:47 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59194</guid>
      <author>Derek C</author>
      <link>http://userscripts.org/posts/59194</link>
    </item>
    <item>
      <title>Archived Comments, replied by veganjay</title>
      <description>&lt;p&gt;Please disregard my previous comment - I did not realize GCal has default reminders!
&lt;br /&gt;Google Calendar -&gt; Settings -&gt; Calendars -&gt; Notifications -&gt; Event Reminders -&gt; default
&lt;br /&gt;This is working great now!  Thanks!&lt;/p&gt;</description>
      <pubDate>Sun, 11 May 2008 06:32:24 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59195</guid>
      <author>veganjay</author>
      <link>http://userscripts.org/posts/59195</link>
    </item>
    <item>
      <title>Archived Comments, replied by veganjay</title>
      <description>&lt;p&gt;Nice add-on!  I've been looking for something like this.  Would it be possible to add a check-box for &quot;Reminder&quot; on the initial pop-up instead of going to &quot;Edit event details&quot;?
&lt;br /&gt;Thanks!&lt;/p&gt;</description>
      <pubDate>Sun, 11 May 2008 05:53:24 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59196</guid>
      <author>veganjay</author>
      <link>http://userscripts.org/posts/59196</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Nikolaev</title>
      <description>&lt;p&gt;And also would be great if we could use this with Google Apps.
&lt;br /&gt;Thanks for a great tool.&lt;/p&gt;</description>
      <pubDate>Thu, 08 May 2008 14:39:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59197</guid>
      <author>Tim Nikolaev</author>
      <link>http://userscripts.org/posts/59197</link>
    </item>
    <item>
      <title>Archived Comments, replied by emptyowe</title>
      <description>&lt;p&gt;It would be great if the initial popup allowed one to select which calendar to post into. Or if one could specify the default calendar to post tickles to.&lt;/p&gt;</description>
      <pubDate>Tue, 06 May 2008 18:59:38 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59198</guid>
      <author>emptyowe</author>
      <link>http://userscripts.org/posts/59198</link>
    </item>
    <item>
      <title>Archived Comments, replied by Britonius</title>
      <description>&lt;p&gt;Thanks Ruiz.  I look forward to your findings on testing FF3b5.  I would also love to see this work with the GreaseKit Simbl plugin for Safari on Mac.  Know how to do that or know a Mac script dev who could help make it compatible for the Safari browser as well?&lt;/p&gt;</description>
      <pubDate>Mon, 05 May 2008 20:29:25 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59199</guid>
      <author>Britonius</author>
      <link>http://userscripts.org/posts/59199</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;@cbg3 thanks for the bug fixes.  I've merged them into the script.  We all appreciate you looking at it.&lt;/p&gt;</description>
      <pubDate>Mon, 05 May 2008 20:15:32 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59200</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59200</link>
    </item>
    <item>
      <title>Archived Comments, replied by cbg3</title>
      <description>&lt;p&gt;Firebug says that containsMonth is undefined. This seems to prevent the script from adding anything to Google Calendar. But once the containsMonth function is added, the script works. (BTW, the definition of Tuesday in the containsDay function needs to be tweaked from (tue(day)?) to (tue(sday)?)&lt;/p&gt;</description>
      <pubDate>Sun, 04 May 2008 21:57:46 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59201</guid>
      <author>cbg3</author>
      <link>http://userscripts.org/posts/59201</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;I've never tested with FF3b5.  I'll try it.&lt;/p&gt;</description>
      <pubDate>Sat, 03 May 2008 18:05:17 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59202</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59202</link>
    </item>
    <item>
      <title>Archived Comments, replied by Britonius</title>
      <description>&lt;p&gt;I added this to Firefox 3b5 and I am not seeing anything.  I also use Folders4Gmail, GmailAgenda &amp;amp; Goolge Account Multi-Login.  I have also tried this in Safari via the GreaseKit plugin and still nothing.&lt;/p&gt;</description>
      <pubDate>Thu, 01 May 2008 16:50:20 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59203</guid>
      <author>Britonius</author>
      <link>http://userscripts.org/posts/59203</link>
    </item>
    <item>
      <title>Archived Comments, replied by Big Jon Roberts</title>
      <description>&lt;p&gt;I want to second Nathan Sudds - request - it would be great if this worked with Google Apps email accounts as well.&lt;/p&gt;</description>
      <pubDate>Wed, 02 Apr 2008 19:26:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59204</guid>
      <author>Big Jon Roberts</author>
      <link>http://userscripts.org/posts/59204</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;@MySaturdaySelf just fixed some of the date issues.&lt;/p&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:58:10 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59205</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59205</link>
    </item>
    <item>
      <title>Archived Comments, replied by MySaturdaySelf</title>
      <description>&lt;p&gt;The script does not recognize the date now. I don't know why. Before it works ok, now it only accepts tomorrow as date. Any other dates listed in the Gcal quick add don't work.&lt;/p&gt;</description>
      <pubDate>Sun, 23 Mar 2008 04:44:09 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59206</guid>
      <author>MySaturdaySelf</author>
      <link>http://userscripts.org/posts/59206</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;@Kate2174 Will try:)&lt;/p&gt;</description>
      <pubDate>Mon, 17 Mar 2008 01:42:00 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59207</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59207</link>
    </item>
    <item>
      <title>Archived Comments, replied by Kate2174</title>
      <description>&lt;p&gt;This is EXACTLY the tool I've been searching for, but I'm having the same problem from my private domain Google Apps Gmail as &quot;Master Scott&quot; (see 03/16/08 posting below).  Hopefully, this can be resolved soon.  Thanks!&lt;/p&gt;</description>
      <pubDate>Sun, 16 Mar 2008 16:31:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59208</guid>
      <author>Kate2174</author>
      <link>http://userscripts.org/posts/59208</link>
    </item>
    <item>
      <title>Archived Comments, replied by Master Scott</title>
      <description>&lt;p&gt;I read the previous post about this, but am unclear as to the solution, or if there is one.&lt;/p&gt;

&lt;p&gt;I'm using this in my custom domain Google Apps Gmail account. When I click the 'Tickle Me' link, it works like a charm, but, it defaults back to my @gmail.com calendar, not the @mydomain.com Gmail/cal account that I am sending from. Is this fixable on my end? If not, I'd like to request it. Thanks&lt;/p&gt;

&lt;p&gt;FYI: My account does have Gmail 2 new features enabled. I have GTDInbox installed.&lt;/p&gt;</description>
      <pubDate>Sun, 16 Mar 2008 09:57:52 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59209</guid>
      <author>Master Scott</author>
      <link>http://userscripts.org/posts/59209</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;@Tim Nikolaev almost got it working with google apps.  It needs a few tweaks.  Hopefully, I'll have a working version shortly.&lt;/p&gt;</description>
      <pubDate>Fri, 15 Feb 2008 13:58:48 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59210</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59210</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tim Nikolaev</title>
      <description>&lt;p&gt;Google Apps is easily upgradable to Gmail 2.0.
&lt;br /&gt;It is under Domain Setting - General Tab:
&lt;br /&gt;Checkmark this: &quot;Turn on new application features to my domain before they are rolled out to all Google Apps customers&quot;&lt;/p&gt;

&lt;p&gt;This is an awesome script and it would be great if it worked with Goggle Apps + Gmail 2.0&lt;/p&gt;</description>
      <pubDate>Thu, 14 Feb 2008 17:12:19 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59211</guid>
      <author>Tim Nikolaev</author>
      <link>http://userscripts.org/posts/59211</link>
    </item>
    <item>
      <title>Archived Comments, replied by ruiz</title>
      <description>&lt;p&gt;@Nathan Sudds - Unfortunately, it appears that Google Apps uses the old version of GMail.  The script is incompatible with the old version.  I'll have to investigate some more.&lt;/p&gt;</description>
      <pubDate>Thu, 31 Jan 2008 02:10:46 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59212</guid>
      <author>ruiz</author>
      <link>http://userscripts.org/posts/59212</link>
    </item>
    <item>
      <title>Archived Comments, replied by Nathan Sudds</title>
      <description>&lt;p&gt;I love this idea, I'm using Google Apps, just wondering how hard it would be to adapt to Google Apps or if it's working already.&lt;/p&gt;

&lt;p&gt;I've tried it but doesn't seem to add to my calendar.&lt;/p&gt;

&lt;p&gt;Great script though -- oh and for those with Google Apps that mentioned the &quot;new code not updated yet&quot; if you are the administrator or can get them to change the setting in Manage This Domain -- In Domain Settings... Turn on new application features to my domain before they are rolled out to all Google Apps customers.&quot;&lt;/p&gt;

&lt;p&gt;Here's the link to the instructionss:
&lt;br /&gt;&lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?answer=46905&quot;&gt;http://www.google.com/support/a/bin/answer.py?a...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(sorry I hope this wouldn't be considered clogging  up the thread.)&lt;/p&gt;</description>
      <pubDate>Thu, 17 Jan 2008 19:52:05 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59213</guid>
      <author>Nathan Sudds</author>
      <link>http://userscripts.org/posts/59213</link>
    </item>
    <item>
      <title>Archived Comments, replied by rakess</title>
      <description>&lt;p&gt;thanks man it is greatly appreciated!!&lt;/p&gt;</description>
      <pubDate>Wed, 16 Jan 2008 07:05:38 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:14629:59214</guid>
      <author>rakess</author>
      <link>http://userscripts.org/posts/59214</link>
    </item>
  </channel>
</rss>
