summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authors1nical <[email protected]>2019-08-27 21:45:13 -0700
committers1nical <[email protected]>2019-08-27 21:45:13 -0700
commit222de4e91ac1ba9340b50ab299735ff7d88d0e35 (patch)
tree0fcfaa7a1264952dc80959489635590fdb9062f2 /js
parentadd about redirect to konami nav bar (diff)
downloads1n.pw-admin-222de4e91ac1ba9340b50ab299735ff7d88d0e35.tar.xz
s1n.pw-admin-222de4e91ac1ba9340b50ab299735ff7d88d0e35.zip
seperate mobile/desktop redirects
Diffstat (limited to 'js')
-rw-r--r--js/app.js5
-rw-r--r--js/redirect-to-desktop.js4
-rw-r--r--js/redirect-to-mobile.js4
3 files changed, 8 insertions, 5 deletions
diff --git a/js/app.js b/js/app.js
index f20085d..48022f1 100644
--- a/js/app.js
+++ b/js/app.js
@@ -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