summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authors1nical <[email protected]>2019-08-11 14:50:28 -0700
committers1nical <[email protected]>2019-08-11 14:50:28 -0700
commit215f9aa6ff49dec357bcbfbd12e32418d08e4ad4 (patch)
treeeab6c0810a2cd03bc83cc0bfcbcc71370ee08ab9
parentremove toasty audio from initial redirect due to performance issue (diff)
downloads1n.pw-admin-215f9aa6ff49dec357bcbfbd12e32418d08e4ad4.tar.xz
s1n.pw-admin-215f9aa6ff49dec357bcbfbd12e32418d08e4ad4.zip
fix various formatting issues
- console log konami code - fix absolute path - take out async thingy
-rw-r--r--js/app.js50
1 files changed, 27 insertions, 23 deletions
diff --git a/js/app.js b/js/app.js
index 40e418e..efc4a87 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,6 +1,8 @@
// LOADER ANIMATION
$(window).on("load", function () {
$(".loader-wrapper").fadeOut("slow");
+
+ 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.
@@ -17,7 +19,7 @@ if( screen.width <= 480 ) {
// BACKGROUND SPARKLES
// SCRIPT #1
-// set up the base pattern
+// Set up base pattern
var pattern = Trianglify({
height: window.innerHeight, // White: #fdfbfb, Salmon: #cc3300
width: window.innerWidth,
@@ -28,15 +30,15 @@ var pattern = Trianglify({
cell_size: 160
});
-// // canvas
+// // Canvas
// document.body.appendChild(pattern.canvas())
-// svg
+// SVG
document.body.appendChild(pattern.svg())
-// // png
+// // PNG
// var png = document.createElement('img')
// png.src = pattern.png()
// document.body.appendChild(png)
@@ -52,7 +54,8 @@ var time = 10,
pathCollection = $paths.get(),
count = $paths.length;
-console.log(count);
+// // Log variable "count"
+// console.log(count);
pathCollection.sort(function () {
return Math.random() * 10 > 5 ? 1 : -1;
@@ -86,18 +89,19 @@ setTimeout(function () {
});
}, 2000);
-// 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;
- }
-
- document.querySelector('a[href="/cdn-cgi/l/email-protection"]').href = `\x6dailto:hi\x40${location.hostname}`;
-})();
+/* 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;
+** }
+**
+** document.querySelector('a[href="/cdn-cgi/l/email-protection"]').href = `\x6dailto:hi\x40${location.hostname}`;
+** })();
+*/
// KONAMI CODE FOR ALTERNATE 90s SITE
-// a key map of allowed keys
+// A key map of allowed keys
var allowedKeys = {
37: 'left',
38: 'up',
@@ -107,26 +111,26 @@ var allowedKeys = {
66: 'b'
};
-// the 'official' Konami Code sequence
+// The 'official' Konami Code sequence
var konamiCode = ['up', 'up', 'down', 'down', 'left', 'right', 'left', 'right', 'b', 'a'];
-// a variable to remember the 'position' the user has reached so far.
+// A variable to remember the 'position' the user has reached so far.
var konamiCodePosition = 0;
-// add keydown event listener
+// Add keydown event listener
document.addEventListener('keydown', function (e) {
- // get the value of the key code from the key map
+ // Get the value of the key code from the key map
var key = allowedKeys[e.keyCode];
- // get the value of the required key from the konami code
+ // Get the value of the required key from the Konami Code
var requiredKey = konamiCode[konamiCodePosition];
- // compare the key with the required key
+ // Compare the key with the required key
if (key == requiredKey) {
- // move to the next key in the konami code sequence
+ // Move to the next key in the Konami Code sequence
konamiCodePosition++;
- // if the last key is reached, activate cheats
+ // Ff the last key is reached, activate cheats
if (konamiCodePosition == konamiCode.length) {
activateCheats();
konamiCodePosition = 0;
@@ -138,7 +142,7 @@ document.addEventListener('keydown', function (e) {
function activateCheats() {
- window.location.href = "./konami";
+ window.location.href = "/konami";
}
var TxtRotate = function (el, toRotate, period) {