summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorRasmus <rasmus.luha@gmail.com>2023-06-10 16:45:12 +0300
committerRasmus <rasmus.luha@gmail.com>2023-06-10 16:45:12 +0300
commitac3bfb7728e9324e6a21035e7b321649550c60cb (patch)
treee467ad4fcf4b83f1d6aa6f9d8613ee7d0534bfc9 /main.js
parent562fd4eb2551cf26c19d619bdf00dbd965fb11d5 (diff)
finalFixes
Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236
Diffstat (limited to 'main.js')
-rw-r--r--main.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.js b/main.js
index eae4e44..8badf8e 100644
--- a/main.js
+++ b/main.js
@@ -1,4 +1,9 @@
let btn = document.querySelector(".neon-button");
+const isMobile = window.matchMedia("only screen and (max-width: 760px)").matches;
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent))
btn.setAttribute("href", "rannak/noMobiles");
+
+if (isMobile)
+ btn.setAttribute("href", "rannak/noMobiles");