Redirect to instructions page if user on mobile

This commit is contained in:
David Baker 2017-10-27 19:08:35 +01:00
parent b9e2b59504
commit 5063fef4f5
1 changed files with 8 additions and 4 deletions

View File

@ -250,16 +250,20 @@ async function loadApp() {
if (!preventRedirect) { if (!preventRedirect) {
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) { 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"; window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
return; return;
} }*/
} }
else if (/Android/.test(navigator.userAgent)) { 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"; window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
return; return;
} }*/
} }
} }