mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 09:15:16 +00:00
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.
This commit is contained in:
+1
-1
@@ -272,7 +272,7 @@ async function loadApp() {
|
|||||||
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||||
const isAndroid = /Android/.test(navigator.userAgent);
|
const isAndroid = /Android/.test(navigator.userAgent);
|
||||||
if (isIos || isAndroid) {
|
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/";
|
window.location = "mobile_guide/";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {getVectorConfig} from '../getconfig';
|
|||||||
|
|
||||||
function onBackToRiotClick() {
|
function onBackToRiotClick() {
|
||||||
// Cookie should expire in 4 hours
|
// 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 = '../';
|
window.location.href = '../';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user