Last active
December 22, 2015 00:28
-
-
Save thiagopnts/6389330 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app> | |
<head> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<style type="text/css" media="all"> | |
.bigger { | |
font-size: 4.5em; | |
line-height: 2em; | |
} | |
.big { | |
font-size: 3em; | |
} | |
</style> | |
<script type="text/javascript" charset="utf-8"> | |
function Counter($scope, $timeout) { | |
$scope.noPhising = 0; | |
$scope.noRmrf = 0; | |
$scope.phisingRecord = 62; | |
$scope.rmrfRecord = 0; | |
$scope.rmrfDate = new Date(2013, 7, 26); | |
$scope.phisingDate = new Date(2013, 6, 31) | |
$scope.checkDiff = function() { | |
var today = new Date(); | |
$scope.noPhising = Math.round(Math.abs((today - $scope.phisingDate) / (24*60*60*1000))); | |
$scope.noRmrf = Math.round(Math.abs((today - $scope.rmrfDate) / (24*60*60*1000))); | |
$scope.phisingRecord = $scope.noPhising > $scope.phisingRecord ? $scope.noPhising : $scope.phisingRecord; | |
$scope.rmrfRecord = $scope.noRmrf > $scope.rmrfRecord ? $scope.noRmrf : $scope.rmrfRecord; | |
} | |
$scope.checkDiff(); | |
setInterval(function() { | |
$scope.$apply($scope.checkDiff); | |
}, 1000); | |
} | |
</script> | |
<title>Counter</title> | |
</head> | |
<body ng-controller="Counter"> | |
<center> | |
<h1 class="bigger">Estamos há {{noPhising}} dias sem cair em phising.</h1> | |
<h2 class="big">Nosso recorde é de {{phisingRecord}} dias.</h2> | |
<hr /> | |
<h1 class="bigger">Estamos há {{noRmrf}} dias sem deletar o /*</h1> | |
<h2 class="big">Nosso recorde é de {{rmrfRecord}} dias.</h2> | |
</center> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment