summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
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");