From 5063fef4f5de8c22c778710409f72006aa3a9748 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Oct 2017 19:08:35 +0100 Subject: [PATCH] Redirect to instructions page if user on mobile --- src/vector/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index f775d1b3..4a44cbdc 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -250,16 +250,20 @@ async function loadApp() { if (!preventRedirect) { if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { - if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) { + window.location = "https://status.im/join-riot.html"; + return; + /*if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) { window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067"; return; - } + }*/ } else if (/Android/.test(navigator.userAgent)) { - if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) { + window.location = "https://status.im/join-riot.html"; + return; + /*if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) { window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha"; return; - } + }*/ } }