summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-05-01 16:27:19 +0000
committerthomascube <thomas@roundcube.net>2006-05-01 16:27:19 +0000
commitdd53e2b489e8787bb339511e33f2d6c4fd5efe3f (patch)
tree59100ce9248efa611c05157aaab4d558cac544bb /program/js/common.js
parentfecb03f44a3a2c3dace7d17eebebbb787a9042e3 (diff)
Started integrating GoogieSpell
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 8378e2e57..6cc279534 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -363,5 +363,36 @@ function rcube_get_object_pos(obj)
return {x:iX, y:iY};
}
+
+
+// cookie functions by GoogieSpell
+function setCookie(name, value, expires, path, domain, secure)
+ {
+ var curCookie = name + "=" + escape(value) +
+ (expires ? "; expires=" + expires.toGMTString() : "") +
+ (path ? "; path=" + path : "") +
+ (domain ? "; domain=" + domain : "") +
+ (secure ? "; secure" : "");
+ document.cookie = curCookie;
+ }
+
+function getCookie(name)
+ {
+ var dc = document.cookie;
+ var prefix = name + "=";
+ var begin = dc.indexOf("; " + prefix);
+ if (begin == -1)
+ {
+ begin = dc.indexOf(prefix);
+ if (begin != 0) return null;
+ }
+ else
+ begin += 2;
+ var end = document.cookie.indexOf(";", begin);
+ if (end == -1)
+ end = dc.length;
+ return unescape(dc.substring(begin + prefix.length, end));
+ }
+
var bw = new roundcube_browser(); \ No newline at end of file