From 082de4b7d55fdcfec36c5b532535354f0c584718 Mon Sep 17 00:00:00 2001 From: s1n Date: Thu, 5 Sep 2019 19:25:28 -0700 Subject: formatting, removals, stability fixes FORMATTING: - Add descriptive/ sorting tags to index.html in root - Change most function dividers in JS to uppercase - Add commenting to background-sparkles.js DELETION: - Doge STABILITY: - Replace screen.width detections with 699px instead of 460px, because the largest phones verify as 780. --- js/app.js | 4 ++-- js/background-sparkles.js | 13 ++++++++++--- js/redirect-to-desktop.js | 2 +- js/redirect-to-mobile.js | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/app.js b/js/app.js index 48022f1..eccb561 100644 --- a/js/app.js +++ b/js/app.js @@ -1,3 +1,4 @@ +// KONAMI CODE HINTS $(window).on("load", function () { console.log("UP, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, B, A") @@ -21,8 +22,7 @@ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phon ** })(); */ -// KONAMI CODE FOR ALTERNATE 90s SITE - +// KONAMI CODE FOR ALTERNATE 90S SITE // A key map of allowed keys var allowedKeys = { 37: 'left', diff --git a/js/background-sparkles.js b/js/background-sparkles.js index 16cfb4e..bce6b94 100644 --- a/js/background-sparkles.js +++ b/js/background-sparkles.js @@ -1,5 +1,10 @@ -// BACKGROUND SPARKLES -// SCRIPT #1 +// Background only renders based on the original browser window size when +// starting to load the site. Due to rendering issues, I don't think I +// can do it other wise. + +/////////////// +// SCRIPT #1 // +/////////////// // Set up base pattern var pattern = Trianglify({ @@ -25,7 +30,9 @@ document.body.appendChild(pattern.svg()) // png.src = pattern.png() // document.body.appendChild(png) -// SCRIPT #2 +/////////////// +// SCRIPT #2 // +/////////////// $('.title-wrapper').css('width', window.innerWidth); $('.title-wrapper').css('height', window.innerHeight); diff --git a/js/redirect-to-desktop.js b/js/redirect-to-desktop.js index 64d767d..df42fa0 100644 --- a/js/redirect-to-desktop.js +++ b/js/redirect-to-desktop.js @@ -1,4 +1,4 @@ // CHECKS IF USER IS ON DESKTOP -if (screen.width > 480) { +if (screen.width > 699) { location.href = '/index.html'; } \ No newline at end of file diff --git a/js/redirect-to-mobile.js b/js/redirect-to-mobile.js index 5807029..599d0b6 100644 --- a/js/redirect-to-mobile.js +++ b/js/redirect-to-mobile.js @@ -1,4 +1,4 @@ // CHECKS IF USER IS ON MOBILE -if (screen.width <= 480) { +if (screen.width <= 699) { location.href = '/mobile'; } \ No newline at end of file -- cgit v1.2.3