From 6525c082f4f9da365d17a29aee3c4525280d7f05 Mon Sep 17 00:00:00 2001 From: s1nical Date: Fri, 23 Aug 2019 05:31:10 -0700 Subject: mobile redir to use useragrent instead screenwidth --- mobile/js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mobile') diff --git a/mobile/js/app.js b/mobile/js/app.js index ae22283..737ff10 100644 --- a/mobile/js/app.js +++ b/mobile/js/app.js @@ -3,10 +3,21 @@ $(window).on("load", function () { $(".loader-wrapper").fadeOut("slow"); }) +/* // CHECKS IF USER IS ON DESKTOP if( screen.width > 480 ) { location.href = '/index.html'; } +*/ + +// THIS CHECKS WHAT OS THE USER IS ON +// This is a old variation so don't use this. +// Using it because this way you can use Chrome's "Request Desktop Site" feature. +if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) { + location.href = '/mobile/'; +} else { + location.href = '/'; +} // BACKGROUND SPARKLES // SCRIPT #1 -- cgit v1.2.3