Skip to content

Commit

Permalink
fixing jshint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
siddii committed Apr 13, 2014
1 parent 4512612 commit cebaecc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/js/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ angular.module('timer', [])
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
}
};
}

//angular 1.2 doesn't support attributes ending in "-start", so we're
Expand Down
12 changes: 9 additions & 3 deletions dist/angular-timer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* angular-timer - v1.0.12 - 2014-03-18 4:02 PM
* angular-timer - v1.0.12 - 2014-04-13 4:22 PM
* https://github.com/siddii/angular-timer
*
* Copyright (c) 2014 Siddique Hameed
Expand All @@ -19,6 +19,14 @@ angular.module('timer', [])
},
controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {

// Checking for trim function since IE8 doesn't have it
// If not a function, create tirm with RegEx to mimic native trim
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
};
}

//angular 1.2 doesn't support attributes ending in "-start", so we're
//supporting both "autostart" and "auto-start" as a solution for
//backward and forward compatibility.
Expand Down Expand Up @@ -112,14 +120,12 @@ angular.module('timer', [])
$scope.days = Math.floor((($scope.millis / (3600000)) / 24));
$scope.daysS = $scope.days==1 ? '' : 's';


//add leading zero if number is smaller than 10
$scope.sseconds = $scope.seconds < 10 ? '0' + $scope.seconds : $scope.seconds;
$scope.mminutes = $scope.minutes < 10 ? '0' + $scope.minutes : $scope.minutes;
$scope.hhours = $scope.hours < 10 ? '0' + $scope.hours : $scope.hours;
$scope.ddays = $scope.days < 10 ? '0' + $scope.days : $scope.days;


}
//determine initial values of time units and add AddSeconds functionality
if ($scope.countdownattr) {
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-timer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cebaecc

Please sign in to comment.