From 1c5dcd53d386ae72f549dc942e784b85e6161842 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 27 Nov 2014 18:31:24 +0900 Subject: indentation --- js/main.js | 66 +++++++++++++++++++++++++++++++------------------------------- 1 file 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('
\ -

' + classstring + '

\ -

\ - ' + classes[i].points + ' points \ -

\ -

\ - ' + minutes + ':' + seconds + ' this week \ -

\ -

\ - Lucky number \ -

\ -
'); +

' + classstring + '

\ +

\ +' + classes[i].points + ' points \ +

\ +

\ +' + minutes + ':' + seconds + ' this week \ +

\ +

\ +Lucky number \ +

\ +'); } // 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 timer'); - 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 timer'); + 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(); -- cgit v1.2.3