diff --git a/crossdomain.php b/crossdomain.php index ab857c8f3..835728e03 100644 --- a/crossdomain.php +++ b/crossdomain.php @@ -102,7 +102,7 @@ if (isset($PokemonServers[$config['host']])) { }; if (/**(!message.teams && !message.prefs) ||**/ $.cookie('showdown_ssl')) { // use the https origin storage - $.cookie('showdown_ssl', 1, {expires: 14}); + $.cookie('showdown_ssl', 1, {expires: 365*3}); return executeRedirect(); } // copy the existing http storage over to the https origin @@ -113,7 +113,7 @@ if (isset($PokemonServers[$config['host']])) { if (e.data === 'init') { e.source.postMessage($.toJSON(message), origin); } else if (e.data === 'done') { - $.cookie('showdown_ssl', 1, {expires: 14}); + $.cookie('showdown_ssl', 1, {expires: 365*3}); localStorage.clear(); return executeRedirect(); } diff --git a/js/sim.js b/js/sim.js index b5d8e8179..ce29b63f0 100644 --- a/js/sim.js +++ b/js/sim.js @@ -3786,7 +3786,7 @@ teams = (function() { } else if ((!teams.length && !Object.keys(Tools.prefs.data).length) || $.cookie('showdown_ssl')) { // use the https domain - $.cookie('showdown_ssl', 1, {expires: 14}); + $.cookie('showdown_ssl', 1, {expires: 365*3}); return document.location.replace('https://' + document.location.hostname + document.location.pathname); } else if (window.postMessage) { @@ -3801,7 +3801,7 @@ teams = (function() { prefs: $.toJSON(Tools.prefs.data) }), origin); } else if (e.data === 'done') { - $.cookie('showdown_ssl', 1, {expires: 14}); + $.cookie('showdown_ssl', 1, {expires: 365*3}); localStorage.clear(); return document.location.replace('https://' + document.location.hostname + document.location.pathname);