summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authors1n <[email protected]>2019-09-05 19:25:28 -0700
committers1n <[email protected]>2019-09-05 19:25:28 -0700
commit082de4b7d55fdcfec36c5b532535354f0c584718 (patch)
tree79ac76befaa3ae175b865999ed10c19501e820ad /js
parent* red (diff)
downloads1n.pw-admin-082de4b7d55fdcfec36c5b532535354f0c584718.tar.xz
s1n.pw-admin-082de4b7d55fdcfec36c5b532535354f0c584718.zip
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.
Diffstat (limited to 'js')
-rw-r--r--js/app.js4
-rw-r--r--js/background-sparkles.js13
-rw-r--r--js/redirect-to-desktop.js2
-rw-r--r--js/redirect-to-mobile.js2
4 files changed, 14 insertions, 7 deletions
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