From b9142a0452dfe7c69556e6b52c6085fcbda179d1 Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 9 Nov 2018 13:47:33 +0100 Subject: [PATCH] Add domain parameter to theme cookie --- tildes/static/js/behaviors/theme-selector.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tildes/static/js/behaviors/theme-selector.js b/tildes/static/js/behaviors/theme-selector.js index 53d70ec..55aa050 100644 --- a/tildes/static/js/behaviors/theme-selector.js +++ b/tildes/static/js/behaviors/theme-selector.js @@ -14,7 +14,8 @@ $.onmount('[data-js-theme-selector]', function() { // persist the new theme for the user in their cookie document.cookie = 'theme=' + new_theme + ';' + - 'path=/;max-age=315360000;secure'; + 'path=/;max-age=315360000;secure;domain=' + + document.location.hostname; // remove any theme classes currently on the body $body = $('body').first();