diff options
| author | s1nical <[email protected]> | 2019-08-27 21:45:13 -0700 |
|---|---|---|
| committer | s1nical <[email protected]> | 2019-08-27 21:45:13 -0700 |
| commit | 222de4e91ac1ba9340b50ab299735ff7d88d0e35 (patch) | |
| tree | 0fcfaa7a1264952dc80959489635590fdb9062f2 /js | |
| parent | add about redirect to konami nav bar (diff) | |
| download | s1n.pw-admin-222de4e91ac1ba9340b50ab299735ff7d88d0e35.tar.xz s1n.pw-admin-222de4e91ac1ba9340b50ab299735ff7d88d0e35.zip | |
seperate mobile/desktop redirects
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 |