From 8b9a0ffdd26d41c07e42b0fcdace393ff638e072 Mon Sep 17 00:00:00 2001 From: s1nical Date: Fri, 23 Aug 2019 05:34:50 -0700 Subject: redo previous useragent back to screenwidth --- 404/js/main.js | 9 --------- cars/js/main.js | 9 --------- js/app.js | 18 ++++++++---------- konami/js/main.js | 9 --------- mobile/js/app.js | 11 ----------- space-invaders/js/mobile.js | 9 --------- wolf3d/js/main.js | 9 --------- 7 files changed, 8 insertions(+), 66 deletions(-) diff --git a/404/js/main.js b/404/js/main.js index f36bbf1..2f18f0d 100644 --- a/404/js/main.js +++ b/404/js/main.js @@ -5,16 +5,7 @@ $(document).mousemove(function (event) { }); }); -/* // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/404/alternate'; -} -*/ - -// 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/'; } \ No newline at end of file diff --git a/cars/js/main.js b/cars/js/main.js index 916aa7e..010a278 100644 --- a/cars/js/main.js +++ b/cars/js/main.js @@ -1,16 +1,7 @@ -/* // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/mobile'; } -*/ - -// 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/'; -} // rendered-js class Wall { diff --git a/js/app.js b/js/app.js index 125afd2..b2f9848 100644 --- a/js/app.js +++ b/js/app.js @@ -5,20 +5,18 @@ $(window).on("load", function () { console.log("UP, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, B, A") }) -// 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/'; -} - /* -// CHECKS IF USER IS ON MOBILE -// if( screen.width <= 480 ) { -// location.href = '/mobile'; +// THIS CHECKS WHAT OS THE USER IS ON, This is a old variation so don't use this. +// if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) { +// location.href = './mobile/'; // } */ +// CHECKS IF USER IS ON MOBILE +if( screen.width <= 480 ) { + location.href = '/mobile'; +} + // BACKGROUND SPARKLES // SCRIPT #1 diff --git a/konami/js/main.js b/konami/js/main.js index 5cf2f46..9ffed54 100644 --- a/konami/js/main.js +++ b/konami/js/main.js @@ -19,19 +19,10 @@ function Scroll() { } Scroll(); -/* // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/mobile'; } -*/ - -// 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/'; -} // KONAMI CODE FOR TOASTY diff --git a/mobile/js/app.js b/mobile/js/app.js index 737ff10..ae22283 100644 --- a/mobile/js/app.js +++ b/mobile/js/app.js @@ -3,21 +3,10 @@ $(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 diff --git a/space-invaders/js/mobile.js b/space-invaders/js/mobile.js index 04584f0..5807029 100644 --- a/space-invaders/js/mobile.js +++ b/space-invaders/js/mobile.js @@ -1,13 +1,4 @@ -/* // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/mobile'; -} -*/ - -// 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/'; } \ No newline at end of file diff --git a/wolf3d/js/main.js b/wolf3d/js/main.js index 04584f0..5807029 100644 --- a/wolf3d/js/main.js +++ b/wolf3d/js/main.js @@ -1,13 +1,4 @@ -/* // CHECKS IF USER IS ON MOBILE if (screen.width <= 480) { location.href = '/mobile'; -} -*/ - -// 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/'; } \ No newline at end of file -- cgit v1.2.3