Created
January 18, 2019 09:49
-
-
Save rangedsp/9ef75a303bab8a86b48c7a87832a455c to your computer and use it in GitHub Desktop.
AnimatedUrl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var f = ['π', 'π', 'π', 'π', 'π', 'π', 'π', 'π'], | |
d = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
m = 0; | |
function loop() { | |
var s = '', x = 0; | |
if (!m) { | |
while (d[x] == 4) { | |
x ++; | |
} | |
if (x >= d.length) m = 1; | |
else { | |
d[x] ++; | |
} | |
} | |
else { | |
while (d[x] == 0) { | |
x ++; | |
} | |
if (x >= d.length) m = 0; | |
else { | |
d[x] ++; | |
if (d[x] == 8) d[x] = 0; | |
} | |
} | |
d.forEach(function (n) { | |
s += f[n]; | |
}); | |
location.hash = s; | |
setTimeout(loop, 50); | |
} | |
loop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment