diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/app.js | 5 | ||||
| -rw-r--r-- | js/redirect-to-desktop.js | 4 | ||||
| -rw-r--r-- | js/redirect-to-mobile.js | 4 |
3 files changed, 8 insertions, 5 deletions
@@ -11,11 +11,6 @@ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phon }
*/
-// CHECKS IF USER IS ON MOBILE
-if( screen.width <= 480 ) {
- location.href = '/mobile';
-}
-
/* Honestly I have NO idea what this is but it was in the original site source code so I kept it :)
**(async () => {
** if (navigator.webdriver || document.visibilityState === 'prerender' || !location.hostname) {
diff --git a/js/redirect-to-desktop.js b/js/redirect-to-desktop.js new file mode 100644 index 0000000..64d767d --- /dev/null +++ b/js/redirect-to-desktop.js @@ -0,0 +1,4 @@ +// CHECKS IF USER IS ON DESKTOP +if (screen.width > 480) { + location.href = '/index.html'; +}
\ No newline at end of file diff --git a/js/redirect-to-mobile.js b/js/redirect-to-mobile.js new file mode 100644 index 0000000..5807029 --- /dev/null +++ b/js/redirect-to-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 |