From b72ae197e55077842184696981f6ca53e668a452 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 3 Apr 2019 18:11:25 -0600 Subject: [PATCH] Use a different cookie to expire any cookies people may already have We also check for a specific value in case people set it to `true` for some reason. --- src/vector/index.js | 2 +- src/vector/mobile_guide/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 6a70b767..9d5c1dd4 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -272,7 +272,7 @@ async function loadApp() { const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; const isAndroid = /Android/.test(navigator.userAgent); if (isIos || isAndroid) { - if (!document.cookie.split(';').some((c) => c.startsWith('mobile_redirect_to_guide'))) { + if (document.cookie.indexOf("riot_mobile_redirect_to_guide=false") === -1) { window.location = "mobile_guide/"; return; } diff --git a/src/vector/mobile_guide/index.js b/src/vector/mobile_guide/index.js index b3cbff14..342643b4 100644 --- a/src/vector/mobile_guide/index.js +++ b/src/vector/mobile_guide/index.js @@ -2,7 +2,7 @@ import {getVectorConfig} from '../getconfig'; function onBackToRiotClick() { // Cookie should expire in 4 hours - document.cookie = 'mobile_redirect_to_guide=false;path=/;max-age=14400'; + document.cookie = 'riot_mobile_redirect_to_guide=false;path=/;max-age=14400'; window.location.href = '../'; }