From 707ece8e5b4eeeb7967f7802dec53f2ba75a3757 Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Wed, 21 Dec 2022 00:54:11 +0200 Subject: Add no Phones page --- rannak/kaart/js/kaart.js | 7 ++++++- rannak/mangud/uliopilane/tSark/index.html | 5 ++--- rannak/noMobiles/index.html | 24 ++++++++++++++++++++++++ rannak/noMobiles/style.css | 28 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 rannak/noMobiles/index.html create mode 100644 rannak/noMobiles/style.css diff --git a/rannak/kaart/js/kaart.js b/rannak/kaart/js/kaart.js index 4bb0afe..5183643 100644 --- a/rannak/kaart/js/kaart.js +++ b/rannak/kaart/js/kaart.js @@ -26,5 +26,10 @@ for (let i = 0; i < riigid.length; i++){ function moveOnEnable(){ const btn = document.querySelector(".moveOn"); btn.disabled = false; - btn.onclick = () => location.href = "../rolliValik"; + + if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) { + btn.onclick = () => location.href = "../noMobiles"; + } + else + btn.onclick = () => location.href = "../rolliValik"; } diff --git a/rannak/mangud/uliopilane/tSark/index.html b/rannak/mangud/uliopilane/tSark/index.html index dc2aafb..2206025 100644 --- a/rannak/mangud/uliopilane/tSark/index.html +++ b/rannak/mangud/uliopilane/tSark/index.html @@ -27,7 +27,7 @@