diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-06-10 16:45:12 +0300 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-06-10 16:45:12 +0300 |
commit | ac3bfb7728e9324e6a21035e7b321649550c60cb (patch) | |
tree | e467ad4fcf4b83f1d6aa6f9d8613ee7d0534bfc9 /main.js | |
parent | 562fd4eb2551cf26c19d619bdf00dbd965fb11d5 (diff) |
finalFixes
Former-commit-id: 7fcc5cc7033804bb7e56b0ce5d3d77a6c2413236
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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"); |