From 2e1bb649248ce177fc1a4ea7c7c7c4745dc30a5a Mon Sep 17 00:00:00 2001 From: roundcube Date: Mon, 1 May 2006 16:27:19 +0000 Subject: Started integrating GoogieSpell git-svn-id: https://svn.roundcube.net/trunk@214 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/common.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'roundcubemail/program/js/common.js') diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 8378e2e57..6cc279534 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/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 -- cgit v1.2.3