summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2014-11-27 18:31:24 +0900
committerSean Whitton <spwhitton@spwhitton.name>2014-11-27 18:31:48 +0900
commit1c5dcd53d386ae72f549dc942e784b85e6161842 (patch)
tree255b2cc5de0b214b3fe6ac512f41187af9e2bb2b
parente5a37cb18f62c8f5b471a22e302b5c00347d2370 (diff)
downloadschoolclock-1c5dcd53d386ae72f549dc942e784b85e6161842.tar.gz
indentation
-rw-r--r--js/main.js66
1 files changed, 33 insertions, 33 deletions
diff --git a/js/main.js b/js/main.js
index bf1204d..19de8f3 100644
--- a/js/main.js
+++ b/js/main.js
@@ -76,17 +76,17 @@ function updateClasses ()
else
var colour = "";
$('#classes').append('<div class="col-md-2"' + colour + '> \
- <h1>' + classstring + '</h1> \
- <p class="text-center"> \
- <a id="' + classstring + 'points" class="btn btn-info btn-lg">' + classes[i].points + ' points</a> \
- </p> \
- <p class="text-center"> \
- <a id="' + classstring + 'time" class="btn btn-warning">' + minutes + ':' + seconds + ' this week</a> \
- </p> \
- <p class="text-center"> \
- <a id="' + classstring + 'random" class="btn btn-success">Lucky number</a> \
- </p> \
- </div>');
+<h1>' + classstring + '</h1> \
+<p class="text-center"> \
+<a id="' + classstring + 'points" class="btn btn-info btn-lg">' + classes[i].points + ' points</a> \
+</p> \
+<p class="text-center"> \
+<a id="' + classstring + 'time" class="btn btn-warning">' + minutes + ':' + seconds + ' this week</a> \
+</p> \
+<p class="text-center"> \
+<a id="' + classstring + 'random" class="btn btn-success">Lucky number</a> \
+</p> \
+</div>');
}
// now put functions on the buttons
@@ -229,7 +229,7 @@ $(document).bind('keydown', 'b', function (){$.ionSound.play("school_bell");});
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min)) + min;
+ return Math.floor(Math.random() * (max - min)) + min;
}
function activityClockGo($seconds)
@@ -240,21 +240,21 @@ function activityClockGo($seconds)
function timeWastingClockReset()
{
- if (timeWastingClock.getTime() != 0)
- {
- var $timeWastingClockResetConfirm = confirm("Are you sure?");
- if ($timeWastingClockResetConfirm)
+ if (timeWastingClock.getTime() != 0)
{
- if ($timeWastingClockRunning)
- {
- $('#timeWastingClockGo').html('Start <u>t</u>imer');
- timeWastingClock.stop();
- $timeWastingClockRunning = false;
- }
- $.jStorage.set("time_wasted", 0);
- timeWastingClock.setTime(0);
+ var $timeWastingClockResetConfirm = confirm("Are you sure?");
+ if ($timeWastingClockResetConfirm)
+ {
+ if ($timeWastingClockRunning)
+ {
+ $('#timeWastingClockGo').html('Start <u>t</u>imer');
+ timeWastingClock.stop();
+ $timeWastingClockRunning = false;
+ }
+ $.jStorage.set("time_wasted", 0);
+ timeWastingClock.setTime(0);
+ }
}
- }
}
function activityClockReset()
@@ -272,12 +272,12 @@ function activityClockCustom()
// mplungjan on stack overflow: http://stackoverflow.com/a/15397495
function nth(d) {
- if(d>3 && d<21) return 'th'; // thanks kennebec
- switch (d % 10) {
- case 1: return "st";
- case 2: return "nd";
- case 3: return "rd";
- default: return "th";
+ if(d>3 && d<21) return 'th'; // thanks kennebec
+ switch (d % 10) {
+ case 1: return "st";
+ case 2: return "nd";
+ case 3: return "rd";
+ default: return "th";
}
}
@@ -287,9 +287,9 @@ function toggleDateStyle()
var today = new Date();
var month = "January,February,March,April,May,June,July,August,September,October,November,December"
- .split(",")[today.getMonth()];
+ .split(",")[today.getMonth()];
var day = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"
- .split(",")[today.getDay()];
+ .split(",")[today.getDay()];
var date = today.getDate();
var British = day + " " + date + nth(date) + " " + month + " " + today.getFullYear();
var American = day + " " + month + " " + date + nth(date) + ", " + today.getFullYear();