Last active
June 8, 2017 21:36
-
-
Save ei-grad/a7f52f732a30e924a96b4f7ec0a20df5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var agent = navigator.userAgent.toLowerCase(); | |
| if (/iphone|ipad|ipod/i.test(agent)) { | |
| window.location = 'https://{appstore_link}'; | |
| } | |
| else if (/android/i.test(agent)) { | |
| window.location = 'https://{gplay_link}'; | |
| } | |
| else { | |
| window.location = 'http://{web_version}'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment