diff options
| -rwxr-xr-x | static/index.html | 1 | ||||
| -rw-r--r-- | static/js/cookie.js | 7 | ||||
| -rw-r--r-- | template/head.st | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/static/index.html b/static/index.html index c4a7559..3b6e755 100755 --- a/static/index.html +++ b/static/index.html @@ -8,6 +8,7 @@ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/static/js/sha1.js"></script> <script type="text/javascript" src="/static/js/home.js"></script> +<script type="text/javascript" src="/static/js/cookie.js"></script> <script type="text/javascript" src="/static/js/jcarousellite_1.0.1.pack.js"></script> <script> $(document).ready(initLoginForm); diff --git a/static/js/cookie.js b/static/js/cookie.js new file mode 100644 index 0000000..a452dcf --- /dev/null +++ b/static/js/cookie.js @@ -0,0 +1,7 @@ +function deleteCookie(name) { + // Only deletes non-wildcard cookies + document.cookie = name + "=;expires=Thu, 01-Jan-1970 00:00:01 GMT"; +} + +deleteCookie('compojure-session'); +deleteCookie('login-token');
\ No newline at end of file diff --git a/template/head.st b/template/head.st index 7bd71ec..93088ab 100644 --- a/template/head.st +++ b/template/head.st @@ -5,6 +5,7 @@ <script type="text/javascript" src="/static/js/pichat.js"></script> <script type="text/javascript" src="/static/js/jquery-ui-1.8.effects.min.js"></script> <script type="text/javascript" src="/static/js/sha1.js"></script> +<script type="text/javascript" src="/static/js/cookie.js"></script> <link rel="stylesheet" type="text/css" href="/static/css/reset.css"> <link rel="stylesheet" type="text/css" href="/static/css/header.css"> $if(!user_nick)$ |
