summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authors1nical <[email protected]>2019-08-07 15:22:49 -0700
committers1nical <[email protected]>2019-08-07 15:22:49 -0700
commit4d5b7f80b1cbf1db4fe9662022892e49c5078a41 (patch)
tree218607e8dd3ae91344d011f6f288741aaeddaa68 /js
parentUpdate README.md (diff)
downloads1n.pw-admin-4d5b7f80b1cbf1db4fe9662022892e49c5078a41.tar.xz
s1n.pw-admin-4d5b7f80b1cbf1db4fe9662022892e49c5078a41.zip
Add navbar, mobile version
Diffstat (limited to 'js')
-rw-r--r--js/app.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/app.js b/js/app.js
index 00d7fde..44a5a57 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,8 +1,13 @@
-// LOADER ANIM
+// LOADER ANIMATION
$(window).on("load", function () {
$(".loader-wrapper").fadeOut("slow");
})
+// THIS CHECKS WHAT OS THE USER IS ON
+if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
+ location.href = './mobile/';
+}
+
// BACKGROUND SPARKLES
// SCRIPT #1
@@ -80,7 +85,7 @@ $(window).on("load", function () {
$(".loader-wrapper").fadeOut("slow");
})
-// HONESTLY I HAVE NO IDEA WHAT THIS IS BUT IT WAS IN THE ORIGINAL SRC
+// 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) {
return;
@@ -88,3 +93,4 @@ $(window).on("load", function () {
document.querySelector('a[href="/cdn-cgi/l/email-protection"]').href = `\x6dailto:hi\x40${location.hostname}`;
})();
+