diff options
Diffstat (limited to 'space-invaders')
| -rw-r--r-- | space-invaders/index.html | 1 | ||||
| -rw-r--r-- | space-invaders/js/mobile.js | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/space-invaders/index.html b/space-invaders/index.html index 71e2f11..03e49e3 100644 --- a/space-invaders/index.html +++ b/space-invaders/index.html @@ -7,6 +7,7 @@ <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>s1nical - Space Invaders</title> <link rel="shortcut icon" href="/space-invaders/favicon.png" type="image/x-icon"> + <script src="/space-invaders/js/mobile.js"></script> </head> <body> diff --git a/space-invaders/js/mobile.js b/space-invaders/js/mobile.js new file mode 100644 index 0000000..5807029 --- /dev/null +++ b/space-invaders/js/mobile.js @@ -0,0 +1,4 @@ +// CHECKS IF USER IS ON MOBILE +if (screen.width <= 480) { + location.href = '/mobile'; +}
\ No newline at end of file |