From 714e86a53c978d4320be6483485ad9cba435f245 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Wed, 27 Nov 2013 17:45:28 +0100 Subject: [PATCH] set cookie path and date --- uhr.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uhr.js b/uhr.js index c9dec18..6a9bf8d 100644 --- a/uhr.js +++ b/uhr.js @@ -50,7 +50,7 @@ Uhr.prototype.start = function() { var uhr = this; this.timer = window.setInterval(function() {uhr.update();}, 1000); this.update(); - $.cookie('status', 'on'); + $.cookie('status', 'on', {expires: 365, path: '/'}); } } Uhr.prototype.stop = function() { @@ -58,7 +58,7 @@ Uhr.prototype.stop = function() { window.clearInterval(this.timer); this.timer = null; this.update(); - $.cookie('status', 'off'); + $.cookie('status', 'off', {expires: 365, path: '/'}); } } Uhr.prototype.isOn = function() { @@ -70,14 +70,14 @@ Uhr.prototype.setLayout = function(locale) { this.currentLayout = newLayout; var renderer = new UhrRenderer(this.currentLayout, this.letterarea); renderer.render(this); - $.cookie('layout', locale); + $.cookie('layout', locale, {expires: 365, path: '/'}); } } Uhr.prototype.setTheme = function(theme) { if (theme != this.currentTheme) { this.currentTheme = theme; this.themeElement.attr('href', 'uhr-' + theme + '.css'); - $.cookie('theme', theme); + $.cookie('theme', theme, {expires: 365, path: '/'}); } } Uhr.prototype.update = function() {