From ac3bfb7728e9324e6a21035e7b321649550c60cb Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 10 Jun 2023 16:45:12 +0300 Subject: finalFixes Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236 --- main.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.js') 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"); -- cgit v1.2.3