// ==UserScript==
// @name           goolash
// @namespace      http://k0a1a.net/goolash
// @description    eat goulash, not cookies, for all the gmail afficts.
// @description    goolash keeps you logged out from google search pages. other services like gmail, maps, docs, etc work without bugging you to relogin. >> http://k0a1a.net/goolash << 
// @include        http://www.google.*
// @include 	    http://google.*
// ==/UserScript==

//alert('koala');


if (h=location.host.match(/\.google\.((off|com?)(\...)|..|com)$/)[0])
   {
	y='preferences';
//	regoff = /PREF.*\;$/m;
//	B=regoff(document.cookie);
//	C=B.split(";");
	C=document.cookie.split(";");
//	j=C.indexOf("PREF");
//	C.splice(j, 1);
//	alert(j);
//	alert(C);
//	alert(C.indexOf("PREF"));


		for(d="."+location.host;d;d=(""+d).substr(1).match(/\..*$/))
		for(sl=0;sl<2;++sl)
		for(p="/"+location.pathname;p;p=p.substring(0,p.lastIndexOf('/')))
		for(i in C)
			if(c=C[i]){
		document.cookie=c+"; domain="+d.slice(sl)+"; path="+p.slice(1)+"/"+"; expires="+new Date((new Date).getTime()-1e11).toGMTString()};

		document.cookie='PREF=ID=0000000000000000:LD=en:TM=1115409441:LM=1129104254:S=kSuablMgN8pP9-91;expires=Sun,17-Jan-2038 19:14:07 GMT;domain='+h;location='/'+y+'';

//alert('No_fucking_COOKIE_left!')
}
void(0)


