Skip to content

Commit cebaecc

Browse files
committed
fixing jshint issue
1 parent 4512612 commit cebaecc

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

app/js/timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ angular.module('timer', [])
1717
if(typeof String.prototype.trim !== 'function') {
1818
String.prototype.trim = function() {
1919
return this.replace(/^\s+|\s+$/g, '');
20-
}
20+
};
2121
}
2222

2323
//angular 1.2 doesn't support attributes ending in "-start", so we're

dist/angular-timer.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* angular-timer - v1.0.12 - 2014-03-18 4:02 PM
2+
* angular-timer - v1.0.12 - 2014-04-13 4:22 PM
33
* https://github.com/siddii/angular-timer
44
*
55
* Copyright (c) 2014 Siddique Hameed
@@ -19,6 +19,14 @@ angular.module('timer', [])
1919
},
2020
controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {
2121

22+
// Checking for trim function since IE8 doesn't have it
23+
// If not a function, create tirm with RegEx to mimic native trim
24+
if(typeof String.prototype.trim !== 'function') {
25+
String.prototype.trim = function() {
26+
return this.replace(/^\s+|\s+$/g, '');
27+
};
28+
}
29+
2230
//angular 1.2 doesn't support attributes ending in "-start", so we're
2331
//supporting both "autostart" and "auto-start" as a solution for
2432
//backward and forward compatibility.
@@ -112,14 +120,12 @@ angular.module('timer', [])
112120
$scope.days = Math.floor((($scope.millis / (3600000)) / 24));
113121
$scope.daysS = $scope.days==1 ? '' : 's';
114122

115-
116123
//add leading zero if number is smaller than 10
117124
$scope.sseconds = $scope.seconds < 10 ? '0' + $scope.seconds : $scope.seconds;
118125
$scope.mminutes = $scope.minutes < 10 ? '0' + $scope.minutes : $scope.minutes;
119126
$scope.hhours = $scope.hours < 10 ? '0' + $scope.hours : $scope.hours;
120127
$scope.ddays = $scope.days < 10 ? '0' + $scope.days : $scope.days;
121128

122-
123129
}
124130
//determine initial values of time units and add AddSeconds functionality
125131
if ($scope.countdownattr) {

dist/angular-timer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)