booligoosh / rubiks-time Goto Github PK
View Code? Open in Web Editor NEWA clean, modern Rubik's cube timer
Home Page: https://booligoosh.github.io/rubiks-time/
A clean, modern Rubik's cube timer
Home Page: https://booligoosh.github.io/rubiks-time/
To reproduce, clear all solves.
Click on "Stats", then click on "More Stats".
It shows you "Average - NaN:NaN.NaN".
While this is understandable for any JavaScript programmer, any other person will think, that the timer is broken.
Possible solutions are displaying "DNF", "00:00.00" or "can not calculate". You can do this in averageOfArray (line 260 in script.js) by checking like if(array.length<1)return"DNF"
.
If no average of 5/12 can be done because of too less solve, the <hr>s are still there and look bad. I would suggest do display only 1 <hr> at the bottom.
This is how your code looks in the browser with 0 solves:
<div id="screen6" style="display: block;">
<!-- Some more unimportant code -->
<hr>
<h2 id="average">Average - NaN:NaN.NaN</h2>
<hr>
<h2 id="currentaverageof5"></h2>
<hr>
<h2 id="bestaverageof5"></h2>
<hr>
<h2 id="currentaverageof12"></h2>
<hr>
<h2 id="bestaverageof12"></h2>
</div>
and these are the visible elements:
<div id="screen6" style="display: block;">
<!-- ... -->
<hr>
<h2 id="average">Average - NaN:NaN.NaN</h2>
<hr>
<hr>
<hr>
<hr>
</div>
When pressing space, I get the following errors logged into the console:
ReferenceError: event is not defined script.js:167:1
spaceDown https://booligoosh.github.io/rubiks-time/script.js:167:1
onkeydown https://booligoosh.github.io/rubiks-time/:1:1
ReferenceError: event is not defined script.js:189:1
spaceUp https://booligoosh.github.io/rubiks-time/script.js:189:1
onkeyup https://booligoosh.github.io/rubiks-time/:1:1
This happens on Firefox 52.0 (64bit) with Ubuntu 16.10.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.